Skip to main content

Characterisations of Termination in Logic Programming

  • Chapter
Book cover Program Development in Computational Logic

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3049))

  • 872 Accesses

Abstract

The procedural interpretation of logic programs and queries is parametric to the selection rule, i.e. the rule that determines which atom is selected in each resolution step. Termination of logic programs and queries depends critically on the selection rule. In this survey, we present a unified view and comparison of seven notions of universal termination considered in the literature, and the corresponding classes of programs. For each class, we focus on a sufficient, and in most cases even necessary, declarative characterisation for determining that a program is in that class. By unifying different formalisms and making appropriate assumptions, we are able to establish a formal hierarchy between the different classes and their respective declarative characterisations.

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. Aguzzi, G., Modigliani, U.: Proving termination of logic program by transforming them into equivalent term rewriting systems. In: Shyamasundar, R.K. (ed.) FSTTCS 1993. LNCS, vol. 761, pp. 114–124. Springer, Heidelberg (1993)

    Google Scholar 

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

    Google Scholar 

  3. Apt, K.R., Bezem, M.: Acyclic programs. New Generation Computing 29(3), 335–363 (1991)

    Article  Google Scholar 

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

    Google Scholar 

  5. Apt, K.R., Luitjes, I.: Verification of logic programs with delay declarations. In: Alagar, V.S., Nivat, M. (eds.) AMAST 1995. LNCS, vol. 936, pp. 66–90. Springer, Heidelberg (1995)

    Google Scholar 

  6. Apt, K.R., Marchiori, E., Palamidessi, C.: A declarative approach for firstorder built-in’s of Prolog. Applicable Algebra in Engineering, Communication and Computation 5(3/4), 159–191 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  7. Apt, K.R., Pedreschi, D.: Reasoning about termination of pure Prolog programs. Information and Computation 106(1), 109–157 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  8. Apt, K.R., Pedreschi, D.: Modular termination proofs for logic and pure Prolog programs. In: Levi, G. (ed.) Advances in Logic Programming Theory, pp. 183–229. Oxford University Press, Oxford (1994)

    Google Scholar 

  9. Arts, T.: Automatically proving termination and innermost normalisation of term rewriting systems. PhD thesis, Universiteit Utrecht (1997)

    Google Scholar 

  10. Baudinet, M.: Proving termination properties of Prolog programs: a semantic approach. Journal of Logic Programming 14, 1–29 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  11. Bezem, M.A.: Strong termination of logic programs. Journal of Logic Programming 15(1&2), 79–98 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  12. Bol, R.N., Apt, K.R., Klop, J.W.: An analysis of loop checking mechanism for logic programs. Theoretical Computer Science 86(1), 35–79 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  13. Bossi, A., Cocco, N., Etalle, S., Rossi, S.: On modular termination proofs of general logic programs. Theory and Practice of Logic Programming 2(3), 263–291 (2002)

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  15. Bossi, A., Etalle, S., Rossi, S.: Semantics of input-consuming logic programs. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 194–208. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  16. Bossi, A., Etalle, S., Rossi, S.: Properties of input-consuming derivations. Theory and Practice of Logic Programming 2(2), 125–154 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  17. Bossi, A., Etalle, S., Rossi, S., Smaus, J.-G.: Semantics and termination of simply moded logic programs with dynamic scheduling. In: Transactions on Computational Logic (2004), To appear in summer 2004

    Google Scholar 

  18. Braem, C., Le Charlier, B., Modart, S., Van Hentenryck, P.: Cardinality analysis of Prolog. In: Bruynooghe, M. (ed.) Proc. of the International Logic Programming Symposium, pp. 457–471. MIT Press, Cambridge (1994)

    Google Scholar 

  19. Bruynooghe, M., Vandecasteele, H., de Waal, D.A., Denecker, M.: Detecting unsolvable queries for definite logic programs. In: Palamidessi, C., Meinke, K., Glaser, H., et al. (eds.) ALP 1998 and PLILP 1998. LNCS, vol. 1490, pp. 118–133. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  20. Cavedon, L.: Continuity, consistency, and completeness properties for logic programs. In: Levi, G., Martelli, M. (eds.) Proceedings of the 6th International Conference on Logic Programming, pp. 571–584. The MIT Press, Cambridge (1989)

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  22. Colussi, L., Marchiori, E., Marchiori, M.: On termination of constraint logic programs. In: Bruynooghe, M., Penjam, J. (eds.) CP 1995. LNCS, vol. 976, pp. 431–448. Springer, Heidelberg (1995)

    Google Scholar 

  23. 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 

  24. 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 

  25. De Schreye, D., Verschaetse, K., Bruynooghe, M.: A framework for analyzing the termination of definite logic programs with respect to call patterns. In: Proc. of the International Conference on Fifth Generation Computer Systems, pp. 481–488. Institute for New Generation Computer Technology (1992)

    Google Scholar 

  26. Debray, S.K., Lin, N.W.: Cost analysis of logic programs. ACM Transactions on Programming Languages and Systems 15(5), 826–875 (1993)

    Article  Google Scholar 

  27. Decorte, S., De Schreye, D., Fabris, M.: Automatic inference of norms: A missing link in automatic termination analysis. In: Miller, D. (ed.) Proc. of the International Logic Programming Symposium, pp. 420–436. The MIT Press, Cambridge (1993)

    Google Scholar 

  28. Decorte, S., De Schreye, D., Leuschel, M., Martens, B., Sagonas, K.: Termination analysis for tabled logic programming. In: Fuchs, N.E. (ed.) LOPSTR 1997. LNCS, vol. 1463, pp. 111–127. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  29. Decorte, S., De Schreye, D., Vandecasteele, H.: Constraint-based termination analysis of logic programs. ACM Transactions on Programming Languages and Systems 21(6), 1137–1195 (1999)

    Article  Google Scholar 

  30. Deransart, P., Małuszyński, J.: A Grammatical View of Logic Programming. MIT Press, Cambridge (1993)

    MATH  Google Scholar 

  31. Dershowitz, N., Lindenstrauss, N., Sagiv, Y., Serebrenik, A.: A general framework for automatic termination analysis of logic programs. Applicable Algebra in Engineering, Communication and Computing (1/2), 117–156 (2001)

    Google Scholar 

  32. Etalle, S., Bossi, A., Cocco, N.: Termination of well-moded programs. Journal of Logic Programming 38(2), 243–257 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  33. Floyd, R.W.: Assigning meaning to programs. In: Schwartz, J.T. (ed.) Proc. Symposium in Applied Mathematics. Mathematical Aspects in Computer Science, vol. 19, pp. 19–32. AMS, Providence (1967)

    Google Scholar 

  34. Frühwirth, T.: Proving termination of constraint solver programs. In: Apt, K.R., Kakas, A.C., Monfroy, E., Rossi, F. (eds.) Compulog Net WS 1999. LNCS (LNAI), vol. 1865, p. 298. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  35. Ganzinger, H., Waldmann, U.: Termination proofs of well-moded logic programs via conditional rewrite systems. In: Rusinowitch, M., Remy, J.-L. (eds.) CTRS 1992. LNCS, vol. 656, pp. 430–437. Springer, Heidelberg (1993)

    Google Scholar 

  36. Gori, R.: An abstract interpretation approach to termination of logic programs. In: Parigot, M., Voronkov, A. (eds.) LPAR 2000. LNCS (LNAI), vol. 1955, pp. 362–380. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  37. Hermenegildo, M.V., Bueno, F., Puebla, G., López, P.: Program analysis, debugging, and optimization using the Ciao system preprocessor. In: De Schreye, D. (ed.) Proc. of the International Conference on Logic Programming, pp. 52–66. MIT Press, Cambridge (1999)

    Google Scholar 

  38. Hill, P.M., Lloyd, J.W.: The Gödel Programming Language. The MIT Press, Cambridge (1994)

    MATH  Google Scholar 

  39. Hoarau, S., Mesnard, F.: Inferring and compiling termination for constraint logic programs. In: Flener, P. (ed.) LOPSTR 1998. LNCS, vol. 1559, pp. 240–254. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  40. Kowalski, R.A.: Algorithm = Logic + Control. Communications of the ACM 22(7), 424–436 (1979)

    Article  MATH  Google Scholar 

  41. Krishna Rao, M.R.K., Kapur, D., Shyamasundar, R.K.: A transformational methodology for proving termination of logic programs. In: Kleine Büning, H., Jäger, G., Börger, E., Richter, M.M. (eds.) CSL 1991. LNCS, vol. 626, pp. 213–226. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  42. Krishna Rao, M.R.K., Kapur, D., Shyamasundar, R.K.: Proving termination of GHC programs. New Generation Computing 15(3), 293–338 (1997)

    Article  Google Scholar 

  43. Krishna Rao, M.R.K., Kapur, D., Shyamasundar, R.K.: Transformational methodology for proving termination of logic programs. Journal of Logic Programming 34(1), 1–41 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  44. Lindenstrauss, N., Sagiv, Y.: Automatic termination analysis of logic programs. In: Naish, L. (ed.) Proc. of the 14th International Conference on Logic Programming, pp. 63–77. The MIT Press, Cambridge (1997)

    Google Scholar 

  45. Lüttringhaus-Kappel, S.: Control generation for logic programs. In: Warren, D.S. (ed.) Proceedings of the 10th International Conference on Logic Programming, pp. 478–495. MIT Press, Cambridge (1993)

    Google Scholar 

  46. Marchiori, E.: On termination of general logic programs w.r.t. constructive negation. Journal of Logic Programming 26(1), 69–89 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  47. Marchiori, E., Teusink, F.: On termination of logic programs with delay declarations. Journal of Logic Programming 39(1-3), 95–124 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  48. 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 

  49. Martin, J., King, A.: Generating efficient, terminating logic programs. In: Bidoit, M., Dauchet, M. (eds.) CAAP 1997, FASE 1997, and TAPSOFT 1997. LNCS, vol. 1214, pp. 273–284. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  50. McPhee, R.: Compositional Logic Programming. PhD thesis, Oxford University Computing Laboratory (2000)

    Google Scholar 

  51. Mesnard, F.: Inferring left-terminating classes of queries for constraint logic programs. In: Maher, M. (ed.) Proc. of the Joint International Conference and Symposium on Logic Programming, pp. 7–21. The MIT Press, Cambridge (1996)

    Google Scholar 

  52. Mesnard, F., Neumerkel, U.: Applying static analysis techniques for inferring termination conditions of logic programs. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, pp. 93–110. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  53. Mesnard, F., Payet, É., Neumerkel, U.: Detecting optimal termination conditions of logic programs. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 509–526. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  55. Naish, L.: Coroutining and the construction of terminating logic programs. Technical Report 92/5, Department of Computer Science, University of Melbourne (1992)

    Google Scholar 

  56. 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 

  57. Pedreschi, D., Mancarella, P., Ruggieri, S.: Negation as failure through abduction: Reasoning about termination. In: Kakas, A.C., Sadri, F. (eds.) Computational Logic: Logic Programming and Beyond. LNCS (LNAI), vol. 2407, pp. 240–272. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  58. Pedreschi, D., Ruggieri, S.: Bounded nondeterminism of logic programs. In: De Schreye, D. (ed.) Proc. of the International Conference on Logic Programming, pp. 350–364. The MIT Press, Cambridge (1999); Extended version to appear in Annals of Mathematics and Artificial Intelligence

    Google Scholar 

  59. Pedreschi, D., Ruggieri, S.: On logic programs that always succeed. Science of Computer Programming 48(2-3), 163–196 (2003); Extended version of the paper: On logic programs that do not fail. In: Proc. of ICLP 1999 Workshop on Verification of Logic Programs. ENTCS, vol. 30(1) (1999)

    Google Scholar 

  60. Pedreschi, D., Ruggieri, S., Smaus, J.-G.: Classes of terminating logic programs. Theory and Practice of Logic Programming 2(3), 369–418 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  61. Ruggieri, S.: Termination of constraint logic programs. In: Degano, P., Gorrieri, R., Marchetti-Spaccamela, A. (eds.) ICALP 1997. LNCS, vol. 1256, pp. 838–848. Springer, Heidelberg (1997)

    Google Scholar 

  62. Ruggieri, S.: Verification and Validation of Logic Programs. PhD thesis, Dipartimento di Informatica, Università di Pisa (1999)

    Google Scholar 

  63. Ruggieri, S.: ∃-universal termination of logic programs. Theoretical Computer Science 254(1-2), 273–296 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  64. Serebrenik, A.: Termination Analysis of Logic Programs. PhD thesis, Katholieke Universiteit, Leuven (2003)

    Google Scholar 

  65. Serebrenik, A., De Schreye, D.: On termination of logic programs with floating point computations. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 151–164. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  66. Smaus, J.-G.: Modes and Types in Logic Programming. PhD thesis, University of Kent at Canterbury (1999)

    Google Scholar 

  67. Smaus, J.-G.: Proving termination of input-consuming logic programs. In: De Schreye, D. (ed.) Proc. of the International Conference on Logic Programming, pp. 335–349. MIT Press, Cambridge (1999)

    Google Scholar 

  68. Smaus, J.-G.: Termination of logic programs for various dynamic selection rules. Technical Report 191, Insitut für Informatik, Universität Freiburg (2003)

    Google Scholar 

  69. Smaus, J.-G., Hill, P.M., King, A.M.: Verifying termination and error-freedom of logic programs with block declarations. Theory and Practice of Logic Programming 1(4), 447–486 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  70. Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming 29(1-3), 17–64 (1996)

    Article  MATH  Google Scholar 

  71. Speirs, C., Somogyi, Z., Søndergaard, H.: Termination analysis for Mercury. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 160–171. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  72. Sterling, L., Shapiro, E.: The Art of Prolog. The MIT Press, Cambridge (1986)

    MATH  Google Scholar 

  73. Swedish Institute of Computer Science. SICStus Prolog User’s Manual (2003), http://www.sics.se/isl/sicstuswww/site/documentation.html

  74. Thom, J., Zobel, J.: NU-Prolog reference manual, version 1.3. Technical report, Department of Computer Science, University of Melbourne, Australia (1988)

    Google Scholar 

  75. Ueda, K.: Guarded Horn Clauses, a parallel logic programming language with the concept of a guard. In: Nivat, M., Fuchi, K. (eds.) Programming of Future Generation Computers, pp. 441–456. North Holland, Amsterdam (1988)

    Google Scholar 

  76. Verbaeten, S.: Termination analysis for abductive general logic programs. In: De Schreye, D. (ed.) Proc. of the International Conference on Logic Programming, pp. 365–379. The MIT Press, Cambridge (1999)

    Google Scholar 

  77. Verbaeten, S., Sagonas, K., De Schreye, D.: Termination proofs for logic programs with tabling. ACM Transactions on Computational Logic 2(1), 57–92 (2001)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Pedreschi, D., Ruggieri, S., Smaus, JG. (2004). Characterisations of Termination in Logic Programming. In: Bruynooghe, M., Lau, KK. (eds) Program Development in Computational Logic. Lecture Notes in Computer Science, vol 3049. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-25951-0_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-25951-0_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22152-4

  • Online ISBN: 978-3-540-25951-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics