Reference. Explicit Refinement Types
Cite
Cites 30 works (3 here)
With notes (3)
Logical Relations as Types: Proof-Relevant Parametricity for Program Modules sterling_harper_2021
The theory of program modules is of interest to language designers not only for its practical importance to programming, but also because it lies at the nexus of three fundamental concerns in language design: the phase distinction, computational effects, and type abstraction. We contribute a fresh “synthetic” take on program modules that treats modules as the fundamental constructs, in which the usual suspects of prior module calculi (kinds, constructors, dynamic programs) are rendered as derived notions in terms of a modal type-theoretic account of the phase distinction. We simplify the account of type abstraction (embodied in the generativity of module functors) through a lax modality that encapsulates computational effects, placing projectibility of module expressions on a type-theoretic basis.
Our main result is a (significant) proof-relevant and phase-sensitive generalization of the Reynolds abstraction theorem for a calculus of program modules, based on a new kind of logical relation called a parametricity structure. Parametricity structures generalize the proof-irrelevant relations of classical parametricity to proof-relevant families, where there may be non-trivial evidence witnessing the relatedness of two programs—simplifying the metatheory of strong sums over the collection of types, for although there can be no “relation classifying relations,” one easily accommodates a “family classifying small families.”
Using the insight that logical relations/parametricity is itself a form of phase distinction between the syntactic and the semantic, we contribute a new synthetic approach to phase separated parametricity based on the slogan logical relations as types, by iterating our modal account of the phase distinction. We axiomatize a dependent type theory of parametricity structures using two pairs of complementary modalities (syntactic, semantic) and (static, dynamic), substantiated using the topos theoretic Artin gluing construction. Then, to construct a simulation between two implementations of an abstract type, one simply programs a third implementation whose type component carries the representation invariant.
Syntax and Semantics of Quantitative Type Theory atkey-2018-syntax
Functors are type refinement systems mellies_zeilberger_2015
The standard reading of type theory through the lens of category theory is based on the idea of viewing a type system as a category of well-typed terms. We propose a basic revision of this reading: rather than interpreting type systems as categories, we describe them as functors from a category of typing derivations to a category of underlying terms. Then, turning this around, we explain how in fact any functor gives rise to a generalized type system, with an abstract notion of typing judgment, typing derivations and typing rules. This leads to a purely categorical reformulation of various natural classes of type systems as natural classes of functors.
The main purpose of this paper is to describe the general framework (which can also be seen as providing a categorical analysis of refinement types), and to present a few applications. As a larger case study, we revisit Reynolds’ paper on “The Meaning of Types” (2000), showing how the paper’s main results may be reconstructed along these lines.
External (27)
- How to safely use extensionality in Liquid Haskell (2022)
- A General Semantic Construction of Dependent Refinement Type Systems, Categorically (2021)
- The Coq Proof Assistant (2021)
- Quadratic type checking for objective type theory (2021)
- Refinement Types: A Tutorial (2020)
- On the unusual effectiveness of type-aware operator mutations for testing SMT solvers (2020)
- Erasure in Dependently Typed Programming (2019)
- Handling fibred algebraic effects (2017)
- Notions of anonymous existence in Martin-Löf type theory (2017)
- Programming up to Congruence (2015)
- Parametric effect monads and semantics of effect systems (2014)
- Refinement types for Haskell (2014)
- First-Order Theorem Proving and Vampire (2013)
- The Implicit Calculus of Constructions as a Programming Language with Dependent Types (2008)
- Liquid types (2008)
- The generalised type-theoretic interpretation of constructive set theory (2006)
- ATS: A Language That Combines Programming with Theorem Proving (2005)
- Propositions as [Types] (2004)
- Dependent intersection: a new way of defining records in type theory (2003)
- What do types mean? — From intrinsic to extrinsic semantics (2003)
- SPASS Version 2.0 (2002)
- A model for impredicative type systems, universes, intersection types and subtyping (2000)
- Eliminating array bound checking through dependent types (1998)
- Constructing type systems over an operational semantics (1992)
- Notions of computation and monads (1991)
- An extended calculus of constructions (1990)
- A theory of type polymorphism in programming (1978)