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.
Supplemental Material
Available for Download
Appendix of the article "Polymorphic Functions with Set-Theoretic Types (Part 2: Local Type Inference and Type Reconstruction)"
- A. Aiken and E. L. Wimmers. Type inclusion constraints and type inference. In FPCA'93, pages 31--41, 1993. 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, 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 Scholar
Digital Library
- G. Castagna and Z. Xu. Set-theoretic Foundation of Parametric Poly- morphism and Subtyping. In ICFP'11, 2011. Google Scholar
Digital Library
- B. Courcelle. Fundamental properties of infinite trees. Theoretical Computer Science, 25:95--169, 1983.Google Scholar
- L. Damas and R. Milner. Principal type-schemes for functional programs. In POPL'82, pages 207--212, 1982. Google Scholar
Digital Library
- R. Davies. Practical Refiniment-Type Checking. PhD thesis, Carnegie Mellon University, 2005. Google Scholar
Digital 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. Théorie, conception et réalisation dun langage de programmation fonctionnel adapté à XML. PhD thesis, U. Paris 7, 2004.Google Scholar
- 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
- A. Martelli and U. Montanari. An efficient unification algorithm. ACM TOPLAS, 4(2):258--282, 1982. Google Scholar
Digital Library
- M. Odersky, M. Sulzmann, and M. Wehr. Type inference with constrained types. TAPOS, 5(1):35--55, 1999. Google Scholar
Digital Library
- C. Okasaki. Purely Functional Data Structures. CUP, 1998. Google Scholar
Digital Library
- B.C. Pierce and D.N. Turner. Local type inference. ACM Trans. Program. Lang. Syst., 22(1):1--44, 2000. Google Scholar
Digital 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
- S. Tobin-Hochstadt and M. Felleisen. The design and implementation of typed scheme. In POPL'08, 2008. Google Scholar
Digital Library
- S. Tobin-Hochstadt and M. Felleisen. Logical types for untyped languages. In ICFP'10, 2010. Google Scholar
Digital Library
- Z. Xu. Parametric Polymorphism for XML Processing Languages. PhD thesis, Université Paris Diderot, 2013. Available at http://tel.archives-ouvertes.fr/tel-00858744Google Scholar
Index Terms
Polymorphic Functions with Set-Theoretic Types: Part 2: Local Type Inference and Type Reconstruction
Recommendations
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 ...
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 ...
Semantic subtyping: Dealing set-theoretically with function, union, intersection, and negation types
Subtyping relations are usually defined either syntactically by a formal system or semantically by an interpretation of types into an untyped denotational model. This work shows how to define a subtyping relation semantically in the presence of Boolean ...







Comments