Advertisement

Improved Termination Analysis of CHR Using Self-sustainability Analysis

  • Paolo Pilozzi
  • Danny De Schreye
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7225)

Abstract

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.

Keywords

Logic Program Logic Programming Dependency Graph Linear Inequality Transition Relation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abdennadher, S.: Operational Semantics and Confluence of Constraint Propagation Rules. In: Smolka, G. (ed.) CP 1997. LNCS, vol. 1330, pp. 252–266. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  2. 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. 3.
    Beasley, J.E. (ed.): Advances in linear and integer programming. Oxford University Press, Inc. (1996)Google Scholar
  4. 4.
    Blizard, W.D.: Multiset theory. Notre Dame Journal of Formal Logic 30(1), 36–66 (1989)MathSciNetzbMATHCrossRefGoogle Scholar
  5. 5.
    Decorte, S., De Schreye, D., Vandecasteele, H.: Constraint-based termination analysis of logic programs. ACM Trans. Program. Lang. Syst. 21(6), 1137–1195 (1999)CrossRefGoogle Scholar
  6. 6.
    Dershowitz, N., Manna, Z.: Proving termination with multiset orderings. Commun. ACM 22(8), 465–476 (1979)MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Farkas, J.G.: Über die theorie der einfachen ungleichungen. Journal für die Reine und Angewandte Mathematik 124, 1–27 (1902)Google Scholar
  8. 8.
    Frühwirth, T.W.: Theory and practice of constraint handling rules. J. Log. Program. 37(1-3), 95–138 (1998)zbMATHCrossRefGoogle Scholar
  9. 9.
    Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer (1987)Google Scholar
  10. 10.
    MiniSAT (2010), http://minisat.se/
  11. 11.
    Nguyen, M.T., Giesl, J., Schneider-Kamp, P., De Schreye, D.: Termination Analysis of Logic Programs Based on Dependency Graphs. In: King, A. (ed.) LOPSTR 2007. LNCS, vol. 4915, pp. 8–22. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Pilozzi, P., De Schreye, D.: Termination Analysis of CHR Revisited. In: Garcia de la Banda, M., Pontelli, E. (eds.) ICLP 2008. LNCS, vol. 5366, pp. 501–515. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  13. 13.
    Pilozzi, P., De Schreye, D.: Automating Termination Proofs for CHR. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 504–508. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  14. 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. 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. 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
  17. 17.
    Schneider-Kamp, P., Giesl, J., Nguyen, M.T.: The Dependency Triple Framework for Termination of Logic Programs. In: De Schreye, D. (ed.) LOPSTR 2009. LNCS, vol. 6037, pp. 37–51. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  18. 18.
    Sneyers, J., Van Weert, P., Schrijvers, T., De Koninck, L.: As time goes by: Constraint Handling Rules – A survey of CHR research between 1998 and 2007. Theory and Practice of Logic Programming 10(1), 1–47 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  19. 19.
    SWI-Prolog (2010), http://www.swi-prolog.org
  20. 20.
  21. 21.
    Tarjan, R.E.: Depth-first search and linear graph algorithms. SIAM J. Comput. 1(2), 146–160 (1972)MathSciNetzbMATHCrossRefGoogle Scholar
  22. 22.
    Termination Competition (2010), http://termination-portal.org/
  23. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Paolo Pilozzi
    • 1
  • Danny De Schreye
    • 1
  1. 1.Dept. of Computer ScienceK.U. LeuvenBelgium

Personalised recommendations