Download PDFOpen PDF in browser

Beating the Productivity Checker Using Embedded Languages

21 pagesPublished: May 15, 2012

Abstract

Some total languages, like Agda and Coq, allow the use of guarded corecursion to construct infinite values and proofs. Guarded corecursion is a form of recursion in which arbitrary recursive calls are allowed, as long as they are guarded by a coinductive constructor. Guardedness ensures that programs are productive, i.e. that every finite prefix of an infinite value can be computed in finite time. However, many productive programs are not guarded, and it can be nontrivial to put them in guarded form.

This paper gives a method for turning a productive program into a guarded program. The method amounts to defining a problem-specific language as a data type, writing the program in the problem-specific language, and writing a guarded interpreter for this language.

Keyphrases: coinduction, corecursion, dependent types, mixed induction and coinduction

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

BibTeX entry
@inproceedings{PAR-10:Beating_Productivity_Checker_Using,
  author    = {Nils Anders Danielsson},
  title     = {Beating the Productivity Checker Using Embedded Languages},
  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/g},
  doi       = {10.29007/l41f},
  pages     = {34-54},
  year      = {2012}}
Download PDFOpen PDF in browser