Skip to main content

A record calculus with principal types

  • Conference paper
  • First Online:
Constraints in Computational Logics (CCL 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 845))

Included in the following conference series:

  • 127 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. L. Cardelli. Structural subtyping and the notion of power type. In Symposium on Principles of Programming Languages, pages 70–79. ACM, Jan. 1988.

    Google Scholar 

  3. L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. ACM Comput. Surv., 17(4):471–522, Dec. 1985.

    Google Scholar 

  4. L. Damas and R. Milner. Principal type-schemes for functional programs. In Symposium on Principles of Programming Languages, pages 207–212. ACM, 1982.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. M. Höhfeld and G. Smolka. Definite relations over constraint languages. LILOG-Report 53, IBM Deutschland, Oct. 1988.

    Google Scholar 

  8. D. MacQueen, G. Plotkin, and R. Sethi. An ideal model for recursive polymorphic types. Information and Control, 71:95–130, 1986.

    Google Scholar 

  9. M. J. Maher. Complete axiomatizations of the algebras of finite, rational and infinite trees. In Logic in Computer Science, Edinburgh, 1988.

    Google Scholar 

  10. J. C. Mitchell. Coercion and type inference. In Symposium on Principles of Programming Languages. ACM, 1984.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. D. Rémy. Typing record concatenation for free. In Symposium on Principles of Programming Languages, pages 166–176. ACM, 1992.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. R. Stansifer. Type inference with subtypes. In Symposium on Principles of Programming Languages, pages 88–97. ACM, Jan. 1988.

    Google Scholar 

  15. J.-P. Talpin and P. Jouvelot. The type and effect discipline. In Logic in Computer Science, pages 162–173, 1992.

    Google Scholar 

  16. M. Tofte. Type inference for polymorphic references. Information and Computation, 89(1): 1–34, 1990.

    Google Scholar 

  17. M. Wand. Complete type inference for simple objects. In Logic in Computer Science, pages 37–44, 1987.

    Google Scholar 

  18. M. Wand. Type inference for record concatenation and multiple inheritance. Information and Computation, 93(1):1–15, July 1991.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jean-Pierre Jouannaud

Rights and permissions

Reprints 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

Publish with us

Policies and ethics