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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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.
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.
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.
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.
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.
P. Cousot and R. Cousot. Abstract interpretation and application to logic programs. The Journal of Logic Programming, 13(2–3):103–179, 1992.
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.
D. De Schreye and K. Verschaetse. Deriving linear size relations for logic programs by abstract interpretation. New Generation Computing, 13(02):117–154, 1995.
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.
R. Giacobazzi and F. Scozzari. A logical model for relational abstract domains. ACM Transactions on Programming Languages and Systems, 20(5):1067–1109, 1998.
M. Karr. Affine relationships among variables of a program. Acta Informatica, 6:133–151, 1976.
A. King and L. Lu. A backward analysis for constraint logic programs. Technical report, Kent University, 2001.
J.W. Lloyd. Foundations of Logic Programming. Springer-V erlag, Berlin, second edition, 1987.
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.
F. Mesnard. Inferring left-terminating classes of queries for constraint logic programs. Proc. of JICSLP’96, pages 7–21, 1996.
F. Mesnard and U. Neumerk el. Applying statsic analysis techniques for inferring termination conditions of logi programs. In Static Analysis Symposium, 2001.
F. Mesnard and S. Ruggieri. On proving left termination of constraint logic programs. T echnical report, Universite de La Reunion, 2001.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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