Skip to main content

Preventing Instantiation Errors and Loops for Logic Programs with Multiple Modes Using block Declarations

  • Conference paper
  • First Online:
  • 195 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1559))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. K. R. Apt. From Logic Programming to Prolog. Prentice Hall, 1997.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. D. De Schreye and S. Decorte. Termination of logic programs: the never-ending story. Journal of Logic Programming, 19/20:199–260, 1994.

    Article  Google Scholar 

  6. S. Etalle, A. Bossi, and N. Cocco. Well-terminating programs. Journal of Logic Programming, 1998. Accepted for publication.

    Google Scholar 

  7. P. M. Hill, editor. ALP Newsletter, http://www-lp.doc.ic.ac.uk/alp/, February 1998. Pages 17,18.

  8. 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

  9. International Organization for Standardization. The ISO Prolog Standard, 1995 http://www.logic-programming.org/prologstd.html

  10. 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.

    Google Scholar 

  11. J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.

    Google Scholar 

  12. 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.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. L. Naish. Automatic control of logic programs. Journal of Logic Programming, 2(3):167–183, 1985.

    Article  MATH  Google Scholar 

  15. L. Naish. Coroutining and the construction of terminating logic programs. Technical Report 92/5, University of Melbourne, 1992.

    Google Scholar 

  16. 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.

    Google Scholar 

  17. 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.

    Google Scholar 

  18. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics