Skip to main content

Modular Termination Proofs for Prolog with Tabling

  • Conference paper
Principles and Practice of Declarative Programming (PPDP 1999)

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

  • 388 Accesses

Abstract

Tabling avoids many of the shortcomings of SLD(NF) execution and provides a more flexible and efficient execution mechanism for logic programs. In particular, tabled execution of logic programs terminates more often than execution based on SLD-resolution. One of the few works studying termination under a tabled execution mechanism is that of Decorte et al. They introduce and characterise two notions of universal termination of logic programs w.r.t. sets of queries executed under SLG-resolution, using the left-to-right selection rule; namely the notion of quasi-termination and the (stronger) notion of LG-termination. This paper extends the results of Decorte et al in two ways: (1) we consider a mix of tabled and Prolog execution, and (2) besides a characterisation of the two notions of universal termination under such a mixed execution, we also give modular termination conditions. From both practical and efficiency considerations, it is important to allow tabled and non-tabled predicates to be freely intermixed. This motivates the first extension. Concerning the second extension, it was already noted in the literature in the context of termination under SLD-resolution (by e.g. Apt and Pedreschi), that it is important for programming in the large to have modular termination proofs, i.e. proofs that are capable of combining termination proofs of separate programs to obtain termination proofs of combined programs.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

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.

Similar content being viewed by others

References

  1. Apt, K.: Logic programming. In: van Leeuwen, J. (ed.) Handbook of theoretical computer science, vol. B, Elsevier Science Publishers, Amsterdam (1990)

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  3. Apt, K., Pedreschi, D.: Modular termination proofs for logic and pure Prolog programs. Advances in Logic Programming Theory, 183–229 (1994)

    Google Scholar 

  4. Chen, W., Warren, D.S.: Tabled evaluation with delaying for general logic programs. J. ACM 43(l), 20–74 (1996)

    Article  MATH  MathSciNet  Google Scholar 

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

    MathSciNet  Google Scholar 

  6. De Schreye, D., Verschaetse, K., Bruynooghe, M.: A framework for analysing the termination of definite logic programs with respect to call patterns. In: Proc. FGCS 1992, ICOT Tokyo, pp. 481–488 (1992)

    Google Scholar 

  7. Decorte, S., De Schreye, D., Vandecasteele, H.: Constraint-based automatic termination analysis for logic programs. ACM TO PL AS (To appear)

    Google Scholar 

  8. 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. 107–123. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  9. Early, J.: An efficient context-free parsing algorithm. CACM 13(2), 94–102 (1970)

    Google Scholar 

  10. Falaschi, M., Levi, G., Martelli, M., Palamidessi, C.: Declarative modelling of the operational behaviour of logic languages. Theor. Comp. Sc. 69(3), 289–318 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  11. Hoist, C.K.: Finiteness Analysis. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 473–495. Springer, Heidelberg (1991)

    Google Scholar 

  12. Kanamori, T., Kawamura, T.: OLDT-based abstract interpretation. Journal of Logic Programming 15(1–2), 1–30 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  13. Lloyd, J.: Foundations of logic programming. Springer, Heidelberg (1987)

    MATH  Google Scholar 

  14. Pliimer, L.: Termination proofs for logic programs. In: Plümer, L. (ed.) Termination Proofs for Logic Programs. LNCS, vol. 446, Springer, Heidelberg (1990)

    Google Scholar 

  15. Tamaki, H., Sato, T.: OLD Resolution with Tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)

    Google Scholar 

  16. Verbaeten, S., De Schreye, D.: Termination analysis of tabled logic programs using mode and type information. Technical Report 277, Department of Computer Science, K.U.Leuven., Available at http://www.cs.kuleuven.ac.be/~sofie

  17. Verbaeten, S., Sagonas, K., De Schreye, D.: Modular termination proofs for Prolog with tabling. Technical Report, Department of Computer Science, K.U.Leuven (1999), Available at http://www.cs.kuleuven.ac.be/~sofie

  18. Vieille, L.: Recursive query processing: the power of logic. Theor. Comp. Sc. 69(l), 1–53 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  19. Warren, D.S.: Notes for ’Programming in Tabled Prolog. Early draft (1998), available at http://www.cs.sunysb.edu/~warren/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Verbaeten, S., Sagonas, K., De Schreye, D. (1999). Modular Termination Proofs for Prolog with Tabling. In: Nadathur, G. (eds) Principles and Practice of Declarative Programming. PPDP 1999. Lecture Notes in Computer Science, vol 1702. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10704567_21

Download citation

  • DOI: https://doi.org/10.1007/10704567_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66540-3

  • Online ISBN: 978-3-540-48164-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics