skip to main content
10.1145/2535838.2535840acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Polymorphic functions with set-theoretic types: part 1: syntax, semantics, and evaluation

Published: 08 January 2014 Publication History

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.

Supplementary Material

ZIP File (popl023.zip)
Appendix
MP4 File (d1_right_t1.mp4)

References

[1]
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.
[2]
V. Benzaken, G. Castagna, and A. Frisch. CDuce: an XML-friendly general purpose language. In ICFP '03. ACM Press, 2003.
[3]
V. Bono, B. Venneri, and L. Bettini. A typed lambda calculus with intersection types. Theor. Comput. Sci., 398(1--3):95--113, 2008.
[4]
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.
[5]
G. Castagna and Z. Xu. Set-theoretic Foundation of Parametric Polymorphism and Subtyping. In ICFP'11, 2011.
[6]
J. Clark and M. Murata. Relax-NG, 2001. www.relaxng.org.
[7]
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.
[8]
J. Dunfield and F. Pfenning. Tridirectional typechecking. In POPL'04. ACM Press, 2004.
[9]
J. Robie et al. Xquery 3.0: An XML query language (working draft 2010/12/14), 2010. http://www.w3.org/TR/xquery-30/.
[10]
A. Frisch. OCaml + XDuce. In ICFP'06, 2006.
[11]
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.
[12]
H. Hosoya, A. Frisch, and G. Castagna. Parametric polymorphism for XML. ACM TOPLAS, 32(1):1--56, 2009.
[13]
L. Liquori and S. Ronchi Della Rocca. Intersection-types à la Church. Inf. Comput., 205(9):1371--1386, 2007.
[14]
B.C. Pierce. Types and Programming Languages. MIT Press, 2002.
[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.
[16]
J.C. Reynolds. Design of the programming language Forsythe. Technical Report Carnegie Mellon University-CS-96--146, Carnegie Mellon University, 1996.
[17]
J.C. Reynolds. What do types mean?: from intrinsic to extrinsic semantics. In Programming methodology. Springer, 2003.
[18]
S. Ronchi Della Rocca. Intersection typed lambda-calculus. Electr. Notes Theor. Comput. Sci., 70(1):163--181, 2002.
[19]
M. Sulzmann, K. Zhuo, and M. Lu. XHaskell - Adding Regular Expression Types to Haskell. In IFL, LNCS n. 5083. Springer, 2007.
[20]
J. Vouillon. Polymorphic regular tree types and patterns. In POPL'06, pages 103--114, 2006.
[21]
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.
[22]
J.B.Wells and C. Haack. Branching types. In ESOP'02, volume 2305 of LNCS, pages 115--132. Springer, 2002.
[23]
Z. Xu. Parametric Polymorphism for XML Processing Languages. PhD thesis, Université Paris Diderot, 2013. Available at http://tel.archives-ouvertes.fr/tel-00858744.

Cited By

View all
  • (2024)Same Same but Different: A Comparative Analysis of Static Type Checkers in ErlangProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678189(2-12)Online publication date: 28-Aug-2024
  • (2023)Making a Type Difference: Subtraction on Intersection Types as Generalized Record OperationsProceedings of the ACM on Programming Languages10.1145/35712247:POPL(893-920)Online publication date: 11-Jan-2023
  • (2023)Programming with Union, Intersection, and Negation TypesThe French School of Programming10.1007/978-3-031-34518-0_12(309-378)Online publication date: 11-Oct-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
January 2014
702 pages
ISBN:9781450325448
DOI:10.1145/2535838
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 January 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. intersection types
  2. polymorphism
  3. types
  4. xml

Qualifiers

  • Research-article

Conference

POPL '14
Sponsor:

Acceptance Rates

POPL '14 Paper Acceptance Rate 51 of 220 submissions, 23%;
Overall Acceptance Rate 860 of 4,328 submissions, 20%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)14
  • Downloads (Last 6 weeks)2
Reflects downloads up to 15 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Same Same but Different: A Comparative Analysis of Static Type Checkers in ErlangProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678189(2-12)Online publication date: 28-Aug-2024
  • (2023)Making a Type Difference: Subtraction on Intersection Types as Generalized Record OperationsProceedings of the ACM on Programming Languages10.1145/35712247:POPL(893-920)Online publication date: 11-Jan-2023
  • (2023)Programming with Union, Intersection, and Negation TypesThe French School of Programming10.1007/978-3-031-34518-0_12(309-378)Online publication date: 11-Oct-2023
  • (2022)Set-theoretic Types for ErlangProceedings of the 34th Symposium on Implementation and Application of Functional Languages10.1145/3587216.3587220(1-14)Online publication date: 31-Aug-2022
  • (2022)Dependently-typed data plane programmingProceedings of the ACM on Programming Languages10.1145/34987016:POPL(1-28)Online publication date: 12-Jan-2022
  • (2022)Mœbius: metaprogramming using contextual types: the stage where system f can pattern match on itselfProceedings of the ACM on Programming Languages10.1145/34987006:POPL(1-27)Online publication date: 12-Jan-2022
  • (2022)Linked visualisations via Galois dependenciesProceedings of the ACM on Programming Languages10.1145/34986686:POPL(1-29)Online publication date: 12-Jan-2022
  • (2022)Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languagesProceedings of the ACM on Programming Languages10.1145/34986676:POPL(1-32)Online publication date: 12-Jan-2022
  • (2022)Polarized SubtypingProgramming Languages and Systems10.1007/978-3-030-99336-8_16(431-461)Online publication date: 5-Apr-2022
  • (2021)Taming the Merge OperatorJournal of Functional Programming10.1017/S095679682100018631Online publication date: 2-Nov-2021
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media