Abstract
In [3] we defined the λ&-calculus, a simple extension of the typed λ-calculus to model typed object-oriented languages. To develop a formal study of type systems for object-oriented languages we define, in this paper, a meta-language based on λ& and we show by a practical example how to use it to prove properties of a language. To this purpose we define a toy object-oriented language and its type-checking algorithm; then we translate this toy language into our meta-language. The translation gives the semantics of the toy language and a theorem on the translation of well-typed programs proves the correction of the type-checker of the toy language.
As an aside we also illustrate the expressivity of the λ&-based model by showing how to translate existing features like multiple inheritance and multiple dispatch, but also by integrating in the toy language new features directly suggested by the model, such as first-class messages, a generalization of the use of super and the use of explicit coercions.
Supported by grant no. 203.01.56 of the Consiglio Nazionale delle Ricerche, Comitato Nazionale delle Scienze Matematiche, Italy, to work at LIENS
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
H.P. Barendregt. The Lambda Calculus Its Syntax and Semantics. North-Holland, 1984. Revised edition.
G. Castagna. F≤ &: integrating parametric and ”ad hoc” second order polymorphism. In Proc. of the 4th International Workshop on Database Programming Languages, Workshops in Computing, New York City, September 1993. Springer-Verlag.
G. Castagna, G. Ghelli, and G. Longo. A calculus for overloaded functions with subtyping, 1992. To appear in Information and Computation. An extended abstract has appeared in the proceedings of the ACM Conference on LISP and Functional Programming, pp. 182–192; San Francisco, June 1992.
G. Castagna, G. Ghelli, and G. Longo. A semantics for λ&-early: a calculus with overloading and early binding. In M. Bezem and J.F. Groote, editors, International Conference on Typed Lambda Calculi and Applications, number 664 in LNCS, pages 107–123, Utrecht, The Netherlands, March 1993. Springer-Verlag. TLCA'93.
W.R. Cook, W.L. Hill, and P.S. Canning. Inheritance is not subtyping. 17th Ann. ACM Symp. on Principles of Programming Languages, January 1990.
G. Ghelli. A static type system for message passing. In Proc. of OOPSLA '91, 1991.
S.K. Keene. Object-Oriented Programming in COMMON LISP: A Programming Guide to CLOS. Addison-Wesley, 1989.
Bertrand Meyer. Object-Oriented Software Construction. Prentice-Hall International Series, 1988.
G.D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1, 1975.
Mitchell Wand. Complete type inference for simple objects. In 2nd Ann. Symp. on Logic in Computer Science, 1987.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Castagna, G. (1993). A meta-language for typed object-oriented languages. In: Shyamasundar, R.K. (eds) Foundations of Software Technology and Theoretical Computer Science. FSTTCS 1993. Lecture Notes in Computer Science, vol 761. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57529-4_43
Download citation
DOI: https://doi.org/10.1007/3-540-57529-4_43
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57529-0
Online ISBN: 978-3-540-48211-6
eBook Packages: Springer Book Archive