Abstract
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.
Preview
Unable to display preview. Download preview PDF.
References
Barendregt, H., Coppo, M. and Dezani-Ciancaglini, M. A Filter Lambda Model and the Completeness of Type Assignment. J. Symbolic Logic 48, 4 (1983). pp 931–940.
Barendregt, H.P. The Lambda Calculus: Its Syntax and Semantics. North Holland, 1981.
Bruce, K. and Meyer, A. A Completeness Theorem for Second-Order Polymorphic Lambda Calculus. These proceedings.
Curry, H.B and Feys, R. Combinatory Logic I. North-Holland, 1958.
Damas, L. and Milner, R. Principal Type Schemes for Functional Programs. 9-th ACM Symposium on Principles of Programming Languages, 1982, pp. 207–212.
Fortune, S., Leivant, D. and O'Donnel, M. The Expressiveness of Simple and Second Order Type Structures. JACM 30, 1 (1983). pp 151–185
Girard, J.-Y. Une extension de l'interpretation de Gödel à l'analyse, et son application à l'élimination des coupures dans l'analyse et la théorie des types. In 2 nd Scandinavian Logic Symp., Fenstad, J.E., Ed., North-Holland, 1971, pp. 63–92.
Haynes, C.T. A Theory of Data Type Representation Independence. Ph.D. Th., Univ. of Iowa, Dept. of Computer Science, 1982. Technical Report 82-04.
Hindley, R. The Principal Type-Scheme of an Object in Combinatory Logic. Trans. AMS 146 (1969). pp 29–60.
Hindley, R. The Completeness Theorem for Typing Lambda Terms. Theor. Comp. Sci. 22 (1983). pp 1–17.
Hindley, R. Curry's Type Rules Are Complete with Respect to the F-Semantics Too. Theor. Comp. Sci. 22 (1983). pp 127–133.
Howard, W. The formulas-as-types notion of construction. In To H.B. Curry: Essays on Combinatory Logic, Lambda-Calculus and Formalism, Seldin, J.P. and J.R. Hindley, Eds., Academic Press, 1980, pp. 479–490.
Leivant, D. Polymorphic Type Inference. Proc. 10-th ACM Symp. on Principles of Programming Languages, 1983, pp. 88–98.
Leivant, D. Structural Semantics for Polymorphic Types. Proc. 10-th ACM Symp. on Principles of Programming Languages, 1983, pp. 155–166.
MacQueen, D. and Sethi, R. A Semantic Model of Types for Applicative Languages. ACM Symp. on LISP and Functional Programming, 1982, pp. 243–252.
MacQueen, D., Plotkin, G and Sethi, R. An Ideal Model for Polymorphic Types. Proc. 11-th ACM Symp. on Principles of Prog. Lang., January, 1984, pp. 165–174.
McCracken, N. An Investigation of a Programming Language with a Polymorphic Type Structure. Ph.D. Th., Syracuse Univ., 1979.
Meyer, A.R. What Is A Model of the Lambda Calculus?. Information and Control 52, 1 (1982). pp 87–122.
Milner, R. A Theory of Type Polymorphism in Programming. JCSS 17 (1978). pp 348–375.
Mitchell, J.C. Combinatory Models of Polymorphic Lambda Calculus. Manuscript (1984).
Mitchell, J.C. Coercion and Type Inference (Summary). Proc. 11-th ACM Symp. on Principles of Programming Languages, January, 1984, pp. 175–185.
Reynolds, J.C. Towards a Theory of Type Structure. Paris Colloq. on Programming, 1974, pp. 408–425.
Wand, M. A Types-as-Sets Semantics for Milner-Style Polymorphism. Proc. 11-th ACM Symp. on Principles of Programming Languages, January, 1984, pp. 158–164.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1984 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mitchell, J. (1984). Type inference and type containment. In: Kahn, G., MacQueen, D.B., Plotkin, G. (eds) Semantics of Data Types. SDT 1984. Lecture Notes in Computer Science, vol 173. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-13346-1_13
Download citation
DOI: https://doi.org/10.1007/3-540-13346-1_13
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-13346-9
Online ISBN: 978-3-540-38891-3
eBook Packages: Springer Book Archive