Strongly typed flow-directed representation transformations (extended abstract)

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 source/sink pairs.The framework is based on these techniques:1. Flow annotated types encode the "flows-from" (source) and "flows-to" (sink) information of a flow graph.2. 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.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.

[1]  Philip Wadler,et al.  The Glasgow Haskell Compiler: a technical overview , 1993 .

[2]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[3]  John C. Reynolds,et al.  Design of the programming language FORSYTHE , 1997 .

[4]  Andrew W. Appel,et al.  Continuation-passing, closure-passing style , 1989, POPL '89.

[5]  Anindya Banerjee A modular, polyvariant and type-based closure analysis , 1997, ICFP '97.

[6]  Alexander Aiken,et al.  Soft typing with conditional types , 1994, POPL '94.

[7]  Nevin Heintze,et al.  Control-Flow Analysis and Type Systems , 1995, SAS.

[8]  Scott F. Smith,et al.  Subtyping Constrained Types , 1996, SAS.

[9]  Andrew Tolmach,et al.  Combining Closure Conversion with Closure Analysis using Algebraic Types , 1997 .

[10]  S. V. Bakel,et al.  Intersection type disciplines in Lambda Calculus and applicative term rewriting systems , 1993 .

[11]  Suresh Jagannathan,et al.  Flow-directed inlining , 1996, PLDI '96.

[12]  Zhong Shao,et al.  Compiling standard ML for efficient execution on modern machines , 1994 .

[13]  B. Pierce Programming with intersection types, union types, and polymorphism , 1991 .

[14]  Trevor Jim What are principal typings and what are they good for? , 1996, POPL '96.

[15]  Mitchell Wand,et al.  Selective and lightweight closure conversion , 1994, POPL '94.

[16]  Olin Shivers,et al.  Control-flow analysis of higher-order languages of taming lambda , 1991 .

[17]  T. Jim Rank 2 Type Systems and Recursive Definitions , 1995 .

[18]  Suresh Jagannathan,et al.  A unified treatment of flow analysis in higher-order languages , 1995, POPL '95.

[19]  Paul Hudak,et al.  ORBIT: an optimizing compiler for scheme , 1986, SIGPLAN '86.

[20]  Joe B. Wells,et al.  A Typed Intermediate Language for Flow-Directed Compilation , 1997, TAPSOFT.

[21]  Samson Abramsky,et al.  Handbook of logic in computer science. , 1992 .

[22]  Robert Harper,et al.  Typed closure conversion , 1996, POPL '96.

[23]  Assaf J. Kfoury,et al.  New notions of reduction and non-semantic proofs of strong /spl beta/-normalization in typed /spl lambda/-calculi , 1995, Proceedings of Tenth Annual IEEE Symposium on Logic in Computer Science.

[24]  Mariangiola Dezani-Ciancaglini,et al.  Intersection and Union Types: Syntax and Semantics , 1995, Inf. Comput..

[25]  Greg Morrisett,et al.  Compiling with Types , 1995 .

[26]  Scott F. Smith,et al.  Type inference for recursively constrained types and its application to OOP , 1995, MFPS.

[27]  Jr. Guy L. Steele,et al.  Rabbit: A Compiler for Scheme , 1978 .