Simple Usage Polymorphism

We present a novel inference algorithm for a type system featuring subtyping and usage (annotation) polymorphism. This algorithm infers simply-polymorphic types rather than the constrained-polymorphic types usual in such a setting; it achieves this by means of constraint approximation. The algorithm is motivated by practical considerations and experience of a previous system, and has been implemented in a production compiler with positive results. We believe the algorithm may well have applications in settings other than usage-type inference.

[1]  S. Jones,et al.  A Transformation-Based Optimiser for Haskell , 1998, Sci. Comput. Program..

[2]  Peter Sestoft,et al.  Analysis and efficient implementation of functional programs , 1991 .

[3]  Prateek Mishra,et al.  Type Inference with Subtypes , 1990, Theor. Comput. Sci..

[4]  Erik Barendsen,et al.  Uniqueness Typing for Functional Languages with Graph Rewriting Semantics , 1996, Math. Struct. Comput. Sci..

[5]  Will Partain,et al.  The nofib Benchmark Suite of Haskell Programs , 1992, Functional Programming.

[6]  Suresh Jagannathan,et al.  Effective Flow Analysis for Avoiding Run-Time Checks , 1995, SAS.

[7]  Matthias Felleisen,et al.  Componential set-based analysis , 1997, TOPL.

[8]  Robert Cartwright,et al.  Soft typing , 1991, PLDI '91.

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

[10]  David Wright Linear, Strictness and Usage Logics , 1996 .

[11]  Simon L. Peyton Jones,et al.  Let-floating: moving bindings to give faster programs , 1996, ICFP '96.

[12]  Philip Wadler,et al.  Once upon a type , 1995, FPCA '95.

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

[14]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

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

[16]  Jens Palsberg,et al.  Optimal Representations of Polymorphic Types with Subtyping (Extended Abstract) , 1997, TACS.

[17]  Luca Cardelli An implementation of F , 1993 .

[18]  Bart Jacobs,et al.  Semantics of Weakening and Contraction , 1994, Ann. Pure Appl. Log..

[19]  Suresh Jagannathan,et al.  Polymorphic splitting: an effective polyvariant flow analysis , 1998, TOPL.

[20]  Josef Svenningsson,et al.  A Usage Analysis with Bounded Usage Polymorphism and Subtyping , 2000, IFL.

[21]  Simon L. Peyton Jones,et al.  Once upon a polymorphic type , 1999, POPL '99.

[22]  Thomas P. Jensen,et al.  Strictness Analysis in Logical Form , 1991, FPCA.

[23]  Karl-Filip Faxén,et al.  Optimizing Lazy Functional Programs Using Flow Inference , 1995, SAS.

[24]  André L. M. Santos,et al.  Compilation by transformation in non-strict functional languages , 1995 .

[25]  Johan Nordlander,et al.  Pragmatic subtyping in polymorphic languages , 1998, ICFP '98.

[26]  T. Jim,et al.  Type inference in systems of recursive types with subtyping , 1997 .

[27]  Simon Marlow Update Avoidance Analysis by Abstract Interpretation , 1993, Functional Programming.

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

[29]  Simon L. Peyton Jones,et al.  Lazy functional state threads , 1994, PLDI '94.

[30]  Luca Cardelli,et al.  An Extension of System F with Subtyping , 1991, TACS.

[31]  Andrew John Gill,et al.  Cheap deforestation for non-strict functional languages , 1996 .

[32]  Martin Odersky,et al.  Type Inference with Constrained Types , 1999, Theory Pract. Object Syst..

[33]  David B. MacQueen,et al.  The Definition of Standard ML (Revised) , 1997 .

[34]  François Pottier,et al.  Simplifying Subtyping Constraints: A Theory , 2001, Inf. Comput..

[35]  Karl-Philip Faxén Analysing, transforming and compiling lazy functional programs , 1997 .

[36]  Fritz Henglein,et al.  Polymorphic Recursion and Subtype Qualifications: Polymorphic Binding-Time Analysis in Polynomial Time , 1995, SAS.

[37]  Fritz Henglein,et al.  Polymorphic Binding-Time Analysis , 1994, ESOP.

[38]  Philip Wadler,et al.  A practical subtyping system for Erlang , 1997, ICFP '97.