Polymorphic type inference and assignment

We present a new approach to the polymorphic typing of data accepting in-place modiflcation in ML-like languages. This approach is based on restrictions over type generalization, and a reflned typing of functions. The type system given here leads to a better integration of imperative programming style with the purely applicative kernel of ML. In particular, generic functions that allocate mutable data can safely be given fully polymorphic types. We show the soundness of this type system, and give a type reconstruction algorithm.

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

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

[3]  Robin Milner,et al.  Edinburgh LCF , 1979, Lecture Notes in Computer Science.

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

[5]  Luís Damas Type assignment in programming languages , 1984 .

[6]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[7]  Gert Smolka,et al.  FRESH: A Higher-Order Language With Unification and Multiple Results , 1985, Logic Programming: Functions, Relations, and Equations.

[8]  M. Tofte Operational Semantics and Polymorphic Type Inference , 1988 .

[9]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

[10]  John H. Reppy,et al.  First-Class Synchronous Operations in Standard ML , 1989 .

[11]  D. Walker,et al.  A Calculus of Mobile Processes, Part I , 1989 .

[12]  Luca Cardelli,et al.  Typeful Programming , 1989, Formal Description of Programming Concepts.

[13]  Robin Milner,et al.  Definition of standard ML , 1990 .

[14]  Mads Tofte,et al.  Type Inference for Polymorphic References , 1990, Inf. Comput..

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

[16]  Gérard Huet,et al.  The CAML primer , 1990 .

[17]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..