Termination Analysis of Logic Programs Based on Dependency Graphs

  • Manh Thang Nguyen
  • Jürgen Giesl
  • Peter Schneider-Kamp
  • Danny De Schreye
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4915)


This paper introduces a modular framework for termination analysis of logic programming. To this end, we adapt the notions of dependency pairs and dependency graphs (which were developed for term rewriting) to the logic programming domain. The main idea of the approach is that termination conditions for a program are established based on the decomposition of its dependency graph into its strongly connected components. These conditions can then be analysed separately by possibly different well-founded orders. We propose a constraint-based approach for automating the framework. Then, for example, termination techniques based on polynomial interpretations can be plugged in as a component to generate well-founded orders.


Logic Program Logic Programming Dependency Graph Ranking Function Termination Proof 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Arts, T., Giesl, J.: Termination of term rewriting using dependency pairs. Theoretical Computer Science 236(1-2), 133–178 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Bol, R.N., Apt, K.R., Klop, J.W.: An analysis of loop checking mechanisms for logic programs. Theoretical Computer Science 86(1), 35–79 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Bossi, A., Cocco, N., Fabris, M.: Norms on terms and their use in proving universal termination of a logic program. Theoretical Computer Science 124(2), 297–328 (1994)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Bruynooghe, M., Codish, M., Gallagher, J.P., Genaim, S., Vanhoof, W.: Termination analysis of logic programs through combination of type-based norms. ACM Transactions on Programming Languages and Systems 29(2) (2007)Google Scholar
  5. 5.
    Codish, M., Taboch, C.: A semantic basis for the termination analysis of logic programs. Journal of Logic Programming 41(1), 103–123 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Codish, M., Genaim, S.: Proving termination one loop at a time. In: Proc. WLPE 2003 (2003)Google Scholar
  7. 7.
    Contejean, E., Marché, C., Tomás, A.P., Urbain, X.: Mechanically proving termination using polynomial interpretations. Journal of Automated Reasoning 34(4), 325–363 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    De Schreye, D., Verschaetse, K., Bruynooghe, M.: A framework for analyzing the termination of definite logic programs with respect to call patterns. In: Proc. FGCS 1992, pp. 481–488 (1992)Google Scholar
  9. 9.
    De Schreye, D., Serebrenik, A.: Acceptability with General Orderings. In: Kakas, A.C., Sadri, F. (eds.) Computational Logic: Logic Programming and Beyond. LNCS (LNAI), vol. 2407, pp. 187–210. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  10. 10.
    Decorte, S., De Schreye, D., Vandecasteele, H.: Constraint-based automatic termination analysis of logic programs. ACM Transactions on Programming Languages and Systems 21(6), 1137–1195 (1999)CrossRefGoogle Scholar
  11. 11.
    Dershowitz, N.: Termination of rewriting. Journal of Symbolic Computation 3(1-2), 69–116 (1987)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Dershowitz, N., Lindenstrauss, N., Sagiv, Y., Serebrenik, A.: A general framework for automatic termination analysis of logic programs. In: Applicable Algebra in Engineering, Communication and Computing, 12(1,2), pp. 117–156 (2001)Google Scholar
  13. 13.
    Waldmann, J., Zantema, H., Endrullis, J.: Matrix Interpretations for Proving Termination of Term Rewriting. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS (LNAI), vol. 4130, pp. 574–588. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  14. 14.
    Fuhs, C., Giesl, J., Middeldorp, A., Schneider-Kamp, P., Thiemann, R., Zankl, H.: SAT Solving for Termination Analysis with Polynomial Interpretations. In: Marques-Silva, J., Sakallah, K.A. (eds.) SAT 2007. LNCS, vol. 4501, pp. 340–354. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Giesl, J., Arts, T., Ohlebusch, E.: Modular termination proofs for rewriting using dependency pairs. Journal of Symbolic Computation 34(1), 21–58 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Giesl, J., Thiemann, R., Schneider-Kamp, P.: The Dependency Pair Framework: Combining Techniques for Automated Termination Proofs. In: Baader, F., Voronkov, A. (eds.) LPAR 2004. LNCS (LNAI), vol. 3452, pp. 301–331. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  17. 17.
    Giesl, J., Schneider-Kamp, P., Thiemann, R.: AProVE 1.2: Automatic termination proofs in the dependency pair framework. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS (LNAI), vol. 4130, pp. 281–286. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  18. 18.
    Giesl, J., Thiemann, R., Schneider-Kamp, P., Falke, S.: Mechanizing and improving dependency pairs. Journal of Automated Reasoning 37(3), 155–203 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Hirokawa, N., Middeldorp, A.: Automating the dependency pair method. Information and Computation 199(1-2), 172–199 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Hong, H., Jakuš, D.: Testing positiveness of polynomials. Journal of Automated Reasoning 21(1), 23–38 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Kusakari, K., Nakamura, M., Toyama, Y.: Argument filtering transformation. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 48–62. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  22. 22.
    Lankford, D.S.: On proving term rewriting systems are Noetherian. Technical Report MTP-3, Louisiana Technical University, Ruston, LA, USA (1979)Google Scholar
  23. 23.
    Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: Proc. POPL 2001, pp. 81–92 (2001)Google Scholar
  24. 24.
    Marché, C., Zantema, H.: The Termination Competition. In: Baader, F. (ed.) RTA 2007. LNCS, vol. 4533, pp. 303–313. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  25. 25.
    Mesnard, F., Bagnara, R.: cTI: A constraint-based termination inference tool for ISO-Prolog. In: Theory and Practice of Logic Programming, vol. 5(1, 2), pp. 243–257 (2005)Google Scholar
  26. 26.
    Nguyen, M.T., De Schreye, D.: Polynomial Interpretations as a Basis for Termination Analysis of Logic Programs. In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668, pp. 311–325. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  27. 27.
    De Schreye, D., Nguyen, M.T.: Polytool: Proving Termination Automatically Based on Polynomial Interpretations. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 210–218. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  28. 28.
    Plümer, L.: Termination Proofs for Logic Programs. Springer, Heidelberg (1990)CrossRefzbMATHGoogle Scholar
  29. 29.
    Podelski, A., Rybalchenko, A.: Transition invariants. In: Proc. LICS 2004, pp. 32–41 (2004)Google Scholar
  30. 30.
    Ramsey, F.P.: On a problem of formal logic. Proc. London Math. Society 30, 264–286 (1930)MathSciNetCrossRefzbMATHGoogle Scholar
  31. 31.
    Schneider-Kamp, P., Giesl, J., Serebrenik, A., Thiemann, R.: Automated Termination Analysis for Logic Programs by Term Rewriting. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 177–193. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  32. 32.
    The termination problem data base,
  33. 33.
    Thiemann, R., Giesl, J.: The size-change principle and dependency pairs for termination of term rewriting. Applicable Algebra in Engineering, Communication and Computing 16(4), 229–270 (2005)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Manh Thang Nguyen
    • 1
  • Jürgen Giesl
    • 2
  • Peter Schneider-Kamp
    • 2
  • Danny De Schreye
    • 1
  1. 1.Department of Computer ScienceK. U. LeuvenBelgium
  2. 2.RWTH AachenGermany

Personalised recommendations