Skip to main content

Studies in Pure Prolog: Termination

  • Conference paper
Computational Logic

Part of the book series: ESPRIT Basic Research Series ((ESPRIT BASIC))

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

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.).

    Google Scholar 

  2. K. R. Apt and M. H. van Emden. Contributions to the theory of logic programming. J. ACM, 29(3):841–862, 1982.

    Article  MATH  Google Scholar 

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

    Chapter  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  7. Y. Deville. Logic Programming. Systematic Program Development. International Series in Logic Programming. Addison-Wesley, 1990.

    Google Scholar 

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

    Google Scholar 

  9. M. Fitting. A Kripke-Kleene semantics for general logic programs. Journal of Logic Programming, 2:295–312, 1985.

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

  11. S. C. Kleene. Introduction to Metamathematics. van Nostrand, New York, 1952.

    MATH  Google Scholar 

  12. J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, second edition, 1987.

    MATH  Google Scholar 

  13. L. Plümer. Termination Proofs for Logic Programs. Lecture Notes in Artificial Intelligence 446, Springer-Verlag, Berlin, 1990.

    MATH  Google Scholar 

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

    Google Scholar 

  15. J. D. Ullman and A. van Gelder. Efficient tests for top-down termination of logical rules. J. ACM, 35(2):345–373, 1988.

    Article  Google Scholar 

  16. T. Vasak and J. Potter. Characterization of terminating logic programs. In Proceedings of the 1986 IEEE Symposium on Logic Programming, 1986.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics