| | |
Summary: MiniAgda: Integrating Sized and Dependent Types
Andreas Abel #
Department of Computer Science
LudwigMaximiliansUniversity Munich
Abstract
Sized types are a modular and theoretically wellunderstood tool for checking termination of recur
sive and productivity of corecursive definitions. The essential idea is to track structural descent and
guardedness in the type system to make termination checking robust and suitable for strong abstrac
tions like higherorder functions and polymorphism. To study the application of sized types to proof
assistants and programming languages based on dependent type theory, we have implemented a core
language, MiniAgda, with explicit handling of sizes. New considerations were necessary to soundly
integrate sized types with dependencies and pattern matching, which was made possible by mod
ern concepts such as inaccessible patterns and parametric function spaces. This paper provides an
introduction to MiniAgda by example and informal explanations of the underlying principles.
1 Introduction
In the dependent type theories underlying the programming and proof languages of Coq [INR08], Agda
[Nor07], and Epigram [CAM07], all programs need to be total to maintain logical consistency. This
means that some analysis is required that ensures that all functions defined by recursion over inductive
types terminate and all functions defined by corecursion into a coinductive type are productive, i. e.,
always yield the next piece of the output in finite time. The currently implemented termination analyses
|