A General Type Inference Framework for Hindley/Milner Style Systems | SpringerLink
Skip to main content

A General Type Inference Framework for Hindley/Milner Style Systems

  • Conference paper
  • First Online:
Functional and Logic Programming (FLOPS 2001)

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

Included in the following conference series:

Abstract

We propose a constraint-based formulation of Hindley/Milner style type inference system as opposed to the standard substitution-based formulation. This allows us to make important distinctions between different phases of type inference: Constraint generation/propagation, constraint solving, constraint simplification and term reconstruction. The inference system is parametric in the constraint domain, covering a wide range of application domains. A problem, incompleteness of substitutionbased inference, identified by A. J. Kennedy can be solved naturally by employing a constraint-based view of type inference. In addition, our formulation of type inference can easily be tailored to different inference algorithms such as W and M. On the technical side, we present concise soundness and completeness results.

Acknowledgments

This work gained from fruitful discussions with Kevin Glynn, Peter Stuckey, Harald SØndergaard, Kwangkeun Yi and Christoph Zenger. Thanks goes also to the anonymous referres for their valuable feedback. In particular, I would like to thank Martin Müller for stimulating discussions about HM(X). He also contributed to the observation to separate the different type inference phases. Parts of this work were carried out while the author was at Yale University supported by DARPA Grant F30602-96-2-0232.

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

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /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
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 5719
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 7149
Price includes VAT (Japan)
  • 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. Aiken and E. L. Wimmers. Type inclusion constraints and type inference. In FPCA ’93: Conference on Functional Programming Languages and Computer Architecture, Copenhagen, Denmark, pages 31–41, New York, June 1993. ACM Press.

    Google Scholar 

  2. L. Damas. Type Assignment in Programming Languages. PhD thesis, Edinburgh University, 1985.

    Google Scholar 

  3. D. Dussart, F. Henglein, and C. Mossin. Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynomial time. In A. Mycroft, editor, Proc. Second Int. Symp. Static Analysis, volume 983 of Lecture Notes in Computer Science, pages 118–135. Springer-Verlag, 1995.

    Chapter  Google Scholar 

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

    Google Scholar 

  5. A. J. Kennedy. Type inference and equational theories. Technical Report LIX/RR/96/09, LIX, Ecole Polytechnique, 91128 Palaiseau Cedex, France, September 1996.

    Google Scholar 

  6. _D. S. Lankford, G. Butler, and B. Brady. Abelian group unification algorithms for elementary terms. In W. Bledsoe and W. Loveland, editors, Automated Theorem Proving: After 25 Years. AMS, 1984.

    Google Scholar 

  7. O. Lee and K. Yi. Proofs about a folklore let-polymorphic type inference algorithm. ACM Transactions on Programming Languages and Systems, 20(4):707–723, 1998.

    Article  Google Scholar 

  8. O. Lee and K. Yi. A generalized let-polymorphic type inference algorithm. Technical Memorandum ROPAS-2000-5, Research on Program Analysis System, Korea Advanced Institute of Science and Technology, March 2000.

    Google Scholar 

  9. R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348–375, Dec 1978.

    Article  MathSciNet  Google Scholar 

  10. T. Nipkow and C. Prehofer. Type reconstruction for type classes. Journal of Functional Programming, 5(2):201–224, 1995.

    Article  MathSciNet  Google Scholar 

  11. A. Ohori. A polymorphic record calculus and its compilation. ACM TOPLAS, 6(6):805–843, November 1995.

    Google Scholar 

  12. M. Odersky, M. Sulzmann, and M Wehr. Type inference with constrained types. Theory and Practice of Object Systems, 5(1):35–55, 1999.

    Article  Google Scholar 

  13. D. Rémy. Extending ML type system with a sorted equational theory. Technical Report 1766, INRIA, October 1992.

    Google Scholar 

  14. M. Sulzmann. A General Framework for Hindley/Milner Type Systems with Constraints. PhD thesis, Yale University, Department of Computer Science, May 2000.

    MATH  Google Scholar 

  15. M. Sulzmann. A general type inference framework for Hindley/Milner style systems. Technical report, Dept. of Computer Science and Software Engineering, The University of Melbourne, 2000. URL: http://www.cs.mu.oz.au/sulzmann/publications/inference.ps.

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sulzmann, M. (2001). A General Type Inference Framework for Hindley/Milner Style Systems. In: Kuchen, H., Ueda, K. (eds) Functional and Logic Programming. FLOPS 2001. Lecture Notes in Computer Science, vol 2024. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44716-4_16

Download citation

  • DOI: https://doi.org/10.1007/3-540-44716-4_16

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-41739-2

  • Online ISBN: 978-3-540-44716-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics