Skip to main content

The Essence of Principal Typings

  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 2002)

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

Included in the following conference series:

Abstract

Let S be some type system. A typing in S for a typable term M is the collection of all of the information other than M which appears in the final judgement of a proof derivation showing that M is typable. For example, suppose there is a derivation in S ending with the judgement AM: τ meaning that M has result type τ when assuming the types of free variables are given by A. Then (A, τ) is a typing for M. A principal typing in S for a term M is a typing for M which somehow represents all other possible typings in S for M. It is important not to confuse this with a weaker notion in connection with the Hindley/Milner type system often called “principal types”. Previous definitions of principal typings for specific type systems have involved various syntactic operations on typings such as substitution of types for type variables, expansion, lifting, etc.

This paper presents a new general definition of principal typings which does not depend on the details of any particular type system. This paper shows that the new general definition correctly generalizes previous system-dependent definitions. This paper explains why the new definition is the right one. Furthermore, the new definition is used to prove that certain polymorphic type systems using ∀-quantifiers, namely System F and the Hindley/Milner system, do not have principal typings.

All proofs can be found in a longer version available at the author’s home page.

This work was partly supported by EC FP5 grant IST-2001-33477, EPSRC grants GR/L 36963 and GR/R 41545, NATO grant CRG 971607, NSF grants 9806745, 9988529, and 0113193, and Sun Microsystems grant EDUD-7826-990410-US.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. A. Banerjee. A modular, polyvariant, and type-based closure analysis. In Proc. 1997 Int’l Conf. Functional Programming. ACM Press, 1997.

    Google Scholar 

  2. M. Coppo, M. Dezani-Ciancaglini, B. Venneri. Principal type schemes and λ-calculus semantics. In J. P. Seldin, eds. To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism. Academic Press, 1980 Hindley and Seldin [10].

    Google Scholar 

  3. M. Coppo, M. Dezani-Ciancaglini, B. Venneri. Functional characters of solvable terms. Z. Math. Logik Grundlag. Math., 27(1), 1981.

    Google Scholar 

  4. M. Coppo, P. Giannini. A complete type inference algorithm for simple intersection types. In 17th Colloq. Trees in Algebra and Programming, vol. 581 of LNCS. Springer-Verlag, 1992.

    Google Scholar 

  5. H. B. Curry, R. Feys. Combinatory Logic I. Studies in Logic and the Foundations of Mathematics. North-Holland, Amsterdam, 1958.

    Google Scholar 

  6. L. Damas, R. Milner. Principal type schemes for functional programs. In Conf. Rec. 9th Ann. ACM Symp. Princ. of Prog. Langs., 1982.

    Google Scholar 

  7. J.-Y. Girard. Interprétation Fonctionnelle et Elimination des Coupures de l’Arithmétique d’Ordre Supérieur. Thèse d’Etat, Université de Paris VII, 1972.

    Google Scholar 

  8. R. Harper, J. C. Mitchell. On the type structure of Standard ML. ACM Trans. on Prog. Langs. & Systs., 15(2), 1993.

    Google Scholar 

  9. J. R. Hindley. Basic Simple Type Theory, vol. 42 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1997.

    Google Scholar 

  10. J. R. Hindley, J. P. Seldin, eds. To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism. Academic Press, 1980.

    Google Scholar 

  11. B. Jacobs, I. Margaria, M. Zacchi. Filter models with polymorphic types. Theoret. Comput. Sci., 95, 1992.

    Google Scholar 

  12. T. Jensen. Inference of polymorphic and conditional strictness properties. In POPL’ 98[23].

    Google Scholar 

  13. T. Jim. What are principal typings and what are they good for? Tech. memo. MIT/LCS/TM-532, MIT, 1995.

    Google Scholar 

  14. T. Jim. What are principal typings and what are they good for? In Conf. Rec. POPL’ 96: 23rd ACM Symp. Princ. of Prog. Langs., 1996.

    Google Scholar 

  15. A. J. Kfoury, H. G. Mairson, F. A. Turbak, J. B. Wells. Relating typability and expressibility in finite-rank intersection type systems. In Proc. 1999 Int’l Conf. Functional Programming. ACM Press, 1999.

    Google Scholar 

  16. A. J. Kfoury, J. B. Wells. A direct algorithm for type inference in the rank-2 fragment of the second-order λ-calculus. In Proc. 1994 ACM Conf. LISP Funct. Program., 1994.

    Google Scholar 

  17. A. J. Kfoury, J. B. Wells. Principality and decidable type inference for finite-rank intersection types. In Conf. Rec. POPL’ 99: 26th ACM Symp. Princ. of Prog. Langs., 1999.

    Google Scholar 

  18. D. Leivant. Polymorphic type inference. In Conf. Rec. 10th Ann. ACM Symp. Princ. of Prog. Langs., 1983.

    Google Scholar 

  19. R. Milner. A theory of type polymorphism in programming. J. Comput. System Sci., 17, 1978.

    Google Scholar 

  20. R. Milner, M. Tofte, R. Harper, D. B. MacQueen. The Definition of Standard ML (Revised). MIT Press, 1997.

    Google Scholar 

  21. J. H. Morris. Lambda-calculus Models of Programming Languages. PhD thesis, Massachusetts Institute of Technology, Cambridge, Mass., U.S.A., 1968.

    Google Scholar 

  22. B. Pierce. Bounded quantification is undecidable. Inform. & Comput., 112, 1994.

    Google Scholar 

  23. Conf. Rec. POPL’ 98: 25th ACM Symp. Princ. of Prog. Langs., 1998.

    Google Scholar 

  24. G. Pottinger. A type assignment for the strongly normalizable λ-terms. In J. P. Seldin, eds. To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism. Academic Press, 1980 Hindley and Seldin [10].

    Google Scholar 

  25. J. C. Reynolds. Towards a theory of type structure. In Colloque sur la Programmation, vol. 19 of LNCS, Paris, France, 1974. Springer-Verlag.

    Google Scholar 

  26. S. Ronchi Della Rocca. Principal type schemes and unification for intersection type discipline. Theoret. Comput. Sci., 59(1–2), 1988.

    Google Scholar 

  27. S. Ronchi Della Rocca, B. Venneri. Principal type schemes for an extended type theory. Theoret. Comput. Sci., 28(1–2), 1984.

    Google Scholar 

  28. A. Schubert. Second-order unification and type inference for Church-style polymorphism. In POPL’ 98[23].

    Google Scholar 

  29. P. Urzyczyn. Type reconstruction in Fω. Math. Structures Comput. Sci., 7(4), 1997.

    Google Scholar 

  30. S. J. van Bakel. Intersection Type Disciplines in Lambda Calculus and Applicative Term Rewriting Systems. PhD thesis, Catholic University of Nijmegen, 1993.

    Google Scholar 

  31. S. J. van Bakel. Intersection type assignment systems. Theoret. Comput. Sci., 151(2), 1995.

    Google Scholar 

  32. J. B. Wells. Typability and type checking in the second-order λ-calculus are equivalent and undecidable. In Proc. 9th Ann. IEEE Symp. Logic in Comput. Sci., 1994. Superseded by [34].

    Google Scholar 

  33. J. B. Wells. Typability is undecidable for F+eta. Tech. Rep. 96-022, Comp. Sci. Dept., Boston Univ., 1996.

    Google Scholar 

  34. J. B. Wells. Typability and type checking in System F are equivalent and undecidable. Ann. Pure Appl. Logic, 98(1–3), 1999. Supersedes [32].

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Wells, J.B. (2002). The Essence of Principal Typings. In: Widmayer, P., Eidenbenz, S., Triguero, F., Morales, R., Conejo, R., Hennessy, M. (eds) Automata, Languages and Programming. ICALP 2002. Lecture Notes in Computer Science, vol 2380. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45465-9_78

Download citation

  • DOI: https://doi.org/10.1007/3-540-45465-9_78

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43864-9

  • Online ISBN: 978-3-540-45465-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy