Skip to main content

Automated Termination Analysis for Logic Programs by Term Rewriting

  • Conference paper
Book cover Logic-Based Program Synthesis and Transformation (LOPSTR 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4407))

Abstract

There are two kinds of approaches for termination analysis of logic programs: “transformational” and “direct” ones. Direct approaches prove termination directly on the basis of the logic program. Transformational approaches transform a logic program into a term rewrite system (TRS) and then analyze termination of the resulting TRS instead. Thus, transformational approaches make all methods previously developed for TRSs available for logic programs as well. However, the applicability of most existing transformations is quite restricted, as they can only be used for certain subclasses of logic programs. (Most of them are restricted to well-moded programs.) In this paper we improve these transformations such that they become applicable for any definite logic program. To simulate the behavior of logic programs by TRSs, we slightly modify the notion of rewriting by permitting infinite terms. We show that our transformation results in TRSs which are indeed suitable for automated termination analysis. In contrast to most other methods for termination of logic programs, our technique is also sound for logic programming without occur check, which is typically used in practice. We implemented our approach in the termination prover AProVE and successfully evaluated it on a large collection of examples.

Supported by the Deutsche Forschungsgsmeinschaft DFG under grant GI 274/5-1.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. G. Aguzzi and U. Modigliani. Proving termination of logic programs by transforming them into equivalent term rewriting systems. In Proc. 13th FST & TCS, LNCS 761, pages 114–124, 1993.

    Google Scholar 

  2. Apt, K.R.: From Logic Programming to Prolog. Prentice-Hall, Englewood Cliffs (1997)

    Google Scholar 

  3. Apt, K.R., Etalle, S.: On the unification free Prolog programs. In: Borzyszkowski, A.M., Sokolowski, S. (eds.) MFCS 1993. LNCS, vol. 711, pp. 1–19. Springer, Heidelberg (1993)

    Google Scholar 

  4. Arts, T., Giesl, J.: Termination of term rewriting using dependency pairs. Theoretical Computer Science 236, 133–178 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  5. Arts, T., Zantema, H.: Termination of logic programs using semantic unification. In: Proietti, M. (ed.) LOPSTR 1995. LNCS, vol. 1048, pp. 219–233. Springer, Heidelberg (1996)

    Google Scholar 

  6. Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge (1998)

    Google Scholar 

  7. Bruynooghe, M., Codish, M., Gallagher, J., Genaim, S., Vanhoof, W.: Termination analysis of logic programs through combination of type-based norms. In: ACM Transactions on Programming Languages and Systems, ACM Press, New York (To appear, 2006)

    Google Scholar 

  8. Chtourou, M., Rusinowitch, M.: Méthode transformationelle pour la preuve de terminaison des programmes logiques. Unpublished manuscript (1993)

    Google Scholar 

  9. Codish, M., Lagoon, V., Stuckey, P.: Testing for termination with monotonicity constraints. In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668, pp. 326–340. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  10. Codish, M., Taboch, C.: A semantic basis for termination analysis of logic programs. Journal of Logic Programming 41(1), 103–123 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  11. Colmerauer, A.: Prolog and infinite trees. In: Clark, K.L., Tärnlund, S. (eds.) Logic Programming, Academic Press, London (1982)

    Google Scholar 

  12. De Schreye, D., Decorte, S.: Termination of logic programs: The never-ending story. Journal of Logic Programming 19/20, 199–260 (1994)

    Article  Google Scholar 

  13. 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)

    Chapter  Google Scholar 

  14. Dershowitz, N.: Termination of rewriting. J. Symb. Comp. 3, 69–116 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  15. Ganzinger, H., Waldmann, U.: Termination proofs of well-moded logic programs via conditional rewrite systems. In: Rusinowitch, M., Remy, J.-L. (eds.) Conditional Term Rewriting Systems. LNCS, vol. 656, pp. 216–222. Springer, Heidelberg (1993)

    Google Scholar 

  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)

    Google Scholar 

  17. Giesl, J., Schneider-Kamp, P., Thiemann, R.: AProVE 1.2: Automatic termination proofs in the DP framework. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS (LNAI), vol. 4130, pp. 281–286. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  18. Huet, G.: Résolution d’équations dans les langages d’ordre 1, 2, ...ω. PhD (1976)

    Google Scholar 

  19. Krishna Rao, M., Kapur, D., Shyamasundar, R.: Transformational methodology for proving termination of logic programs. J. Log. Prog. 34(1), 1–42 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  20. Lagoon, V., Mesnard, F., Stuckey, P.J.: Termination analysis with types is more accurate. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 254–268. Springer, Heidelberg (2003)

    Google Scholar 

  21. Leuschel, M., Sørensen, M.H.: Redundant argument filtering of logic programs. In: Gallagher, J.P. (ed.) LOPSTR 1996. LNCS, vol. 1207, pp. 83–103. Springer, Heidelberg (1997)

    Google Scholar 

  22. Lindenstrauss, N., Sagiv, Y., Serebrenik, A.: TermiLog: A system for checking ter- mination of queries to logic programs. In: Grumberg, O. (ed.) CAV 1997. LNCS, vol. 1254, pp. 444–447. Springer, Heidelberg (1997)

    Google Scholar 

  23. Marchiori, M.: Logic programs as term rewriting systems. In: Rodríguez-Artalejo, M., Levi, G. (eds.) ALP 1994. LNCS, vol. 850, pp. 223–241. Springer, Heidelberg (1994)

    Google Scholar 

  24. Marchiori, M.: Proving existential termination of normal logic programs. In: Nivat, M., Wirsing, M. (eds.) AMAST 1996. LNCS, vol. 1101, pp. 375–390. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  25. Mesnard, F., Bagnara, R.: cTI: A constraint-based termination inference tool for ISO-Prolog. Theory and Practice of Logic Programming 5(1-2), 243–257 (2005)

    Article  MATH  Google Scholar 

  26. Mesnard, F., Ruggieri, S.: On proving left termination of constraint logic programs. ACM Transaction on Computational Logic 4(2), 207–259 (2003)

    Article  MathSciNet  Google Scholar 

  27. 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)

    Chapter  Google Scholar 

  28. Ohlebusch, E.: Termination of logic programs: Transformational methods revisited. Appl. Algebra in Engineering, Communication and Computing 12, 73–116 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  29. Ohlebusch, E., Claves, C., Marché, C.: TALP: A tool for the termination analysis of logic programs. In: Bachmair, L. (ed.) RTA 2000. LNCS, vol. 1833, pp. 270–273. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  30. van Raamsdonk, F.: Translating logic programs into conditional rewriting systems. In: Proc. 14th ICLP, pp. 168–182. MIT Press, Cambridge (1997)

    Google Scholar 

  31. Serebrenik, A., De Schreye, D.: Proving termination with adornments. In: Bruynooghe, M. (ed.) Logic Based Program Synthesis and Transformation. LNCS, vol. 3018, pp. 108–109. Springer, Heidelberg (2004)

    Google Scholar 

  32. Serebrenik, A., De Schreye, D.: Inference of termination conditions for numerical loops in Prolog. Theory and Practice of Logic Programming 4, 719–751 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  33. Smaus, J.-G.: Termination of logic programs using various dynamic selection rules. In: Demoen, B., Lifschitz, V. (eds.) ICLP 2004. LNCS, vol. 3132, pp. 43–57. Springer, Heidelberg (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Germán Puebla

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Schneider-Kamp, P., Giesl, J., Serebrenik, A., Thiemann, R. (2007). Automated Termination Analysis for Logic Programs by Term Rewriting. In: Puebla, G. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2006. Lecture Notes in Computer Science, vol 4407. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71410-1_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-71410-1_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-71409-5

  • Online ISBN: 978-3-540-71410-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics