Skip to main content

Inferring Termination Conditions for Logic Programs Using Backwards Analysis

  • Conference paper
  • First Online:
Logic for Programming, Artificial Intelligence, and Reasoning (LPAR 2001)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 2250))

Abstract

This paper focuses on the inference of modes for which a logic program is guaranteed to terminate. This generalizes traditional termination analysis where an analyzer tries to verify termination for a specified mode. The contribution is a methodology which combines traditional termination analysis and backwards analysis to obtain termination inference. This leads to a better understanding of termination inference, simplifies its formal justification, and facilitates implementation. We evaluate the application of this approach to enhance an existing termination analyzer to perform also termination inference.

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
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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.

Similar content being viewed by others

References

  1. K.R. Apt. Introduction to logic programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B: Formal Models and Semantics, pages 495–574. Elsevier, Amsterdam and The MIT Press, Cambridge, 1990.

    Google Scholar 

  2. F. Benoy and A. King. Inferring argument size relationships with CLP(R). In Sixth International Workshop on Logic Program Synthesis and Transformation (LOPSTR’ 96), pages 204–223, 1996.

    Google Scholar 

  3. A. Bro dsky and Y. Sagiv. Inference of monotonicity constraints in Datalog programs. In Proceedings of the Eighth ACM SIGACT-SIGART-SIGMOD Symposium on Principles of Database Systems, pages 190–199, 1989.

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  5. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints.In Proc. 4th ACM Symp. Principles of Programming Languages, pages 238–252, New York, 1977.A CM Press.

    Chapter  Google Scholar 

  6. P. Cousot and R. Cousot. Abstract interpretation and application to logic programs. The Journal of Logic Programming, 13(2–3):103–179, 1992.

    Article  MATH  MathSciNet  Google Scholar 

  7. Patrick Cousot and Nicholas Halbwachs. Automatic discovery of linear restraints among variables of a program.In Proceedings of the Fifth Annual ACM Symposium on Principles of Programming Languages, pages 84–96, January 1978.

    Google Scholar 

  8. D. De Schreye and K. Verschaetse. Deriving linear size relations for logic programs by abstract interpretation. New Generation Computing, 13(02):117–154, 1995.

    Article  Google Scholar 

  9. S. Genaim and M. Codish. Inferring termination conditions for logic programs using backwards analysis.Technical report, Ben-Gurion University of the Negev, 2001. http://www.cs.bgu.ac.il/~mcodish/Papers.

  10. R. Giacobazzi and F. Scozzari. A logical model for relational abstract domains. ACM Transactions on Programming Languages and Systems, 20(5):1067–1109, 1998.

    Article  Google Scholar 

  11. M. Karr. Affine relationships among variables of a program. Acta Informatica, 6:133–151, 1976.

    Article  MATH  MathSciNet  Google Scholar 

  12. A. King and L. Lu. A backward analysis for constraint logic programs. Technical report, Kent University, 2001.

    Google Scholar 

  13. J.W. Lloyd. Foundations of Logic Programming. Springer-V erlag, Berlin, second edition, 1987.

    Google Scholar 

  14. K. Marriott and H. Søndergaard. Precise and efficient groundness analysis for logic rograms. ACM Letters on Programming Languages and Systems, 2(1–4):181–196, 1993.

    Article  Google Scholar 

  15. F. Mesnard. Inferring left-terminating classes of queries for constraint logic programs. Proc. of JICSLP’96, pages 7–21, 1996.

    Google Scholar 

  16. F. Mesnard and U. Neumerk el. Applying statsic analysis techniques for inferring termination conditions of logi programs. In Static Analysis Symposium, 2001.

    Google Scholar 

  17. F. Mesnard and S. Ruggieri. On proving left termination of constraint logic programs. T echnical report, Universite de La Reunion, 2001.

    Google Scholar 

  18. K. Sohn and A. van Gelder. Termination dedection in logic programs using argument sizes. In Intl. Symp. on Principles of Database Systems, pages 216–226. ACM Press, 1991.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Genaim, S., Codish, M. (2001). Inferring Termination Conditions for Logic Programs Using Backwards Analysis. In: Nieuwenhuis, R., Voronkov, A. (eds) Logic for Programming, Artificial Intelligence, and Reasoning. LPAR 2001. Lecture Notes in Computer Science(), vol 2250. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45653-8_47

Download citation

  • DOI: https://doi.org/10.1007/3-540-45653-8_47

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-42957-9

  • Online ISBN: 978-3-540-45653-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics