Skip to main content

A new data structure for implementing extensions to Prolog

  • Implementation Of Logic Programming
  • Conference paper
  • First Online:
Book cover Programming Language Implementation and Logic Programming (PLILP 1990)

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

Abstract

We propose a new data structure for implementing delayed computations in Prolog as efficiently as commonly employed solutions, together with the optimal memory management needed for this data structure. It appears that this data structure (and the associated memory management) is also useful for implementing other extensions where there is a need for reversibly modifying terms other than in the leaves, e.g. functional extensions.

We first recall that optimal memory management in Prolog is possible only when considering the binding states in a precise manner.

Then we describe the classical implementation of delayed computations, along with the new memory management problems involved. The conclusion is that a correct implementation, w.r.t memory management, is only possible when introducing a new data structure which is known by the garbage collector.

A memory management machine, called MALI, has been realized in our group following the principles described, and offering such a data structure, called the attributed variable. On top of this machine, we have implemented a number of extensions to Prolog.

In the course of our experiments, we have verified that the initial choice in the design of MALI, i.e. to make it independent from the procedural semantics of Prolog, was a good choice. Indeed, we have been able to implement various logic programming systems extending the so-called “pure-Prolog”, ranging from PrologII to λ-Prolog and fair proof strategies.

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.

Bibliography

  1. Y. Bekkers, B. Canet, O. Ridoux, L. Ungaro: A Short Note on Garbage Collection in Prolog Interpreters Logic Programming Newsletter, No 5, Lisboa, Portugal, 1983.

    Google Scholar 

  2. Y. Bekkers, B. Canet, O. Ridoux, L. Ungaro: A Memory Management Machine for Prolog Interpreters Proc. of the 2nd ICLP, Uppsala, Sweden, 1984.

    Google Scholar 

  3. Y. Bekkers, B. Canet, O. Ridoux, L. Ungaro: MALI: A Memory with a Real-Time Garbage Collector for Implementing Logic Programming Languages Proc. of the 3rd SLP, IEEE, Salt-Lake City, USA, 1986.

    Google Scholar 

  4. P.G. Bosco, E. Giovannetti: IDEAL: An Ideal Deductive Applicative Language Proc. of the 3rd SLP, Salt-Lake City, USA, 1986.

    Google Scholar 

  5. P. Brisset: Implémentation d'un langage de programmation logique d'ordre supérieur avec MALI Proc. of SPLT90, Trégastel, France, 1990.

    Google Scholar 

  6. M. Bruynooghe: A Note on Garbage Collection in Prolog Interpreters Proc. of the 1st ICLP, Marseilles, France, 1982.

    Google Scholar 

  7. M. Carlsson: Freeze, Indexing, and Other Implementation Issues in the WAM Logic Programming 2, J.L. Lassez, Ed, MIT Press, 1987.

    Google Scholar 

  8. L. Chevallier, S. Le Huitouze, O. Ridoux: Style de programmation poour une machine de programmation logique munie d'un récupérateur de mémoire Proc. of SPLT87, Trégastel, France, 1990.

    Google Scholar 

  9. L. Chevallier, S. Le Huitouze, O. Ridoux: Programmation of a Garbage Collection Logic Programming Machine Proc. of French-Soviet Workshop INFORMATIKA 88 on Methods of Compilation and Program Construction, INRIA, Nice, France, 1988.

    Google Scholar 

  10. S. Janot: Programmation logique avec des interpréteurs équitables Proc. of SPLT88, Trégastel, France, 1988.

    Google Scholar 

  11. S. Le Huitouze: Mise en oeuvre de PrologII/MALI Thesis, Université de Rennes I, 1988.

    Google Scholar 

  12. U. Neumerkel: Extensible Unification by Metastructures Proc. of META90, Leuven, Belgium, 1990.

    Google Scholar 

  13. E. Pittomvills, M. Bruynooghe, Y.D. Willems: Towards a Real Time Garbage Collector for Prolog Proc. of the 2nd Symposium on Logic Programming, 1985.

    Google Scholar 

  14. M. Van Caneghem: L'anatomie de PrologII Thesis, Université d'Aix-Marseille, 1984.

    Google Scholar 

  15. D.H.D. Warren: An abstract Prolog instruction set Technical Note 309, SRI International, 1983.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre Deransart Jan Maluszyński

Rights and permissions

Reprints and permissions

Copyright information

© 1990 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Le Huitouze, S. (1990). A new data structure for implementing extensions to Prolog. In: Deransart, P., Maluszyński, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1990. Lecture Notes in Computer Science, vol 456. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0024181

Download citation

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

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-53010-7

  • Online ISBN: 978-3-540-46298-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics