One Loop at a Time
Michael Codish, Samir Genaim, Maurice Bruynooghe, John P. Gallagher, Wim Vanhoof · 2003
Classic techniques for proving termination require the identification of a measure mapping program states to the elements of a well founded domain and to show that this measure decreases with each iteration of a loop in the program. This is a global termination condition — there is a single measure which must be shown to decrease over all of the loops in the program. In this abstract we look at systems based on local termination conditions which allow the involvement of different well founded domains and termination measures for different loops in the program. We illustrate the practical advantages of applying local criteria in automated termination proving systems and demonstrate how Ramsey’s Theorem clarifies their formal justification. Consider the following Prolog program defining the Ackermann function. There are three recursive calls in the program giving rise to loops in the executions of the program.