Abstract
System F is a well-known typed λ-calculus with polymorphic types, which provides a basis for polymorphic programming languages. We study an extension of F, called F <:, that combines parametric polymorphism with subtyping.
The main focus of the paper is the equational theory of F <:, which is related to PER models and the notion of parametricity. We study some categorical properties of the theory when restricted to closed terms, including interesting categorical isomorphisms. We also investigate proof-theoretical properties, such as the conservativity of typing judgments with respect to F.
We demonstrate by a set of examples how a range of constructs may be encoded in F <:. These include record operations and subtyping hierarchies that are related to features of object-oriented languages.
This author is partially supported by the CNR-Stanford collaboration grant 89.00002.26.
This author is partially supported by the ONR Contract N00014-88-K-0635 and by NSF Grant CCR-87-05596.
Simone Martini and Andre Scedrov would like to thank John C. Mitchell, the Computer Science Department, and the Center for the Study of Language and Information at Stanford University for their hospitality during those authors' extended stay in 1989–1990, when much of this research was done.
Luca Cardelli and Simone Martini would like to thank Pierre-Louis Curien, Giorgio Ghelli, and Giuseppe Longo for many stimulating discussions related to this work. In particular, Curien helped in the early proof of Top ∼ ∃(X)X.
Preview
Unable to display preview. Download preview PDF.
References
S. Abramsky, J.C. Mitchell, A.Scedrov, P.Wadler: Relators, to appear.
C. Böhm, A. Berarducci: Automatic synthesis of typed λ-programs on term algebras, Theoretical Computer Science, 39, pp. 135–154, 1985.
E.S. Bainbridge, P.J. Freyd, A. Scedrov, P.J. Scott: Functorial polymorphism, Theoretical Computer Science, vol.70, no.1, pp 35–64, 1990.
K.B. Bruce, G. Longo: A modest model of records, inheritance and bounded quantification, Information and Computation, 87(1/2):196–240, 1990.
L. Cardelli: A semantics of multiple inheritance, in Information and Computation 76, pp 138–164, 1988.
L.Cardelli: Extensible records in a pure calculus of subtyping, to appear.
L.Cardelli, G.Longo: A semantic basis for Quest, Proceedings of the 6th ACM LISP and Functional Programming Conference, ACM Press, 1990.
L.Cardelli, J.C.Mitchell: Operations on records, Proc. of the Fifth Conference on Mathematical Foundations of Programming Language Semantics, New Orleans, 1989. To appear in Mathematical Structures in Computer Science, 1991.
L. Cardelli, P. Wegner: On understanding types, data abstraction and polymorphism, Computing Surveys, Vol 17 n. 4, pp 471–522, December 1985.
P.-L.Curien, G.Ghelli: Coherence of subsumption, Mathematical Structures in Computer Science, to appear.
P.-L.Curien, G.Ghelli: Subtyping + extensionality: confluence of βη-reductions in F ≤, to appear.
N.G. de Bruijn: Lambda-calculus notation with nameless dummies, in Indag. Math. 34(5), pp. 381–392, 1972.
J.Fairbairn: Some types with inclusion properties in ∀, →, μ, Technical report No 171, University of Cambridge, Computer Laboratory.
P.J.Freyd: Structural polymorphism, to appear in TCS.
G.Ghelli: Proof theoretic studies about a mininal type system integrating inclusion and parametric polymorphism, Ph.D. Thesis TD-6/90, Università di Pisa, Dipartimento di Informatica, 1990.
J-Y.Girard: Une extension de l'interprétation de Gödel à l'analyse, et son application à l'élimination des coupures dans l'analyse et la théorie des types, Proceedings of the second Scandinavian logic symposium, J.E.Fenstad Ed. pp. 63–92, North-Holland, 1971.
J.Lambek, P.J.Scott: Introduction to higher order categorical logic, Cambridge University Press, 1986.
J.C.Mitchell: A type inference approach to reduction properties and semantics of polymorphic expressions, Logical Foundations of Functional Programming, ed. G. Huet, Addison-Wesley, 1990.
J.C. Mitchell, P.J. Scott: Typed λ-models and cartesian closed categories, in Categories in Computer Science and Logic, J.W. Gray and A.Scedrov Eds. Contemporary Math. vol. 92, Amer. Math. Soc., pp 301–316, 1989.
A.M. Pitts: Polymorphism is set-theoretic, constructively, in Category Theory and Computer Science, Proceedings Edinburgh 1987, D.H.Pitt, A.Poigne, and D.E.Rydeheard Eds. Springer Lecture Notes in Computer Science, vol. 283, pp 12–39, 1987.
J.C.Reynolds: Towards a theory of type structure, in Colloquium sur la programmation pp. 408–423, Springer-Verlag Lecture Notes in Computer Science, n.19, 1974.
J.C. Reynolds: Types, abstraction, and parametric polymorphism, in Information Processing '83, pp 513–523, R.E.A. Mason ed., North Holland, Amsterdam, 1983.
A.Scedrov: A guide to polymorphic types, in Logic and Computer Science, pp 387–420, P.Odifreddi ed., Academic Press, 1990.
C.Strachey: Fundamental concepts in programming languages, lecture notes for the International Summer School in Computer Programming, Copenhagen, August 1967.
P.Wadler: Theorems for free!, Proc. of the Fourth International Conference on Fuctional Programming and Computer Architecture, ACM Press, 1989.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cardelli, L., Martini, S., Mitchell, J.C., Scedrov, A. (1991). An extension of system F with subtyping. In: Ito, T., Meyer, A.R. (eds) Theoretical Aspects of Computer Software. TACS 1991. Lecture Notes in Computer Science, vol 526. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54415-1_73
Download citation
DOI: https://doi.org/10.1007/3-540-54415-1_73
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54415-9
Online ISBN: 978-3-540-47617-7
eBook Packages: Springer Book Archive