Graded Modal Type Theory, Formalized
Licentiatavhandling, 2025

A graded modal type theory equips a type theory with a semiring of grades, which enables encoding additional information of some kind. A typical application of such a system is to encode quantitative information, specifically how many times variables are used or referenced at runtime. Concrete examples include erasure or linear types. In this thesis, we present such a type theory with dependent types, designed primarily with encoding quantitative information in mind. The theory supports Π-types, Σ-types, unit, and empty types, as well as a hierarchy of universes. It also supports natural numbers, and special attention is given to establishing a method for counting variable uses for the recursive eliminator of this type. We prove some key meta-theoretical results for this system, as well as two main correctness results. Firstly, we show correctness for erasure in the sense that it is safe to remove erased information during compilation without affecting the result of evaluation. Secondly, we show that the system is capable of correctly tracking how many times variables should be referenced through an abstract machine in which heap lookups (corresponding to variable references) are tracked. The thesis is accompanied by an Agda formalization in which the results have been mechanized.

linearity

quantitative type theory

erasure

abstract machine

dependent types

formalization

graded modal type theory

HB4, Hörsalsvägen 12
Opponent: Dominic Orchard, University of Kent & University of Cambridge, United Kingdom

Författare

Oskar Eriksson

Göteborgs universitet

Chalmers, Data- och informationsteknik, Computing Science

A Graded Modal Dependent Type Theory with a Universe and Erasure, Formalized

Proceedings of the ACM on Programming Languages,;Vol. 7(2023)p. 920-954

Artikel i vetenskaplig tidskrift

Oskar Eriksson, Nils Anders Danielsson, Andreas Abel. A Resource-Correct Graded Modal Dependent Type Theory with Recursion, Formalized

Ämneskategorier (SSIF 2025)

Formella metoder

Datavetenskap (datalogi)

Data- och informationsvetenskap (Datateknik)

Utgivare

Göteborgs universitet

HB4, Hörsalsvägen 12

Opponent: Dominic Orchard, University of Kent & University of Cambridge, United Kingdom

Relaterade dataset

An Agda Formalization of Graded Modal Type Theory [dataset]

DOI: 10.5281/zenodo.15189791

Mer information

Senast uppdaterat

2025-05-08