ABSTRACT
This 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 first part we define and study the explicitly-typed version of the calculus in which type instantiation is driven by explicit instantiation annotations. In particular, we define an explicitly-typed lambda-calculus with intersection types and an efficient evaluation model for it. In the second part, presented in a companion paper, we define a local type inference system that allows the programmer to omit explicit instantiation annotations, and a type reconstruction system that allows the programmer to omit explicit type annotations.
The work presented in the two articles provides the theoretical foundations and technical machinery needed to design and implement higher-order polymorphic functional languages for semi-structured data.
Supplemental Material
Available for Download
Appendix
- H. Barendregt, M. Coppo, and M. Dezani-Ciancaglini. A filter lambda model and the completeness of type assignment. Journal of Symbolic Logic, 48(4):931--940, 1983.Google ScholarCross Ref
- V. Benzaken, G. Castagna, and A. Frisch. CDuce: an XML-friendly general purpose language. In ICFP '03. ACM Press, 2003. Google ScholarDigital Library
- V. Bono, B. Venneri, and L. Bettini. A typed lambda calculus with intersection types. Theor. Comput. Sci., 398(1--3):95--113, 2008. Google ScholarDigital Library
- G. Castagna, K. Nguyen, and Z. Xu. Polymorphic functions with set-theoretic types. Part 2: Local type inference and type reconstruction. Unpublished manuscript, available at http://hal.archives-ouvertes.fr/hal-00880744, November 2013.Google Scholar
- G. Castagna and Z. Xu. Set-theoretic Foundation of Parametric Polymorphism and Subtyping. In ICFP'11, 2011. Google ScholarDigital Library
- J. Clark and M. Murata. Relax-NG, 2001. www.relaxng.org.Google Scholar
- M. Coppo, M. Dezani, and B. Venneri. Principal type schemes and lambda-calculus semantics. In To H.B. Curry. Essays on Combinatory Logic, Lambda-calculus and Formalism. Academic Press, 1980.Google Scholar
- J. Dunfield and F. Pfenning. Tridirectional typechecking. In POPL'04. ACM Press, 2004. Google ScholarDigital Library
- 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 Scholar
- A. Frisch. OCaml + XDuce. In ICFP'06, 2006. Google ScholarDigital 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 ScholarDigital Library
- H. Hosoya, A. Frisch, and G. Castagna. Parametric polymorphism for XML. ACM TOPLAS, 32(1):1--56, 2009. Google ScholarDigital Library
- L. Liquori and S. Ronchi Della Rocca. Intersection-types à la Church. Inf. Comput., 205(9):1371--1386, 2007. Google ScholarDigital Library
- B.C. Pierce. Types and Programming Languages. MIT Press, 2002. Google ScholarDigital Library
- 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 Scholar
- J.C. Reynolds. Design of the programming language Forsythe. Technical Report Carnegie Mellon University-CS-96--146, Carnegie Mellon University, 1996.Google Scholar
- J.C. Reynolds. What do types mean?: from intrinsic to extrinsic semantics. In Programming methodology. Springer, 2003. Google ScholarDigital Library
- S. Ronchi Della Rocca. Intersection typed lambda-calculus. Electr. Notes Theor. Comput. Sci., 70(1):163--181, 2002.Google ScholarCross Ref
- M. Sulzmann, K. Zhuo, and M. Lu. XHaskell - Adding Regular Expression Types to Haskell. In IFL, LNCS n. 5083. Springer, 2007. Google ScholarDigital Library
- J. Vouillon. Polymorphic regular tree types and patterns. In POPL'06, pages 103--114, 2006. Google ScholarDigital Library
- J.B. Wells, A. Dimock, R. Muller, and F.A. Turbak. A calculus with polymorphic and polyvariant flow types. J. Funct. Program., 12(3):183--227, 2002. Google ScholarDigital Library
- J.B.Wells and C. Haack. Branching types. In ESOP'02, volume 2305 of LNCS, pages 115--132. Springer, 2002. Google ScholarDigital Library
- Z. Xu. Parametric Polymorphism for XML Processing Languages. PhD thesis, Université Paris Diderot, 2013. Available at http://tel.archives-ouvertes.fr/tel-00858744.Google Scholar
Index Terms
- Polymorphic functions with set-theoretic types: part 1: syntax, semantics, and evaluation
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, ...
Set-theoretic foundation of parametric polymorphism and subtyping
ICFP '11: Proceedings of the 16th ACM SIGPLAN international conference on Functional programmingWe 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 ...
Polymorphic functions with set-theoretic types: part 1: syntax, semantics, and evaluation
POPL '14This 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