Improved Termination Analysis of CHR Using Self-sustainability Analysis
In the past few years, several successful approaches to termination analysis of Constraint Handling Rules (CHR) have been proposed. In parallel to these developments, for termination analysis of Logic Programs (LP), recent work has shown that a stronger focus on the analysis of the cycles in the strongly connected components (SCC) of the program is very beneficial, both for precision and efficiency of the analysis.
In this paper we investigate the benefit of using the cycles of the SCCs of CHR programs for termination analysis. It is a non-trivial task to define the notion of a cycle for a CHR program. We introduce the notion of a self-sustaining set of CHR rules and show that it provides a natural counterpart for the notion of a cycle in LP. We prove that non-self-sustainability of an SCC in a CHR program entails termination for all queries to that SCC. Then, we provide an efficient way to prove that an SCC of a CHR program is non-self-sustainable, providing an additional, new way of proving termination of (part of) the program.
We integrate these ideas into the CHR termination analyser CHRisTA and demonstrate by means of experiments that this extension significantly improves both the efficiency and the performance of the analyser.
KeywordsLogic Program Logic Programming Dependency Graph Linear Inequality Transition Relation
Unable to display preview. Download preview PDF.
- 2.Apt, K.R.: Logic programming. In: Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics (B), pp. 493–574 (1990)Google Scholar
- 3.Beasley, J.E. (ed.): Advances in linear and integer programming. Oxford University Press, Inc. (1996)Google Scholar
- 7.Farkas, J.G.: Über die theorie der einfachen ungleichungen. Journal für die Reine und Angewandte Mathematik 124, 1–27 (1902)Google Scholar
- 9.Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer (1987)Google Scholar
- 10.MiniSAT (2010), http://minisat.se/
- 14.Pilozzi, P., De Schreye, D.: Scaling termination proofs by a characterization of cycles in CHR. Technical Report CW 541, K.U.Leuven - Dept. of C.S., Leuven, Belgium (2009)Google Scholar
- 15.Pilozzi, P., De Schreye, D.: Scaling termination proofs by a characterisation of cycles in CHR. In: Termination Analysis, Proceedings of 11th International Workshop on Termination, WST 2010, United Kingdom, July 14-15 (2010)Google Scholar
- 16.Pilozzi, P., Schrijvers, T., De Schreye, D.: Proving termination of CHR in Prolog: A transformational approach. In: Termination Analysis, Proceedings of 9th International Workshop on Termination, WST 2007, Paris, France (June 2007)Google Scholar
- 19.SWI-Prolog (2010), http://www.swi-prolog.org
- 20.T-CoP (2010), http://people.cs.kuleuven.be/~paolo.pilozzi?pg=tcop
- 22.Termination Competition (2010), http://termination-portal.org/
- 23.Voets, D., De Schreye, D., Pilozzi, P.: A new approach to termination analysis of constraint handling rules. In: Pre-proceedings of Logic Programming, 18th International Symposium on Logic-Based Program Synthesis and Transformation, LOPSTR 2008, Valencia, Spain, pp. 28–42 (2008)Google Scholar