On Recursion in Graded Modal Type Theory
Artikel i vetenskaplig tidskrift, 2026

We present a graded modal type theory with recursion over natural numbers and prove formally in Agda that it handles resources correctly, in the sense that an abstract machine accesses resources the "correct" number of times. The theory is parametrized, and can for instance be instantiated with grades for erasure, linear types, or affine types. The correctness proof shows that our usage counting is sound. Our eliminator for natural numbers is flexible as it enables different resource-usage patterns and practical in the sense that it can be used both to define functions with expected usage counts for the arguments. Further, it can be used to encode other data types, using large elimination. Finally, we adapt our resource correctness proof to show correctness also for grades tracking information flow, in the form of a non-interference property.

formalization

quantitative type theory

linearity

dependent types

abstract machine

graded modal type theory

Författare

Oskar Eriksson

Chalmers, Data- och informationsteknik, Computing Science

Göteborgs universitet

Andreas Martin Abel

Chalmers, Data- och informationsteknik, Computing Science

Göteborgs universitet

Nils Anders Danielsson

Chalmers, Data- och informationsteknik, Computing Science

Göteborgs universitet

Proceedings of the ACM on Programming Languages

24751421 (eISSN)

Vol. 10 ICFP 279

Ämneskategorier (SSIF 2025)

Datavetenskap (datalogi)

DOI

10.1145/3828677

Mer information

Senast uppdaterat

2026-08-31