A Syntactic Approach to Type Soundness

We present a new approach to proving type soundness for Hindley/Milner-style polymorphic type systems. The keys to our approach are (1) an adaptation of subject reduction theorems from combinatory logic to programming languages, and (2) the use of rewriting techniques for the specification of the language semantics. The approach easily extends from polymorphic functional languages to imperative languages that provide references, exceptions, continuations, and similar features. We illustrate the technique with a type soundness theorem for the core of Standard ML, which includes the first type soundness proof for polymorphic exceptions and continuations.

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

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

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

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

[5]  Jonathan P. Seldin,et al.  A sequent calculus for type assignment , 1977, Journal of Symbolic Logic.

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

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

[8]  Matthias Felleisen,et al.  On the Expressive Power of Programming Languages , 1990, European Symposium on Programming.

[9]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.

[10]  Matthias Felleisen,et al.  The theory and practice of first-class prompts , 1988, POPL '88.

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

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

[13]  H. B. Curry,et al.  Combinatory Logic, Volume I. , 1961 .

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

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

[16]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[17]  Martín Abadi,et al.  Dynamic typing in a statically-typed language , 1989, POPL '89.

[18]  Carolyn L. Talcott,et al.  Programming, Transforming, and Providing with Function Abstractions and Memories , 1989, ICALP.

[19]  Dana S. Scott,et al.  Data Types as Lattices , 1976, SIAM J. Comput..

[20]  Alan J. Demers,et al.  Data types are values , 1985, ACM Trans. Program. Lang. Syst..

[21]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[22]  R. Hindley The Principal Type-Scheme of an Object in Combinatory Logic , 1969 .

[23]  J. Roger Hindley,et al.  Introduction to combinators and λ-calculus , 1986, Acta Applicandae Mathematicae.

[24]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[25]  Andrew K. Wright Typing References by Effect Inference , 1992, ESOP.

[26]  John H. Reppy,et al.  Higher-Order Concurrency , 1992 .

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

[28]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

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

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

[31]  Robin Milner,et al.  Commentary on standard ML , 1990 .

[32]  John C. Reynolds,et al.  On the Relation between Direct and Continuation Semantics , 1974, ICALP.

[33]  Matthias Felleisen,et al.  Parameter-passing and the lambda calculus , 1991, POPL '91.

[34]  Matthias Felleisen,et al.  Control operators, the SECD-machine, and the λ-calculus , 1987, Formal Description of Programming Concepts.

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

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

[37]  William D. Clinger,et al.  Revised3 report on the algorithmic language scheme , 1986, SIGP.