Embedding type structure in semantics

We show how a programming language designer may embed the type structure of a programming language in the more robust type structure of the typed lambda calculus. This is done by translating programs of the language into terms of the typed lambda calculus. Our translation, however, does not always yield a well-typed lambda term. Programs whose translations are not well-typed are considered meaningless, that is, ill-typed. We give a conditionally type-correct semantics for a simple language with continuation semantics. We provide a set of static type-checking rules for our source language, and prove that they are sound and complete: that is, a program passes the typing rules if and only if its translation is well-typed. This proves the correctness of our static semantics relative to the well-established typing rules of the typed lambda-calculus.

[1]  Michael J. C. Gordon,et al.  The Denotational Description of Programming Languages , 1979, Springer New York.

[2]  Mitchell Wand,et al.  Deriving Target Code as a Representation of Continuation Semantics , 1982, TOPL.

[3]  Mario Coppo,et al.  Completeness of Type Assignment in Continuous Lambda Models , 1984, Theor. Comput. Sci..

[4]  Mitchell Wand,et al.  A types-as-sets semantics for milner-style polymorphism , 1984, POPL.

[5]  Christopher Strachey,et al.  A theory of programming language semantics , 1976 .

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

[7]  Michael J. C. Gordon,et al.  The denotational description of programming languages - an introduction , 1979 .

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

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

[10]  J. Roger Hindley Curry's Type-Rules are Complete with Respect to the F-Semantics too , 1983, Theor. Comput. Sci..

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

[12]  Gino Moretti,et al.  The λ-scheme , 1979 .

[13]  Robert L. Constable,et al.  The Type Theory of PL/CV3 , 1984, TOPL.

[14]  P. Martin-Löf Constructive mathematics and computer programming , 1984 .

[15]  James Hook,et al.  Understanding Russell- A First Attempt , 1984, Semantics of Data Types.

[16]  Gordon Plotkin,et al.  Semantics of Data Types , 1984, Lecture Notes in Computer Science.

[17]  Christopher Strachey,et al.  The varieties of programming language , 1972 .

[18]  Per Martin-Löf,et al.  Constructive mathematics and computer programming , 1984 .

[19]  Mitchell Wand,et al.  A scheme for a higher-level semantic algebra , 1986 .

[20]  Daniel P. Friedman,et al.  Constraining control , 1985, POPL.