Type Inference and Type Containment

Type inference, the process of assigning types to untyped expressions, may be motivated by the design of a typed language or semantical considerations on the meanings of types and expressions. A typed language GR with polymorphic functions leads to the GR inference rules. With the addition of an "oracle" rule for equations between expressions, the GR rules become complete for a general class of semantic models of type inference. These inference models are models of untyped lambda calculus with extra structure similar to models of the typed language GR. A more specialized set of type inference rules, the GRS rules, characterize semantic typing when the functional type σ → τ is interpreted as all elements of the model that map σ to τ and the polymorphic type ∀t.σ(t) is interpreted as the intersection of all σ(τ). Both inference systems may be reformulated using rules for deducing containments between types. The advantage of the type inference rules based on containments is that proofs correspond more closely to the structure of terms.

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

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

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

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

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

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

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

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

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

[10]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

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

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

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

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

[15]  Daniel Leivant,et al.  Structural semantics for polymorphic data types (preliminary report) , 1983, POPL '83.

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

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

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

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