Download PDFOpen PDF in browser

Termination Casts: A Flexible Approach to Termination with General Recursion

17 pagesPublished: May 15, 2012

Abstract

This paper proposes a type-and-effect system called Teqt, which distinguishes terminating terms and total functions from possibly diverging terms and partial functions, for a lambda calculus with general recursion and equality types. The central idea is to include a primitive type-form ``Terminates t'', expressing that term t is terminating; and then allow terms t to be coerced from possibly diverging to total, using a proof of Terminates t. We call such coercions termination casts, and show how to implement terminating recursion using them. For the meta-theory of the system, we describe a translation from Teqt to a logical theory of termination for general recursive, simply typed functions. Every typing judgment of Teqt is translated to a theorem expressing the appropriate termination property of the computational part of the Teqt term.

Keyphrases: dependent types, general recursion, type theory

In: Ekaterina Komendantskaya, Ana Bove and Milad Niqui (editors). PAR-10. Partiality and Recursion in Interactive Theorem Provers, vol 5, pages 84-100.

BibTeX entry
@inproceedings{PAR-10:Termination_Casts_Flexible_Approach,
  author    = {Aaron Stump and Vilhelm Sjöberg and Stephanie Weirich},
  title     = {Termination Casts: A Flexible Approach to Termination with General Recursion},
  booktitle = {PAR-10. Partiality and Recursion in Interactive Theorem Provers},
  editor    = {Ekaterina Komendantskaya and Ana Bove and Milad Niqui},
  series    = {EPiC Series in Computing},
  volume    = {5},
  publisher = {EasyChair},
  bibsource = {EasyChair, https://easychair.org},
  issn      = {2398-7340},
  url       = {/publications/paper/fm4X},
  doi       = {10.29007/3w36},
  pages     = {84-100},
  year      = {2012}}
Download PDFOpen PDF in browser