Skip to main content

Why the occur-check is not a problem

  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1992)

Abstract

In most Prolog implementations for the efficiency reasons so-called occur-check is omitted from the unification algorithm. We provide here natural syntactic conditions which allow the occur-check to be safely omitted. The established results apply to most well-known Prolog programs and seem to explain why this omission does not lead in practice to any complications.

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.

Similar content being viewed by others

References

  1. K. R. Apt. Logic programming. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, pages 493–574. Elsevier, 1990. Vol. B.

    Google Scholar 

  2. R. Chadha and D.A. Plaisted. Correctness of unification without occur check in Prolog. Technical report, Department of Computer Science, University of North Carolina, Chapel Hill, N.C., 1991.

    Google Scholar 

  3. P. Deransart, G. Ferrand, and M. Téguia. NSTO programs (not subject to occur-check). In V. Saraswat and K. Ueda, editors, Proceedings of the International Logic Symposium, pages 533–547. The MIT Press, 1991.

    Google Scholar 

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

  5. P. Deransart and J. Maluszynski. Relating Logic Programs and Attribute Grammars. Journal of Logic Programming, 2:119–156, 1985.

    Google Scholar 

  6. W. Drabent. Do Logic Programs Resemble Programs in Conventional Languages? In International Symposium on Logic Programming, pages 389–396. San Francisco, IEEE Computer Society, August 1987.

    Google Scholar 

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

    Google Scholar 

  8. J.-L. Lassez, M. J. Maher, and K. Marriott. Unification Revisited. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming, pages 587–625. Morgan Kaufmann, Los Altos, Ca., 1988.

    Google Scholar 

  9. A. Martelli and U. Montanari. An efficient unification algorithm. ACM Transactions on Programming Languages and Systems, 4:258–282, 1982.

    Google Scholar 

  10. A. Pellegrini. Sul problema dell' ”occur check” in Prolog. Technical report, Department of Computer Science, University of Padova, Padova, Italy, 1992. Tesi di Laurea, in Italian, to appear.

    Google Scholar 

  11. D.A. Plaisted. The occur-check problem in Prolog. In Proc. International Conference on Logic Programming, pages 272–280. IEEE Computer Science Press, 1984.

    Google Scholar 

  12. D.A. Rosenblueth. Using program transformation to obtain methods for eliminating backtracking in fixed-mode logic programs. Technical Report 7, Universidad Nacional Autonoma de Mexico, Institute de Investigaciones en Matematicas Aplicadas y en Sistemas, 1991.

    Google Scholar 

  13. L. Sterling and E. Shapiro. The Art of Prolog. MIT Press, 1986.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Maurice Bruynooghe Martin Wirsing

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Apt, K.R., Pellegrini, A. (1992). Why the occur-check is not a problem. In: Bruynooghe, M., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1992. Lecture Notes in Computer Science, vol 631. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55844-6_128

Download citation

  • DOI: https://doi.org/10.1007/3-540-55844-6_128

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55844-6

  • Online ISBN: 978-3-540-47297-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics