Beating the Productivity Checker Using Embedded Languages
Nils Anders Danielsson (University of Nottingham)

TL;DR
This paper presents a method to transform productive programs that are not guarded into guarded programs by defining a problem-specific language and creating a guarded interpreter, enhancing the usability of guarded corecursion.
Contribution
It introduces a novel approach to convert non-guarded productive programs into guarded ones using a problem-specific language and interpreter.
Findings
Enables non-guarded productive programs to be guarded.
Provides a systematic method for program transformation.
Improves the applicability of guarded corecursion techniques.
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
