Abstract
Record calculi and their type disciplines are of great interest because they can be the basis for modelling object-oriented languages. We present a record calculus that has neither concatenation nor adjunction but is still sufficient for object-oriented languages with top-level classes. The type discipline features extensible record types and recursive types. For the formalization of the type inference algorithm and for the proofs showing its correctness, we use order-sorted logic. The order-sorted formalization is able to incorporate the constraints upon variables occurring in extensible record types. Previous approaches either lacked the principal type property or had to resort to adapting the types to the algorithm. The simplicity of our record calculus gives us principal types without having to make the types more complicated.
Preview
Unable to display preview. Download preview PDF.
References
L. Cardelli. A semantics of multiple inheritance. Lecture Notes in Computer Science, 173:51–67, 1984. revised in: Information and Computation, Vol. 76, 1988, pp. 138–164.
L. Cardelli. Structural subtyping and the notion of power type. In Symposium on Principles of Programming Languages, pages 70–79. ACM, Jan. 1988.
L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv., 17(4):471–522, Dec. 1985.
L. Damas and R. Milner. Principal type-schemes for functional programs. In Symposium on Principles of Programming Languages, pages 207–212. ACM, 1982.
A. V. Hense. Wrapper semantics of an object-oriented programming language with state. In T. Ito and A. R. Meyer, editors, Theoretical Aspects of Computer Software, volume 526 of Lecture Notes in Computer Science, pages 548–568. Springer-Verlag, Sept. 1991.
A. V. Hense. Polymorphic Type Inference for Object-Oriented Programming Languages. Pirrot Verlag, Trierer Str. 7, D-66125 Saarbrücken-Dudweiler, 1994. ISBN 3-930714-00-0.
M. Höhfeld and G. Smolka. Definite relations over constraint languages. LILOG-Report 53, IBM Deutschland, Oct. 1988.
D. MacQueen, G. Plotkin, and R. Sethi. An ideal model for recursive polymorphic types. Information and Control, 71:95–130, 1986.
M. J. Maher. Complete axiomatizations of the algebras of finite, rational and infinite trees. In Logic in Computer Science, Edinburgh, 1988.
J. C. Mitchell. Coercion and type inference. In Symposium on Principles of Programming Languages. ACM, 1984.
D. Rémy. Typechecking records and variants in a natural extension of ML. In Symposium on Principles of Programming Languages, pages 77–88. ACM, 1989.
D. Rémy. Typing record concatenation for free. In Symposium on Principles of Programming Languages, pages 166–176. ACM, 1992.
G. Smolka, W. Nutt, J. Goguen, and J. Meseguer. Order-Sorted Equational Computation, volume 2 of Resolution of Equations in Algebraic Structures, chapter 10, pages 297–367. Academic Press, 1989.
R. Stansifer. Type inference with subtypes. In Symposium on Principles of Programming Languages, pages 88–97. ACM, Jan. 1988.
J.-P. Talpin and P. Jouvelot. The type and effect discipline. In Logic in Computer Science, pages 162–173, 1992.
M. Tofte. Type inference for polymorphic references. Information and Computation, 89(1): 1–34, 1990.
M. Wand. Complete type inference for simple objects. In Logic in Computer Science, pages 37–44, 1987.
M. Wand. Type inference for record concatenation and multiple inheritance. Information and Computation, 93(1):1–15, July 1991.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hense, A.V., Smolka, G. (1994). A record calculus with principal types. In: Jouannaud, JP. (eds) Constraints in Computational Logics. CCL 1994. Lecture Notes in Computer Science, vol 845. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0016856
Download citation
DOI: https://doi.org/10.1007/BFb0016856
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58403-2
Online ISBN: 978-3-540-48699-2
eBook Packages: Springer Book Archive