Abstract
We provide a theoretical basis for studying termination of logic programs with the Prolog selection rule. To this end we study the class of left terminating programs. These are logic programs that terminate with the Prolog selection rule for all ground goals. First we show that various ways of defining semantics coincide for left terminating programs. Then we offer a characterization of left terminating programs that provides us with a practical method of proving termination. The method is proven to be complete and is illustrated by giving simple proofs of termination of the quicksort, permutation and mergesort programs for the desired class of goals.
This research was partly done during the author’s stay at the Department of Computer Sciences, University of Texas at Austin, Austin, Texas, U.S.A. . First author’s work was partly supported by ESPRIT Basic Research Action 3020 (Integration). Second author’s work was partly supported by ESPRIT Basic Research Action 3012 (Compulog) and by the Italian National Research Council — C.N.R..
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
K. R. Apt. Introduction to logic programming. Technical Report CS-R8826, Centre for Mathematics and Computer Science, 1988. To appear in “Handbook of Theoretical Computer Science”, North Holland (J. van Leeuwen, ed.).
K. R. Apt and M. H. van Emden. Contributions to the theory of logic programming. J. ACM, 29(3):841–862, 1982.
M. Baudinet. Proving termination properties of PROLOG programs. In Proceedings of the 3rd Annual Symposium on Logic in Computer Science (LICS), pages 336–347, Edinburgh, Scotland, 1988.
M. Bezem. Characterizing termination of logic programs with level mappings. In E. L. Lusk and R. A. Overbeek, editors, Proceedings of the North American Conference on Logic Programming, pages 69–80. The MIT Press, 1989.
H. A. Blair. Decidability in the Herbrand Base. Manuscript (presented at the Workshop on Foundations of Deductive Databases and Logic Programming, Washington D.C., August 1986), 1986.
L. Cavedon. Continuity, consistency, and completeness properties for logic programs. In G. Levi and M. Martelli, editors, Proceedings of the Sixth International Conference on Logic Programming, pages 571–584. The MIT Press, 1989.
Y. Deville. Logic Programming. Systematic Program Development. International Series in Logic Programming. Addison-Wesley, 1990.
P. Dembinski and J. Maluszynski. AND-parallelism with intelligent backtracking for annotated logic programs. In Proceedings of the International Symposium on Logic Programming, pages 29–38, Boston, 1985.
M. Fitting. A Kripke-Kleene semantics for general logic programs. Journal of Logic Programming, 2:295–312, 1985.
R. W. Floyd. Assigning meanings to programs. In Proceedings Symposium on Applied Mathematics, 19, Math. Aspects in Computer Science, pages 19–32. American Society, 1967.
S. C. Kleene. Introduction to Metamathematics. van Nostrand, New York, 1952.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, second edition, 1987.
L. Plümer. Termination Proofs for Logic Programs. Lecture Notes in Artificial Intelligence 446, Springer-Verlag, Berlin, 1990.
L. Plümer. Termination proofs for logic programs based on predicate inequalities. In D. H. D. Warren and P. Szeredi, editors, Proceedings of the Seventh International Conference on Logic Programming, pages 634–648. The MIT Press, 1990.
J. D. Ullman and A. van Gelder. Efficient tests for top-down termination of logical rules. J. ACM, 35(2):345–373, 1988.
T. Vasak and J. Potter. Characterization of terminating logic programs. In Proceedings of the 1986 IEEE Symposium on Logic Programming, 1986.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1990 ECSC — EEC — EAEC, Brussels — Luxembourg
About this paper
Cite this paper
Apt, K.R., Pedreschi, D. (1990). Studies in Pure Prolog: Termination. In: Lloyd, J.W. (eds) Computational Logic. ESPRIT Basic Research Series. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-76274-1_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-76274-1_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-76276-5
Online ISBN: 978-3-642-76274-1
eBook Packages: Springer Book Archive