Abstract
The objective of control generation in logic programming is to automatically derive a computation rule for a program that is efficient and yet does not compromise program correctness. Progress in solving this important problem has been slow and, to date, only partial solutions have been proposed where the generated programs are either incorrect or inefficient. We show how the control generation problem can be tackled with a simple automatic transformation that relies on information about the depths of SLD-trees. To prove correctness of our transform we introduce the notion of a semi delay recurrent program which generalises previous ideas in the termination literature for reasoning about logic programs with dynamic selection rules.
Chapter PDF
References
K.R. Apt and M. Bezem. Acyclic programs. In ICLP, pages 617–633. MIT Press, 1990.
K.R. Apt and D. Pedreschi. Proving termination of general Prolog programs. In TACS'91, volume 526 of LNCS, pages 265–289. Springer-Verlag, 1991.
K.R. Apt and D. Pedreschi. Modular termination proofs for logic and pure Prolog programs. In Fourth International School for Computer Science Researchers. OUP, 1994.
F. Benoy and A. King. Inferring argument size relations with CLP(R). In LOPSTR'96. Springer-Verlag, 1996.
M. Bezem. Characterizing termination of logic programs with level mappings. In NACLP'89, pages 69–80, Cleveland, Ohio, USA, 1989. MIT Press.
P.M. Hill and J.W. Lloyd. The Gödel Programming Language. MIT Press, 1994.
Intelligent Systems Laboratory, SICS, PO Box 1263, S-164 28 Kista, Sweden. SICStus Prolog User's Manual, 1995.
R. Kowalski. Algorithm=Logic+Control. CACM, 22(7):424–436, July 1979.
J.W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.
S. Lüttringhaus-Kappel. Control Generation for Logic Programs. In ICLP'93, pages 478–495. MIT Press, 1993.
E. Marchiori and F. Teusink. Proving termination of logic programs with delay declarations. In ILPS'95, pages 447–461. MIT Press, 1995.
E. Marchiori and F. Teusink. Proving deadlock freedom of logic programs with dynamic scheduling. In JICSLP'96 Post-Conference Workshop W2 on Verification and Analysis of Logic Programs, Bonn, 1996. TR-96-31, University of Pisa, Italy.
F. Mesnard. Towards Automatic Control for CLP(X) Programs. In LOPSTR'95. Springer-Verlag, 1995.
L. Naish. Coroutining and the construction of terminating logic programs. In Australian Computer Science Conference, Brisbane, February 1993.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Martin, J.C., King, A. (1997). Generating efficient, terminating logic programs. In: Bidoit, M., Dauchet, M. (eds) TAPSOFT '97: Theory and Practice of Software Development. CAAP 1997. Lecture Notes in Computer Science, vol 1214. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0030603
Download citation
DOI: https://doi.org/10.1007/BFb0030603
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-62781-4
Online ISBN: 978-3-540-68517-3
eBook Packages: Springer Book Archive