Allyn Dimock, Robert Muller, Franklyn Turbak, and J. B. Wells.
Strongly Typed Flow-Directed Representation Transformations.
In International Conference
on Functional Programming (ICFP '97). ACM, 1997.
We present a new framework for transforming data
representations in a strongly typed intermediate language.
Our method allows both value producers (sources) and value consumers
(sinks) to support multiple representations,
automatically inserting any required code
Specialized representations can be easily chosen for particular
The framework is based on these techniques:
As an instance of our framework, we provide a function representation
transformation that encompasses both closure conversion and inlining.
Our framework is adaptable to data other than functions.
Flow annotated types encode the ``flows-from'' (source) and
``flows-to'' (sink) information of a flow graph.
Intersection and union types support (a) encoding precise
flow information, (b) separating flow information so that
transformations can be well typed, (c) automatically reorganizing flow
paths to enable multiple representations.