skip to main content
10.1145/1411204.1411216acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

From ML to MLF: graphic type constraints with efficient type inference

Published:20 September 2008Publication History

ABSTRACT

MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a small extension of the formalism of graphic types, originally introduced to represent MLF types. We give a few semantic preserving transformations on constraints and propose a strategy for applying them to solve constraints. We show that the resulting algorithm has optimal complexity for MLF type inference, and argue that, as for ML, this complexity is linear under reasonable assumptions.

Skip Supplemental Material Section

Supplemental Material

1411216.mp4

mp4

125.2 MB

References

  1. Fritz Henglein. Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems, 15(2):253--289, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Didier Le Botlan and Didier Rémy. MLF: Raising ML to the power of System-F. In Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming, pages 27--38, August 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Didier Le Botlan and Didier Rémy. Recasting MLF. Research Report 6228, INRIA, Rocquencourt, BP 105, 78 153 Le Chesnay Cedex, France, June 2007.Google ScholarGoogle Scholar
  4. Daan Leijen. A type directed translation of MLF to system F. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP'07), Freiburg, Germany, pages 111--122, October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Daan Leijen. Flexible types: robust type inference for first-class polymorphism. Technical Report MSR-TR-2008-55, Microsoft Research, March 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Daan Leijen. HMF: Simple type inference for first-class polymorphism. In ICFP'08 {15}. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. David McAllester. A logical algorithm for ML type inference. In International Conference on Rewriting Techniques and Applications (RTA), Valencia, Spain, volume 2706 of Lecture Notes in Computer Science, pages 436--451. Springer-Verlag, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. François Pottier and Didier Rémy. The essence of ML type inference. In Benjamin C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 10, pages 389--489. MIT Press, 2005.Google ScholarGoogle Scholar
  9. Didier Rémy. Extending ML type system with a sorted equational theory. Research Report 1766, INRIA, 1992.Google ScholarGoogle Scholar
  10. Didier Rémy and Boris Yakobowski. A graphical presentation of MLF types with a linear-time unification algorithm. In Proceedings of the 2007 ACM SIGPLAN International Workshop on Types in Languages Design and Implementation (TLDI'07), pages 27--38, Nice, France, January 2007. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Didier Rémy and Boris Yakobowski. A Church-style intermediate language for MLF. Submitted, available at http://gallium.inria.fr/~remy/mlf, 2008.Google ScholarGoogle Scholar
  12. Didier Rémy and Boris Yakobowski. A graphical presentation of MLF types with a linear-time incremental unification algorithm. Extended version, of {10}, September 2008.Google ScholarGoogle Scholar
  13. Dimitrios Vytiniotis, Stephanie Weirich, and Simon Peyton Jones. FPH: First-class polymorphism for Haskell. In ICFP'08 {15}. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Joe B.Wells. Typability and type checking in system F are equivalent and undecidable. Annals of Pure and Applied Logic, 98(1--3):111--156, 1999.Google ScholarGoogle ScholarCross RefCross Ref
  15. Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming (ICFP'08), Victoria, British Columbia, Canada. ACM Press, September 2008.Google ScholarGoogle Scholar

Index Terms

  1. From ML to MLF: graphic type constraints with efficient type inference

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
            September 2008
            422 pages
            ISBN:9781595939197
            DOI:10.1145/1411204
            • cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 43, Issue 9
              ICFP '08
              September 2008
              399 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/1411203
              Issue’s Table of Contents

            Copyright © 2008 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 20 September 2008

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate333of1,064submissions,31%

            Upcoming Conference

            ICFP '24

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader