Sound and complete bidirectional typechecking for higher-rank polymorphism with existentials and indexed types
Authors
Dunfield, Jana
Krishnaswami, Neelakantan R
Publication Date
2019-01-02Journal Title
Proceedings of the ACM on Programming Languages
Conference Name
Principles of Programming Languages (POPL 2019)
Publisher
Association for Computing Machinery (ACM)
Volume
3
Issue
POPL
Pages
1-28
Language
en
Type
Conference Object
This Version
VoR
Metadata
Show full item recordCitation
Dunfield, J., & Krishnaswami, N. R. (2019). Sound and complete bidirectional typechecking for higher-rank polymorphism with existentials and indexed types. Proceedings of the ACM on Programming Languages, 3 (POPL), 1-28. https://doi.org/10.1145/3290322
Abstract
<jats:p>Bidirectional typechecking, in which terms either synthesize a type or are checked against a known type, has become popular for its applicability to a variety of type systems, its error reporting, and its ease of implementation. Following principles from proof theory, bidirectional typing can be applied to many type constructs. The principles underlying a bidirectional approach to indexed types (generalized algebraic datatypes) are less clear. Building on proof-theoretic treatments of equality, we give a declarative specification of typing based on focalization. This approach permits declarative rules for coverage of pattern matching, as well as support for first-class existential types using a focalized subtyping judgment. We use refinement types to avoid explicitly passing equality proofs in our term syntax, making our calculus similar to languages such as Haskell and OCaml. We also extend the declarative specification with an explicit rules for deducing when a type is principal, permitting us to give a complete declarative specification for a rich type system with significant type inference. We also give a set of algorithmic typing rules, and prove that it is sound and complete with respect to the declarative system. The proof requires a number of technical innovations, including proving soundness and completeness in a mutually recursive fashion.</jats:p>
Sponsorship
EPSRC grant EP/N02706X/2
Funder references
Engineering and Physical Sciences Research Council (EP/N02706X/2)
Embargo Lift Date
2100-01-01
Identifiers
External DOI: https://doi.org/10.1145/3290322
This record's URL: https://www.repository.cam.ac.uk/handle/1810/288130
Statistics
Total file downloads (since January 2020). For more information on metrics see the
IRUS guide.
Recommended or similar items
The current recommendation prototype on the Apollo Repository will be turned off on 03 February 2023. Although the pilot has been fruitful for both parties, the service provider IKVA is focusing on horizon scanning products and so the recommender service can no longer be supported. We recognise the importance of recommender services in supporting research discovery and are evaluating offerings from other service providers. If you would like to offer feedback on this decision please contact us on: support@repository.cam.ac.uk
The following licence files are associated with this item: