skip to main content
research-article

Parametric polymorphism and semantic subtyping: the logical connection

Published:19 September 2011Publication History
Skip Abstract Section

Abstract

We consider a type algebra equipped with recursive, product, function, intersection, union, and complement types together with type variables and implicit universal quantification over them. We consider the subtyping relation recently defined by Castagna and Xu over such type expressions and show how this relation can be decided in EXPTIME, answering an open question. The novelty, originality and strength of our solution reside in introducing a logical modeling for the semantic subtyping framework. We model semantic subtyping in a tree logic and use a satisfiability-testing algorithm in order to decide subtyping. We report on practical experiments made with a full implementation of the system. This provides a powerful polymorphic type system aiming at maintaining full static type-safety of functional programs that manipulate trees, even with higher-order functions, which is particularly useful in the context of XML.

Skip Supplemental Material Section

Supplemental Material

_talk10.mp4

References

  1. M. Benedikt and J. Cheney. Destabilizers and independence of XML updates. Proceedings of the VLDB Endowment, 3 (1): 906--917, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. V. Benzaken, G. Castagna, and A. Frisch. CDuce: an XML-centric general-purpose language. In Proceedings of the 8th international conference on functional programming (ICFP '03), pages 51--63, Uppsala, Sweden, 2003. http://doi.acm.org/10.1145/944705.944711. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. M. Bierman, A. D. Gordon, C. Hriţcu, and D. Langworthy. Semantic subtyping with an SMT solver. In Proceedings of the 15th international conference on functional programming (ICFP '10), pages 105--116, Baltimore, MD, USA, 2010. http://doi.acm.org/10.1145/1863543.1863560. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Boag, D. Chamberlin, M. F. Fernández, D. Florescu, J. Robie, and J. Siméon. XQuery 1.0: An XML query language, W3C recommendation, 2007.Google ScholarGoogle Scholar
  5. G. Castagna and Z. Xu. Set-theoretic foundation of parametric polymorphism and subtyping. In Proceedings of the 16th international conference on functional programming (ICFP '11), Tokyo, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Clark and S. DeRose. XML path language (XPath) version 1.0, W3C recommendation, 1999. http://www.w3.org/TR/1999/REC-xpath-19991116.Google ScholarGoogle Scholar
  7. L. M. de Moura and N. Bjørner. Z3: An efficient SMT solver. In Proceedings of the 14th international conference on tools and algorithms for the construction and analysis of systems (TACAS '08), pages 337--340, Budapest, 2008. http://dx.doi.org/10.1007/978-3-540-78800-3_24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Engovatov and J. Robie. XQuery 3.0 requirements, W3C working draft, 2010. http://www.w3.org/TR/xquery-30-requirementsGoogle ScholarGoogle Scholar
  9. A. Frisch, G. Castagna, and V. Benzaken. Semantic subtyping: dealing set-theoretically with function, union, intersection, and negation types. Journal of the ACM, 55 (4): 1--64, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Genevès, N. Layaïda, and A. Schmitt. Efficient static analysis of XML paths and types. In Proceedings of the 28th conference on programming language design and implementation (PLDI '07), pages 342--351, San Diego, CA, USA, 2007. http://doi.acm.org/10.1145/1250734.1250773. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Hosoya and B. C. Pierce. XDuce: A statically typed XML processing language. ACM Transactions on Internet Technology, 3 (2): 117--148, 2003. http://doi.acm.org/10.1145/767193.767195. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. H. Hosoya, J. Vouillon, and B. C. Pierce. Regular expression types for XML. ACM Transactions on Programming Languages and Systems, 27: 46--90, 2005. http://doi.acm.org/10.1145/1053468.1053470. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. H. Hosoya, A. Frisch, and G. Castagna. Parametric polymorphism for XML. ACM Transactions on Programming Languages and Systems, 32 (1): 1--56, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. C. Reynolds. Types, abstraction and parametric polymorphism. In IFIP Congress, pages 513--523, 1983.Google ScholarGoogle Scholar
  15. J. Vouillon. Polymorphic regular tree types and patterns. In Proceedings of the 33rd symposium on principles of programming languages (POPL '06), pages 103--114, Charleston, SC, USA, 2006. http://doi.acm.org/10.1145/1111037.1111047. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. Wadler. Theorems for free! In Proceedings of the 4th international conference on functional programming languages and computer architecture (FPCA '89), pages 347--359, London, 1989. http://doi.acm.org/10.1145/99370.99404. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Parametric polymorphism and semantic subtyping: the logical connection

      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 46, Issue 9
        ICFP '11
        September 2011
        456 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2034574
        Issue’s Table of Contents
        • cover image ACM Conferences
          ICFP '11: Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
          September 2011
          470 pages
          ISBN:9781450308656
          DOI:10.1145/2034773

        Copyright © 2011 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 19 September 2011

        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!