Abstract
This paper presents several verification methods for logic programs with delay declarations. It is shown how type and instantiation errors related to built-ins can be prevented, and how termination can be ensured. Three features are distinctive of this work: it is assumed that predicates can be used in several modes; it is shown that block declarations, which are a very simple delay construct, are sufficient to ensure the desired properties; the selection rule is taken into account, assuming it to be the rule of most Prolog implementations. The methods can be used both to verify existing programs and to assist in writing new programs.
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. From Logic Programming to Prolog. Prentice Hall, 1997.
K. R. Apt and S. Etalle. On the unification free Prolog programs. In A. Borzyszkowski and S. Sokolowski, editors, Proceedings of the Conference on Mathematical Foundations of Computer Science, LNCS, pages 1–19, Berlin, 1993. Springer-Verlag.
K. R. Apt and I. Luitjes. Verification of logic programs with delay declarations. In Proceedings of AMAST’95, LNCS, Berlin, 1995. Springer-Verlag. Invited Lecture.
A. Bossi and N. Cocco. Successes in logic programs. In P. Flener, editor, Proceedings of the 8th International Workshop on Logic Program Synthesis and Transformation, LNCS. Springer-Verlag, 1999.
D. De Schreye and S. Decorte. Termination of logic programs: the never-ending story. Journal of Logic Programming, 19/20:199–260, 1994.
S. Etalle, A. Bossi, and N. Cocco. Well-terminating programs. Journal of Logic Programming, 1998. Accepted for publication.
P. M. Hill, editor. ALP Newsletter, http://www-lp.doc.ic.ac.uk/alp/, February 1998. Pages 17,18.
Intelligent Systems Laboratory, Swedish Institute of Computer Science, PO Box 1263, S-164 29 Kista, Sweden. SICStus Prolog User’s Manual, 1997 http://www.sics.se/isl/sicstus/sicstus_toc.html
International Organization for Standardization. The ISO Prolog Standard, 1995 http://www.logic-programming.org/prologstd.html
M. R. K. Krishna Rao, D. Kapur, and R. K. Shyamasundar. A transformational methodology for proving termination of logic programs. In Proceedings of the 5th Conference for Computer Science Logic, LNCS, pages 213–226. Springer-Verlag, 1991.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.
S. Lüttringhaus-Kappel. Control generation for logic programs. In D. S. Warren, editor, Proceedings of the 10th International Conference on Logic Programming, pages 478–495. MIT Press, 1993.
E. Marchiori and F. Teusink. Proving termination of logic programs with delay declarations. In J. W. Lloyd, editor, Proceedings of the 12th International Logic Programming Symposium, pages 447–461. MIT Press, 1995.
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. M. King. Termination of logic programs with block declarations running in several modes. In C. Palamidessi, editor, Proceedings of the 10th Symposium on Programming Language Implementations and Logic Programming, LNCS. Springer-Verlag, 1998.
J.-G. Smaus, P. M. Hill, and A. M. 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
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Smaus, JG., Hill, P., King, A. (1999). Preventing Instantiation Errors and Loops for Logic Programs with Multiple Modes Using block Declarations. In: Flener, P. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 1998. Lecture Notes in Computer Science, vol 1559. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48958-4_16
Download citation
DOI: https://doi.org/10.1007/3-540-48958-4_16
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65765-1
Online ISBN: 978-3-540-48958-0
eBook Packages: Springer Book Archive