Abstract
We show how termination of logic programs with delay declarations can be proven. Three features are distinctive of this work: (a) we assume that predicates can be used in several modes; (b) we show that block declarations, which are a very simple delay construct, are sufficient; (c) we take the selection rule into account, assuming it to be as in most Prolog implementations. Our method is based on identifying the so-called robust predicates, for which the textual position of an atom using this predicate is irrelevant. The method can be used to verify existing programs, and to assist in writing new programs. As a byproduct, we also show how programs can be proven to be free from occur-check and floundering.
Preview
Unable to display preview. Download preview PDF.
References
K. R. Apt. From Logic Programming to Prolog, chapter 6. Prentice Hall, 1997.
K. R. Apt and I. Luitjes. Verification of logic programs with delay declarations. In AMAST'95, LNCS, Berlin, 1995. Springer Verlag. Invited Lecture.
K. R. Apt and A. Pellegrini. On the occur-check free Prolog programs. ACM Toplas, 16(3):687–726, 1994.
R. Chadha and D.A. Plaisted. Correctness of unification without occur check in Prolog. Technical report, University of North Carolina, 1991.
Stefaan Decorte and Danny De Schreye. Automatic inference of norms: a missing link in automatic termination analysis. In D. Miller, editor, Proceedings of ILPS, pages 420–436. MIT Press, 1993.
P. M. Hill, editor. ALP Newsletter, http://www-lp.doc.ic.ac.uk/alp/, February 1998. Pages 17,18.
P. M. Hill and J. W. Lloyd. The Gödel Programming Language. MIT Press, 1994.
Intelligent Systems Laboratory, SICS, PO Box 1263, S-164 29 Kista, Sweden. SICStus Prolog User's Manual, 1997. http://www.sics.se/isl/sicstus/sicstus_toc.html.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.
S. Lüttringhaus-Kappel. Control generation for logic programs. In D. Warren, editor, Proceedings of ICLP, pages 478–495. MIT Press, 1993.
E. Marchiori and F. Teusink. Proving termination of logic programs with delay declarations. In J. Lloyd, editor, Proceedings of ILPS, pages 447–461. MIT Press, 1995.
K. Marriott, L. Naish, and J. L. Lassez. Most specific logic programs. Annals of mathematics and artificial intelligence, 1(2), 1990. Also in proceedings of the Fifth JICSLP.
A. Martelli and U. Montanari. An efficient unification algorithm. ACM Transactions on Programming Languages and Systems, 4:258–282, 1982.
L. Naish. Automatic control of logic programs. Journal of Logic Programming, 2(3):167–183, 1985.
L. Naish. Coroutining and the construction of terminating logic programs. Technical Report 92/5, University of Melbourne, 1992.
J.-G. Smaus, P. M. Hill, and A. King. Preventing instantiation errors and loops for logic programs with several modes using block declarations. In Pierre Flener, editor, Pre-proceedings of LOPSTR, number UMCS-98-6-1. University of Manchester, 1998. Extended abstract.
J.-G. Smaus, P. M. Hill, and A. King. Verification of logic programs with block declarations running in several modes. Technical Report 7-98, University of Kent at Canterbury, Canterbury, CT2 7NF, United Kingdom, July 1998.
Z. Somogyi, F. Henderson, and T. Conway. The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming, November 1996.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Smaus, JG., Hill, P., King, A. (1998). Termination of logic programs with block declarations running in several modes. In: Palamidessi, C., Glaser, H., Meinke, K. (eds) Principles of Declarative Programming. ALP PLILP 1998 1998. Lecture Notes in Computer Science, vol 1490. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0056608
Download citation
DOI: https://doi.org/10.1007/BFb0056608
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65012-6
Online ISBN: 978-3-540-49766-0
eBook Packages: Springer Book Archive