Extensible records in a pure calculus of subtyping

Extensible records were introduced by Mitchell Wand while studying type inference in a polymorphic λ-calculus with record types. This paper describes a calculus with extensible records, F <: ρ, that can be translated into a simpler calculus, F <: , lacking any record primitives. Given independent axiomatizations of F <: ρ and F <: (the former being an extension of the latter) we show that the translation preserves typing, subtyping, and equality. F <: ρ can then be used as an expressive calculus of extensible records, either directly or to give meaning to yet other languages. We show that F <: ρ can express many of the standard benchmark examples that appear in the literature. Like other record calculi that have been proposed, F <: ρ has a rather complex set of rules but, unlike those other calculi, its rules are justified by a translation to a very simple calculus. We argue that thinking in terms of translations may help in simplifying and organizing the various record calculi that have been proposed, as well as in generating new ones.

[1]  J. Fenstad Second Scandinavian Logic Symposium , 1971 .

[2]  J. Girard Une Extension De ĽInterpretation De Gödel a ĽAnalyse, Et Son Application a ĽElimination Des Coupures Dans ĽAnalyse Et La Theorie Des Types , 1971 .

[3]  de Ng Dick Bruijn Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

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

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

[6]  Corrado Böhm,et al.  Automatic Synthesis of Typed Lambda-Programs on Term Algebras , 1985, Theor. Comput. Sci..

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

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

[9]  Luca Cardelli,et al.  A Semantics of Multiple Inheritance , 1984, Information and Computation.

[10]  李幼升,et al.  Ph , 1989 .

[11]  Mitchell Wand,et al.  Type inference for record concatenation and multiple inheritance , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[12]  John C. Mitchell,et al.  F-bounded polymorphism for object-oriented programming , 1989, FPCA.

[13]  Didier Rémy,et al.  Type checking records and variants in a natural extension of ML , 1989, POPL '89.

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

[15]  William R. Cook,et al.  A denotational semantics of inheritance , 1989 .

[16]  Jon Fairbairn,et al.  Some types with inclusion properties in ∀, →, μ , 1989 .

[17]  Giorgio Ghelli,et al.  Coherence of Subsumption , 1990, CAAP.

[18]  Luca Cardelli,et al.  An Extension of System F with Subtyping , 1994, Inf. Comput..

[19]  Luca Cardelli,et al.  Operations on records , 1989, Mathematical Structures in Computer Science.

[20]  Mitchell Wand,et al.  Type inference for record concatenation and multiple inheritance , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

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

[22]  Didier Rémy,et al.  Typing record concatenation for free , 1992, POPL '92.

[23]  Giorgio Ghelli,et al.  Coherence of Subsumption, Minimum Typing and Type-Checking in F<= , 1992, Math. Struct. Comput. Sci..

[24]  Luca Cardelli,et al.  Subtyping recursive types , 1993 .

[25]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[26]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .