ABSTRACT
We define and study parametric polymorphism for a type system with recursive, product, union, intersection, negation, and function types. We first recall why the definition of such a system was considered hard "when not impossible" and then present the main ideas at the basis of our solution. In particular, we introduce the notion of "convexity" on which our solution is built up and discuss its connections with parametricity as defined by Reynolds to whose study our work sheds new light.
Supplemental Material
- V. Balat, J. Vouillon, and B. Yakobowski. Experience report: Ocsigen, a web programming framework. In ICFP '09. ACM Press, 2009. Google Scholar
Digital Library
- V. Benzaken, G. Castagna, and A. Frisch. CDuce: an XML-friendly general purpose language. In ICFP '03. ACM Press, 2003. Google Scholar
Digital Library
- G. Castagna, R. De Nicola, and D. Varacca. Semantic subtyping for the π-calculus. Theor. Comput. Sci., 398(1-3):217--242, 2008. Google Scholar
Digital Library
- G. Castagna and K. Nguyen. Typed iterators for XML. In ICFP '08, pages 15--26. ACM Press, 2008. Google Scholar
Digital Library
- J. Clark and M. Murata. Relax-NG, 2001. www.relaxng.org.Google Scholar
- D. Draper et al. XQuery 1.0 and XPath 2.0 Formal Semantics, 2007. http://www.w3.org/TR/query-semantics/.Google Scholar
- T. Berners-Lee et al. Uniform Resource Identifier, January 2005. RFC 3986, STD 66.Google Scholar
- A. Frisch. Théorie, conception et réalisation d'un langage de programmation fonctionnel adapté à XML. PhD thesis, Université Paris 7, December 2004.Google Scholar
- A. Frisch. OCaml + XDuce. In ICFP'06. ACM Press, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- V. Gapeyev, M.Y. Levin, B.C. Pierce, and A. Schmitt. The Xtatic compiler and runtime system, 2005. http://www.cis.upenn.edu/~bcpierce/xtatic.Google Scholar
- J. Garrigue. Programming with polymorphic variants. In Proc. of ML Workshop, 1998.Google Scholar
- P. Genevès, N. Layaïda, and A. Schmitt. Efficient static analysis of XML paths and types. In PLDI '07. ACM Press, 2007. Google Scholar
Digital Library
- N. Gesbert, P. Genevès, and N. Layaïda. Parametric Polymorphism and Semantic Subtyping: the Logical Connection. In ICFP '11, 2011. Google Scholar
Digital Library
- H. Hosoya, A. Frisch, and G. Castagna. Parametric polymorphism for XML. ACM TOPLAS, 32(1):1--56, 2009. Google Scholar
Digital Library
- H. Hosoya and B. Pierce. XDuce: A statically typed XML processing language. ACM TOIT, 3(2):117--148, 2003. Google Scholar
Digital Library
- K. Zhuo Ming Lu and M. Sulzmann. An implementation of subtyping among regular expression types. In Proc. of APLAS '04, volume 3302 of LNCS, pages 57--73. Springer, 2004.Google Scholar
- J. C. Reynolds. Types, abstraction and parametric polymorphism. In Information Processing, pages 513--523. Elsevier, 1983.Google Scholar
- J. C. Reynolds. Polymorphism is not set-theoretic. In Semantics of Data Types, volume 173 of LNCS, pages 145--156. Springer, 1984.Google Scholar
Cross Ref
- J. Vouillon. Polymorphic regular tree types and patterns. In POPL'06, pages 103--114, 2006. Google Scholar
Digital Library
- W3C. SOAP Version 1.2. http://www.w3.org/TR/soap.Google Scholar
- P. Wadler. Theorems for free! In Functional Programming Languages and Computer Architecture, pages 347--359. ACM Press, 1989. Google Scholar
Digital Library
- C. Wallace and C. Runciman. Haskell and XML: Generic combinators or type based translation? In ICFP '99, pages 148--159, 1999. Google Scholar
Digital Library
- H. Xi, C. Chen, and G. Chen. Guarded recursive datatype constructors. In POPL'03, pages 224--235. ACM Press, 2003. Google Scholar
Digital Library
Index Terms
Set-theoretic foundation of parametric polymorphism and subtyping
Recommendations
Polymorphic Functions with Set-Theoretic Types: Part 2: Local Type Inference and Type Reconstruction
POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesThis 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, ...
Polymorphism, subtyping, and type inference in MLsub
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesWe present a type system combining subtyping and ML-style parametric polymorphism. Unlike previous work, our system supports type inference and has compact principal types. We demonstrate this system in the minimal language MLsub, which types a strict ...
Polymorphic functions with set-theoretic types: part 1: syntax, semantics, and evaluation
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesThis article is the first part of a two articles series about a calculus with higher-order polymorphic functions, recursive types with arrow and product type constructors and set-theoretic type connectives (union, intersection, and negation).
In this ...






Comments