The Semantics of Second-Order Lambda Calculus

Abstract In the second-order (polymorphic) typed lambda calculus, lambda abstraction over type variables leads to terms denoting polymorphic functions. Straightforward cardinality considerations show that a naive set-theoretic interpretation of the calculus is impossible. We give two definitions of semantic models for this language and prove them equivalent. Our syntactical “environment model” definition and a more algebraic “combinatory model” definition for the polymorphic calculus correspond to analogous model definitions for untyped lambda calculus. Soundness and completeness theorems are proved using the environment model definition. We verify that some specific interpretations of the calculus proposed in the literature indeed yield models in our sense.

[1]  Ravi Sethi,et al.  A semantic model of types for applicative languages , 1982, LFP '82.

[2]  John C. Mitchell,et al.  Representation independence and data abstraction , 1986, POPL '86.

[3]  Val Tannen,et al.  Lambda Calculus with Constrained Types (Extended Abstract) , 1985, Logic of Programs.

[4]  Mariangiola Dezani-Ciancaglini,et al.  A filter lambda model and the completeness of type assignment , 1983, Journal of Symbolic Logic.

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

[6]  E. Lohse,et al.  A Correspondence Between ALGOL 60 and Church's Lambda- Notation: Part I* , 1965 .

[7]  George Gratzer,et al.  Universal Algebra , 1979 .

[8]  Daniel Leivant,et al.  The Expressiveness of Simple and Second-Order Type Structures , 1983, JACM.

[9]  James E. Donahue On the Semantics of "Data Type" , 1977, SIAM J. Comput..

[10]  John C. Mitchell,et al.  Semantic Models for Second-Order Lambda Calculus , 1984, FOCS.

[11]  Kim B. Bruce,et al.  Provable isomorphisms and domain equations in models of typed languages , 1985, STOC '85.

[12]  Nancy J. McCracken A finitary retract model for the polymorphic lambda-calculus , 1982 .

[13]  Christiaan Peter Jozef Koymans,et al.  Models of the Lambda Calculus , 1982, Inf. Control..

[14]  Nancy Jean Mccracken,et al.  An investigation of a programming language with a polymorphic type structure. , 1979 .

[15]  Per Martin-Löuf About Models for Intuitionistic Type Theories and the Notion of Definitional Equality , 1975 .

[16]  de Ng Dick Bruijn,et al.  A survey of the project Automath , 1980 .

[17]  Simon Martini Bounded quantifiers have interval models , 1988, LFP '88.

[18]  Joseph R. Shoenfield,et al.  Mathematical logic , 1967 .

[19]  R. Statman Number theoretic functions computable by polymorphic programs , 1981, 22nd Annual Symposium on Foundations of Computer Science (sfcs 1981).

[20]  Gérard P. Huet The Calculus of Constructions: State of the Art , 1987, FSTTCS.

[21]  J. Roger Hindley,et al.  The Completeness Theorem for Typing lambda-Terms , 1983, Theor. Comput. Sci..

[22]  John C. Shepherdson,et al.  Effective operations on partial recursive functions , 1955 .

[23]  Andrew M. Pitts,et al.  Polymorphism is Set Theoretic, Constructively , 1987, Category Theory and Computer Science.

[24]  Kim B. Bruce,et al.  The Finitary Projection Model for Second Order Lambda Calculus and Solutions to Higher Order Domain Equations , 1986, LICS.

[25]  M. M. Fokkinga On the notion of strong typing , 1981 .

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

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

[28]  Robin Milner,et al.  Fully Abstract Models of Typed lambda-Calculi , 1977, Theor. Comput. Sci..

[29]  José Meseguer,et al.  Relating models of polymorphism , 1989, POPL '89.

[30]  John C. Mitchell,et al.  Second-Order Logical Relations (Extended Abstract) , 1985, Logic of Programs.

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

[32]  Richard Statman,et al.  Empty types in polymorphic lambda calculus , 1987, POPL '87.

[33]  Craig Schaffert,et al.  CLU Reference Manual , 1984, Lecture Notes in Computer Science.

[34]  Nancy McCracken,et al.  The Typechecking of Programs with Implicit Type Structure , 1984, Semantics of Data Types.

[35]  K. Brown,et al.  Graduate Texts in Mathematics , 1982 .

[36]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[37]  Daniel Leivant Structural Semantics for Polymorphic Data Types. , 1983 .

[38]  Joseph Y. Halpern,et al.  From Denotational to Operational and Axiomatic Semantics for ALGOL-like Languages: an Overview , 1983, Logic of Programs.

[39]  Hendrik Pieter Barendregt,et al.  Semantics for Classical AUTOMATH and Related Systems , 1984, Inf. Control..

[40]  Albert R. Meyer,et al.  What is a Model of the Lambda Calculus? , 1982, Inf. Control..

[41]  Jean-Yves Girard,et al.  The System F of Variable Types, Fifteen Years Later , 1986, Theor. Comput. Sci..

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

[43]  Richard Statman,et al.  The typed λ-calculus is not elementary recursive , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[44]  Christopher T. Haynes A Theory of Data Type Representation Independence , 1984, Semantics of Data Types.

[45]  Gordon D. Plotkin,et al.  An Ideal Model for Recursive Polymorphic Types , 1986, Inf. Control..

[46]  Glynn Winskel,et al.  Domain Theoretic Models of Polymorphism , 1989, Inf. Comput..

[47]  H. Friedman Equality between functionals , 1975 .

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

[49]  Michael Beeson,et al.  Recursive models for constructive set theories , 1982, Ann. Math. Log..

[50]  A. Troelstra Metamathematical investigation of intuitionistic arithmetic and analysis , 1973 .

[51]  Kim B. Bruce,et al.  A modest model of records, inheritance and bounded quantification , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

[52]  William W. Wadge,et al.  Data Types as Objects , 1977, ICALP.

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

[54]  John C. Mitchell,et al.  Kripke-Style Models for Typed lambda Calculus , 1991, Ann. Pure Appl. Log..

[55]  R. Statman Equality between Functionals Revisited , 1985 .

[56]  Mario Coppo,et al.  Type inference and logical relations , 1986, LICS.

[57]  Desmond Fearnley-Sander,et al.  Universal Algebra , 1982 .

[58]  Thierry Coquand,et al.  Inheritance and explicit coercion , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

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

[60]  Leon Henkin,et al.  Completeness in the theory of types , 1950, Journal of Symbolic Logic.

[61]  Albert R. Meyer,et al.  "Type" is not a type , 1986, POPL '86.

[62]  John C. Mitchell,et al.  Polymorphic Type Inference and Containment , 1988, Inf. Comput..

[63]  Daniel Leivant,et al.  Polymorphic type inference , 1983, POPL '83.

[64]  R. A. G. Seely,et al.  Categorical semantics for higher order polymorphic lambda calculus , 1987, Journal of Symbolic Logic.

[65]  Kim B. Bruce,et al.  A Modest Model of Records, Inheritance and Bounded Quantification , 1990, Inf. Comput..

[66]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..