Skip to main content

Pruning infinite failure branches in programs with occur-check

  • Session 7: Implementation Aspects
  • Conference paper
  • First Online:
Logic Programming and Automated Reasoning (LPAR 1992)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 624))

  • 124 Accesses

Abstract

We propose an improved execution model for Prolog with occurcheck. Prolog's incompleteness is reduced in the case of difference-lists and similar data structures which are crucial for practical programming tasks. We show that adding the occur-check to the Prolog-system is not sufficient for using difference-lists in a reliable manner. In fact, most programs where the occur-check fails end up looping infinitely. By propagating the subterm annotations of variables via abstract interpretation we avoid the creation of these undesirable infinite SLD-trees. In addition, our extension provides a better framework for transformations of programs that use difference-lists that cannot be realized in the common framework of infinite trees.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Colmerauer. Prolog and infinite trees. Logic Programming, Academic Press 231–251, (1982).

    Google Scholar 

  2. J.W. Lloyd, Foundations of Logic Programming, (2nd.Ed.) Springer-Verlag, (1987).

    Google Scholar 

  3. P. Deransart and G. Ferrand and M. Téguia, NSTO Programs (Not Subject To Occur-check), ISLP'91, 533–550, (1991).

    Google Scholar 

  4. L. Plümer, Automatic Termination Proofs for Prolog Programs Operating on Non-ground Terms, ISLP'91 503–517, (1991).

    Google Scholar 

  5. M. Proietti and A. Pettorossi, Construction of Efficient Logic Programs by Loop Absorption and Generalization. Proc. Meta 90, Leuven, 57–81, (1990).

    Google Scholar 

  6. J. Robinson, Computational logic: The unification computation. Machine Intelligence 6, 63–72, (1971).

    Google Scholar 

  7. L.S. Sterling and E. Shapiro, The Art of Prolog, MIT Press, (1986).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Andrei Voronkov

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Neumerkel, U. (1992). Pruning infinite failure branches in programs with occur-check. In: Voronkov, A. (eds) Logic Programming and Automated Reasoning. LPAR 1992. Lecture Notes in Computer Science, vol 624. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0013059

Download citation

  • DOI: https://doi.org/10.1007/BFb0013059

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55727-2

  • Online ISBN: 978-3-540-47279-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics