A calculus with polymorphic and polyvariant flow types

We present λCIL, a typed λ-calculus which serves as the foundation for a typed intermediate language for optimizing compilers for higher-order polymorphic programming languages. The key innovation of λCIL is a novel formulation of intersection and union types and flow labels on both terms and types. These flow types can encode polyvariant control and data flow information within a polymorphically typed program representation. Flow types can guide a compiler in generating customized data representations in a strongly typed setting. Since λCIL enjoys confluence, standardization, and subject reduction properties, it is a valuable tool for reasoning about programs and program transformations.

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

[2]  Timothy J. Harvey,et al.  Practical improvements to the construction and destruction of static single assignment form , 1998 .

[3]  Vincent van Oostrom,et al.  Combinatory Reduction Systems: Introduction and Survey , 1993, Theor. Comput. Sci..

[4]  David Tarditi,et al.  Design and Implementation of Code Optimizations for a Type-Directed Compiler for Standard ML. , 1996 .

[5]  Simon Peyton Jones,et al.  Henk: a typed intermediate language , 1997 .

[6]  Simon L. Peyton Jones,et al.  Compiling Haskell by Program Transformation: A Report from the Trenches , 1996, ESOP.

[7]  Franklyn Turbak,et al.  Strongly Typed Flow-Directed Representation Transformations. , 1997, ICFP 1997.

[8]  Jens Palsberg,et al.  A type system equivalent to flow analysis , 1995, TOPL.

[9]  Joe B. Wells,et al.  Functioning without closure: type-safe customized function representations for standard ML , 2001, ICFP '01.

[10]  Mary F. Fernández,et al.  Simple and effective link-time optimization of Modula-3 programs , 1995, PLDI '95.

[11]  Jens Palsberg,et al.  From polyvariant flow information to intersection and union types , 1998, POPL '98.

[12]  Andrew P. Tolmach,et al.  From ML to Ada: Strongly-typed language interoperability via source translation , 1998, Journal of Functional Programming.

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

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

[15]  Pavel Curtis Constrained qualification in polymorphic type analysis , 1990 .

[16]  Robert Harper,et al.  Compiling polymorphism using intensional type analysis , 1995, POPL '95.

[17]  ScienceYale UniversityNew Haven An Overview of the Flint/ml Compiler , 1997 .

[18]  Keith D. Cooper,et al.  Practical improvements to the construction and destruction of static single assignment form , 1998, Softw. Pract. Exp..

[19]  Assaf J. Kfoury,et al.  Principality and decidable type inference for finite-rank intersection types , 1999, POPL '99.

[20]  John Hannan,et al.  Higher-order unCurrying , 1998, POPL '98.

[21]  Flemming Nielson,et al.  Infinitary control flow analysis: a collecting semantics for closure analysis , 1997, POPL '97.

[22]  Matthias Felleisen,et al.  A call-by-need lambda calculus , 1995, POPL '95.

[23]  Suresh Jagannathan,et al.  Flow-Directed Closure Conversion for Typed Languages , 2000, ESOP.

[24]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[25]  Pawel Urzyczyn,et al.  Type reconstruction in Fω , 1997, Mathematical Structures in Computer Science.

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

[27]  Kristoffer Høgsbro Rose,et al.  Combinatory Reduction Systems with Explicit Substitution that Preserve Strong Nomalisation , 1996, RTA.

[28]  Jan Willem Klop,et al.  Combinatory reduction systems , 1980 .

[29]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[30]  Pierre Jouvelot,et al.  Separate Abstract Interpretation for Control-Flow Analysis , 1994, TACS.

[31]  Mark P. Jones Dictionary-free overloading by partial evaluation , 1995, LISP Symb. Comput..

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

[33]  Guy E. Blelloch,et al.  NESL: A Nested Data-Parallel Language (Version 2.6) , 1993 .

[34]  J. Y. Girard,et al.  Interpretation fonctionelle et elimination des coupures dans l'aritmetique d'ordre superieur , 1972 .

[35]  Nick Benton,et al.  Compiling standard ML to Java bytecodes , 1998, ICFP '98.

[36]  Andrew A. Chien,et al.  Type Directed Cloning for Object-Oriented Programs , 1995, LCPC.

[37]  Guy E. Blelloch,et al.  NESL: A Nested Data-Parallel Language , 1992 .

[38]  Torben Amtoft,et al.  Faithful Translations between Polyvariant Flows and Polymorphic Types , 2000, ESOP.

[39]  David Grove,et al.  Selective specialization for object-oriented languages , 1995, PLDI '95.

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

[41]  Jeffrey Mark Siskind,et al.  Flow-Directed Lightweight Closure Conversion , 2000 .

[42]  Xavier Leroy,et al.  Unboxed objects and polymorphic typing , 1992, POPL '92.

[43]  Andrew W. Appel,et al.  A semantic model of types and machine instructions for proof-carrying code , 2000, POPL '00.

[44]  Alexander Aiken,et al.  Type inclusion constraints and type inference , 1993, FPCA '93.

[45]  Joe B. Wells,et al.  Strongly typed flow-directed representation transformations (extended abstract) , 1997, ICFP '97.

[46]  Dominic Duggan,et al.  Dynamic typing for distributed programming in polymorphic languages , 1999, TOPL.

[47]  Peter Lee,et al.  TIL: a type-directed, optimizing compiler for ML , 2004, SIGP.

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

[49]  Simon Peyton-Jones,et al.  Henk: A Typed Intermediate Language , 1997 .

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

[51]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[52]  George C. Necula,et al.  The design and implementation of a certifying compiler , 1998, PLDI.

[53]  Andrew A. Chien,et al.  Optimization of object-oriented and concurrent programs , 1996 .

[54]  Craig Chambers,et al.  Whole-program optimization of object-oriented languages , 1996 .

[55]  Craig Chambers,et al.  Iterative type analysis and extended message splitting; optimizing dynamically-typed object-oriented programs , 1990, PLDI '90.

[56]  Jens Palsberg,et al.  Constrained types and their expressiveness , 1996, TOPL.

[57]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[58]  Ole Agesen The Cartesian Product Algorithm: Simple and Precise Type Inference Of Parametric Polymorphism , 1995, ECOOP.

[59]  Luca Cardelli,et al.  Subtyping recursive types , 1991, POPL '91.

[60]  Jeffrey Considine,et al.  Program Representation Size in an Intermediate Language with Intersection and Union Types , 2000, Types in Compilation.

[61]  Suresh Jagannathan,et al.  Type-Directed Flow Analysis for Typed Intermediate Languages , 1997, SAS.

[62]  Erik Ruf,et al.  Marmot: an optimizing compiler for Java , 2000, Softw. Pract. Exp..

[63]  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.

[64]  Zhong Shao,et al.  Implementing typed intermediate languages , 1998, ICFP '98.

[65]  Nevin Heintze Control-Flow Analysis and Type Systems , 1995, SAS.

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

[67]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

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