Logo image
Termination Casts: A Flexible Approach to Termination with General Recursion
Journal article   Open access

Termination Casts: A Flexible Approach to Termination with General Recursion

Aaron Stump, Vilhelm Sjoeberg and Stephanie Weirich
Electronic proceedings in theoretical computer science, Vol.43(43), pp.76-93
12/22/2010
DOI: 10.4204/EPTCS.43.6
url
https://doi.org/10.4204/EPTCS.43.6View
Published (Version of record) Open Access

Abstract

This paper proposes a type-and-effect system called T-eq down arrow, 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 T-eq down arrow to a logical theory of termination for general recursive, simply typed functions. Every typing judgment of T-eq down arrow is translated to a theorem expressing the appropriate termination property of the computational part of the T-eq down arrow term.
Computer Science Computer Science, Theory & Methods Science & Technology Technology

Details

Metrics

5 Record Views
Logo image