Polymorphic typing of an algorithmic language

The polymorphic type discipline, as in the ML language, fits well within purely applicative languages, but does not extend naturally to the main feature of algorithmic languages : in-place update of data structures. Similar typing difficulties arise with other extensions of applicative languages : logical variables, communication channels, continuation handling. This work studies (in the setting of relational semantics) two new approaches to the polymorphic typing of these non-applicative features. The first one relies on a restriction of generalization over types (the notion of dangerous variables), and on a refined typing of functional values (closure typing). The resulting type system is compatible with the ML core language, and is the most expressive type systems for ML with imperative features proposed so far. The second approach relies on switching to "by-name" semantics for the constructs of polymorphism, instead of the usual "by-value" semantics. The resulting language differs from ML, but lends itself easily to polymorphic typing. Both approaches smoothly integrate non-applicative features and polymorphic typing.

[1]  Mitchell Wand,et al.  Continuation-Based Multiprocessing , 1980, High. Order Symb. Comput..

[2]  Vincent Poirriez Integration de fonctionnalites logiques dans un langage fonctionnel fortement type : mlog une extension , 1991 .

[3]  Luca Cardelli,et al.  Basic Polymorphic Typechecking , 1987, Sci. Comput. Program..

[4]  Lennart Augustsson,et al.  A compiler for lazy ML , 1984, LFP '84.

[5]  Lawrence C. Paulson,et al.  ML for the working programmer , 1991 .

[6]  P. J. Landin,et al.  The next 700 programming languages , 1966, CACM.

[7]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential Control , 1987, Theor. Comput. Sci..

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

[9]  John C. Reynolds,et al.  Preliminary design of the programming language Forsythe , 1988 .

[10]  Vladimir Vladimirovich Nabokov,et al.  Ada or Ardor: A Family Chronicle , 1969 .

[11]  John C. Reynolds,et al.  Three Approaches to Type Structure , 1985, TAPSOFT, Vol.1.

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

[13]  Simon L. Peyton Jones,et al.  Report on the programming language Haskell: a non-strict, purely functional language version 1.2 , 1992, SIGP.

[14]  Dominique Clément,et al.  A simple applicative language: mini-ML , 1986, LFP '86.

[15]  Pierre-Louis Curien,et al.  The Categorical Abstract Machine , 1987, Sci. Comput. Program..

[16]  Francois M. Rouaix Alcool-90. Typage de la surcharge dans un langage fonctionnel , 1990 .

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

[18]  Robin Milner,et al.  Co-Induction in Relational Semantics , 1991, Theor. Comput. Sci..

[19]  David Berry The Edinburgh SML Library , 1991 .

[20]  Mitchell Wand,et al.  Obtaining Coroutines with Continuations , 1986, Comput. Lang..

[21]  Prateek Mishra,et al.  Type Inference with Subtypes , 1990, Theoretical Computer Science.

[22]  Gordon D. Plotkin,et al.  An ideal model for recursive polymorphic types , 1984, Inf. Control..

[23]  Pierre Jouvelot,et al.  Algebraic reconstruction of types and effects , 1991, POPL '91.

[24]  David K. Gifford,et al.  Integrating functional and imperative programming , 1986, LFP '86.

[25]  David B. MacQueen Modules for standard ML , 1984, LFP '84.

[26]  Bent Thomsen,et al.  A calculus of higher order communicating systems , 1989, POPL '89.

[27]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[28]  D. A. Turner,et al.  Miranda: A Non-Strict Functional language with Polymorphic Types , 1985, FPCA.

[29]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[30]  P. J. Landin The Mechanical Evaluation of Expressions , 1964, Comput. J..

[31]  Mitchell Wand,et al.  Complete Type Inference for Simple Objects , 1987, LICS.

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

[33]  Gérard Berry,et al.  The chemical abstract machine , 1989, POPL '90.

[34]  Daniel Le Métayer,et al.  A new computational model and its discipline of programming , 1986 .

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

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

[37]  Carl Ponder,et al.  Are applicative languages inefficient? , 1988, SIGP.

[38]  John C. Mitchell,et al.  ML with extended pattern matching and subtypes , 1988, LISP and Functional Programming.

[39]  Hassan Aït-Kaci,et al.  Integrating logic and functional programming , 1989, LISP Symb. Comput..

[40]  Robert Harper Introduction to standard ml , 1986 .

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

[42]  John H. Reppy,et al.  CML: A Higher-Order Concurrent Language , 1991, PLDI.

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

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

[45]  Pierre Jouvelot,et al.  The type and effect discipline , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[46]  Amy P. Felty,et al.  The Coq proof assistant user's guide : version 5.6 , 1990 .

[47]  Pierre Weis,et al.  The CAML reference manual , 1990 .

[48]  Patrick Cousot,et al.  Inductive definitions, semantics and abstract interpretations , 1992, POPL '92.

[49]  Robert Harper,et al.  Typing first-class continuations in ML , 1991, POPL '91.

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

[51]  Flemming Nielson,et al.  The Typed lambda-Calculus with First-Class Processes , 1989, PARLE.

[52]  John C. Mitchell,et al.  Polymorphic unification and ML typing , 1989, POPL '89.

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

[54]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[55]  Gilles Kahn,et al.  The Semantics of a Simple Language for Parallel Programming , 1974, IFIP Congress.

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

[57]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[58]  Gilles Kahn,et al.  Coroutines and Networks of Parallel Processes , 1977, IFIP Congress.

[59]  Robin Milner,et al.  A semantics for ML concurrency primitives , 1992, POPL '92.

[60]  Xavier Leroy,et al.  The ZINC experiment : an economical implementation of the ML language , 1990 .

[61]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential State , 1989, Theor. Comput. Sci..

[62]  Xavier Leroy,et al.  Polymorphic type inference and assignment , 1991, POPL '91.