Program Inversion for Tail Recursive Functions

Abstract

Program inversion is a fundamental problem that has been addressed in
many different programming settings and applications. In the context
of term rewriting, several methods already exist for computing the
inverse of an injective function. These methods, however, usually
return non-terminating inverted functions when the considered function
is tail recursive. In this paper, we propose a direct and intuitive
approach to the inversion of tail recursive functions. Our new
technique is able to produce good results even without the use of an
additional post-processing of determinization or completion. Moreover,
when combined with a traditional approach to program inversion, it
constitutes a promising approach to define a general method for
program inversion. Our experimental results confirm that the new
technique compares well with previous approaches.