skip to main content
research-article

Polymorphic Functions with Set-Theoretic Types: Part 2: Local Type Inference and Type Reconstruction

Authors Info & Claims
Published:14 January 2015Publication History
Skip Abstract Section

Abstract

This article is the second part of a two articles series about the definition of higher order polymorphic functions in a type system with recursive types and set-theoretic type connectives (unions, intersections, and negations).

In the first part, presented in a companion paper, we defined and studied the syntax, semantics, and evaluation of the explicitly-typed version of a calculus, in which type instantiation is driven by explicit instantiation annotations. In this second part we present a local type inference system that allows the programmer to omit explicit instantiation annotations for function applications, and a type reconstruction system that allows the programmer to omit explicit type annotations for function definitions.

The work presented in the two articles provides the theoretical foundations and technical machinery needed to design and implement higher-order polymorphic functional languages with union and intersection types and/or for semi-structured data processing.

Skip Supplemental Material Section

Supplemental Material

p289-sidebyside.mpg

References

  1. A. Aiken and E. L. Wimmers. Type inclusion constraints and type inference. In FPCA'93, pages 31--41, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. V. Benzaken, G. Castagna, and A. Frisch. CDuce: an XML-friendly general purpose language. In ICFP'03. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Castagna, K. Nguyen, Z. Xu, H. Im, S. Lenglet, and L. Padovani. Polymorphic functions with set-theoretic types. Part 1: Syntax, semantics, and evaluation. In POPL'14, January 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. G. Castagna and Z. Xu. Set-theoretic Foundation of Parametric Poly- morphism and Subtyping. In ICFP'11, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. B. Courcelle. Fundamental properties of infinite trees. Theoretical Computer Science, 25:95--169, 1983.Google ScholarGoogle Scholar
  6. L. Damas and R. Milner. Principal type-schemes for functional programs. In POPL'82, pages 207--212, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Davies. Practical Refiniment-Type Checking. PhD thesis, Carnegie Mellon University, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Robie et al. XQuery 3.0: An XML query language (working draft 2010/12/14), 2010. http://www.w3.org/TR/xquery-30/.Google ScholarGoogle Scholar
  9. A. Frisch. Théorie, conception et réalisation dun langage de programmation fonctionnel adapté à XML. PhD thesis, U. Paris 7, 2004.Google ScholarGoogle Scholar
  10. A. Frisch, G. Castagna, and V. Benzaken. Semantic subtyping: dealing set-theoretically with function, union, intersection, and negation types. The Journal of ACM, 55(4):1--64, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Martelli and U. Montanari. An efficient unification algorithm. ACM TOPLAS, 4(2):258--282, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Odersky, M. Sulzmann, and M. Wehr. Type inference with constrained types. TAPOS, 5(1):35--55, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Okasaki. Purely Functional Data Structures. CUP, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B.C. Pierce and D.N. Turner. Local type inference. ACM Trans. Program. Lang. Syst., 22(1):1--44, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. F. Pottier and D. Rémy. The essence of ML type inference. In B.C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 10, pages 389--489. MIT Press, 2005.Google ScholarGoogle Scholar
  16. S. Tobin-Hochstadt and M. Felleisen. The design and implementation of typed scheme. In POPL'08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Tobin-Hochstadt and M. Felleisen. Logical types for untyped languages. In ICFP'10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Z. Xu. Parametric Polymorphism for XML Processing Languages. PhD thesis, Université Paris Diderot, 2013. Available at http://tel.archives-ouvertes.fr/tel-00858744Google ScholarGoogle Scholar

Index Terms

  1. Polymorphic Functions with Set-Theoretic Types: Part 2: Local Type Inference and Type Reconstruction

    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

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 50, Issue 1
      POPL '15
      January 2015
      682 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2775051
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
      • cover image ACM Conferences
        POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
        January 2015
        716 pages
        ISBN:9781450333009
        DOI:10.1145/2676726

      Copyright © 2015 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 14 January 2015

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!