Graded Modal Dependent Type Theory

  title={Graded Modal Dependent Type Theory},
  author={Benjamin Moon and Harley D. Eades and Dominic A. Orchard},
  journal={Programming Languages and Systems},
  pages={462 - 490}
Graded type theories are an emerging paradigm for augmenting the reasoning power of types with parameterizable, fine-grained analyses of program properties. There have been many such theories in recent years which equip a type theory with quantitative dataflow tracking, usually via a semiring-like structure which provides analysis on variables (often called ‘quantitative’ or ‘coeffect’ theories). We present Graded Modal Dependent Type Theory (Grtt for short), which equips a dependent type… 

Figures and Tables from this paper

Idris 2: Quantitative Type Theory in Practice
This paper introduces Idris 2, and describes how QTT has influenced its design, and gives examples of the benefits of QTT in practice including: expressing which data is erased at run time, at the type level; and, resource tracking in the type system leading to type-safe concurrent programming with session types.
A Dependent Dependency Calculus (Extended Version)
A Dependent Dependency Calculus (DDC) is presented, which extends this general idea to the setting of a dependently-typed language, and is used to track both run-time and compile-time irrelevance, enabling faster typechecking and program execution.
Replicate, Reuse, Repeat: Capturing Non-Linear Communication via Session Types and Graded Modal Types
This paper shows how graded modal types can be leveraged alongside session types to enable various non-linear concurrency behaviours to be re-introduced in a precise manner in a type system with a linear basis.
Logical Foundations of Quantitative Equality (long version)
A deductive calculus for (Graded) Linear Logic with quantitative equality and the notion of Lipschitz doctrine to give semantics to it is introduced, using the categorical language of Lawvere’s hyperdoctrines.


Quantitative program reasoning with graded modal types
This work proposes the umbrella notion of graded modal types, encompassing coeffect types and dual notions of type-based effect reasoning via graded monads, and demonstrates this approach via a type system embodied in a fully-fledged functional language called Granule.
Parametric quantifiers for dependent type theory
This work equips Martin-Löf Type Theory with parametric quantifiers ∀ and ∃ alongside the existing Π and Σ, and provides relation type formers for proving parametricity theorems internally, and implements an extension to the Agda proof assistant that type-checks proofs in the type system.
Implementing a modal dependent type theory
A dependent type theory MLTT🔒 supporting the connectives of standard Martin-Löf Type Theory as well as an S4-style necessity operator is presented, and a type checking algorithm is designed and proved using a novel extension of normalization by evaluation.
Really Natural Linear Indexed Type Checking
It is shown how to reduce type checking for (a simple extension of) DFuzz to constraint solving over a first-order theory of naturals and real numbers which, although undecidable, can often be handled in practice by standard numeric solvers.
A graded dependent type system with a usage-aware semantics
GraD, a novel version of such a graded dependent type system that includes functions, tensor products, additive sums, and a unit type is developed and a soundness theorem is proved that shows correct accounting of resource usage.
A relationally parametric model of dependent type theory
This paper constructs parametric models of predicative and impredicative dependent type theory in terms of reflexive graphs, and is the first account of parametricity for dependent types that is able to lift the useful deduction of the existence of initial algebras in parametric model of System F to the dependently typed setting.
Integrating Linear and Dependent Types
This paper shows how to integrate linear types with type dependency by extending the linear/non-linear calculus of Benton to support type dependency, and gives a proof-theoretic account of imperative programming, which requires extending the calculus with computationally irrelevant quantification, proof irrelevance, and a monad of computations.
Sound and complete bidirectional typechecking for higher-rank polymorphism with existentials and indexed types
This work gives a declarative specification of typing based on focalization, allowing for coverage of pattern matching, as well as support for first-class existential types using a focalized subtyping judgment, and extends the declaratives specification with an explicit rules for deducing when a type is principal.
On Universes in Type Theory
The notion of a universe of types was introduced into constructive type theory by Martin-Lof (1975). According to the propositions-as-types principle inherent in type theory, the notion plays two
On understanding types, data abstraction, and polymorphism
A λ-calculus-based model for type systems that allows us to explore the interaction among the concepts of type, data abstraction, and polymorphism in a simple setting, unencumbered by complexities of production programming languages is developed.