Proving Termination by Invariance Relations

  • Authors:
  • Paolo Pilozzi;Danny Schreye

  • Affiliations:
  • Dept. of Computer Science, K.U.Leuven, Belgium;Dept. of Computer Science, K.U.Leuven, Belgium

  • Venue:
  • ICLP '09 Proceedings of the 25th International Conference on Logic Programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.01

Visualization

Abstract

We propose a new constraint-based approach to termination analysis, applicable to Logic Programming (LP) and Constraint Handling Rules (CHR). Our approach further extends the existing constraint-based approaches for LP based on polynomial interpretations and introduces a whole new level of expressivity. We can handle problems such as bounded increase and integer arithmetic, elegantly. Furthermore, we are able to prove termination of programs that only terminate for subsets of the considered queries. Examples are algorithms that manipulate graphs and that only terminate if the graph in the input is cycle-free. This information cannot be represented, using the existing techniques in termination analysis. Therefore, we introduce invariance relations, representing relations among terms that hold on atoms during calls to the program. These relations can also be derived in a constraint-based manner and they can be used as a basis for a more expressive interpretation of the atoms of the program. We discuss our technique in the context of CHR, solving an important class of open problems containing transitivity rules. We also demonstrate the technique in an LP context and show that it is more powerful than existing constraint-based approaches.