Programming in higher-order typed lambda-calculi

Typed A-calculi have been objects of theoretical study for many years. Recently, it has been shown that all the inductively defined types (including numbers, booleans, lists, and trees, as well as more complex structures like typed terms and proofs) can be represented in higher-order A-calculi with no built-in types or type constructors. This raises the possibility of designing practical programming languages based on pure typed A-calculi. This tutorial presents a hierarchy of increasingly powerful languages, beginning with Church's simply typed A-calculus (F x ) and the second-order polymorphic A-calculus of Girard and Reynolds, and culminating in a fragment of Girard's o>-order polymorphic A-calculus (F^) . Our focus throughout is on the unusual style of programming that arises in these languages, where all functions are total and the primary control construct is iteration rather than general recursion. This work was supported in part by the Office of Naval Research and the Defense Advanced Research Projects Agency (DOD) under contract number N00014-84-K-0415 The contained in this document are those of the authors and . J ^ U S ^ ^ ^ the official policies, either expressed or implied, of DARPA or the U.S. Government. r e p r e S e n t m g

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

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

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

[4]  Christine Paulin-Mohring,et al.  Extracting ω's programs from proofs in the calculus of constructions , 1989, POPL '89.

[5]  Gérard P. Huet,et al.  A Unification Algorithm for Typed lambda-Calculus , 1975, Theor. Comput. Sci..

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

[7]  Hans-Juergen Boehm Partial Polymorphic Type Inference Is Undecidable , 1985, FOCS.

[8]  Thierry Coquand,et al.  The Calculus of Constructions , 1988, Inf. Comput..

[9]  Richard Statman,et al.  Typed lambda calculus , 1977 .

[10]  J. Roger Hindley,et al.  Introduction to Combinators and Lambda-Calculus , 1986 .

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

[12]  Peter Lee,et al.  LEAP: A Language with Eval And Polymorphism , 1989, TAPSOFT, Vol.2.

[13]  Gérard Huet A uniform approach to type theory , 1990 .

[14]  Warren D. Goldfarb,et al.  The Undecidability of the Second-Order Unification Problem , 1981, Theor. Comput. Sci..

[15]  John Mitchell,et al.  Type Inference and Type Containment , 1984, Semantics of Data Types.

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

[17]  Daniel Leivant Reasoning about functional programs and complexity classes associated with type disciplines , 1983, 24th Annual Symposium on Foundations of Computer Science (sfcs 1983).

[18]  L. Cardelli A Polymorphic λ-calculus with Type:Type , 1986 .

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

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

[21]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[22]  Haskell B. Curry,et al.  Combinatory Logic, Volume I , 1959 .

[23]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[24]  Bengt Nordström,et al.  Programming in Martin-Löf's Type Theory , 1990 .

[25]  P. Martin-Löf Hauptsatz for the Intuitionistic Theory of Iterated Inductive Definitions , 1971 .

[26]  Frank Pfenning,et al.  Partial polymorphic type inference and higher-order unification , 1988, LISP and Functional Programming.

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

[28]  Jørgen Steensgaard-Madsen,et al.  Typed representation of objects by functions , 1989, TOPL.

[29]  Frank Pfenning,et al.  Inductively Defined Types in the Calculus of Constructions , 1989, Mathematical Foundations of Programming Semantics.

[30]  J. Gallier On Girard's "Candidats de Reductibilité" , 1989 .

[31]  Frank Pfenning,et al.  A language with eval and polymorphism , 1989 .

[32]  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 .

[33]  A. Church The calculi of lambda-conversion , 1941 .

[34]  William A. Howard,et al.  The formulae-as-types notion of construction , 1969 .

[35]  M.N. Sastry,et al.  Structure and interpretation of computer programs , 1986, Proceedings of the IEEE.

[36]  Frank Pfenning,et al.  Program development through proof transformation , 1988 .

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

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

[39]  C. Yates Recursive Functions , 1970, Nature.

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

[41]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

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

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

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