Skip to main content
Log in

Efficient Prolog memory management for flexible control strategies

  • Special Issue
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

A Prolog interpreter can be viewed as a process that searches a tree in order to produce the sets of terms at certain successful leaves. It does this by constructing the set of terms for each node in the tree. Moving from one node to another requires (re)construction of the set of terms at that node. The choice of representation of sets of terms influences the kind of tree search that can be supported.

The most efficient Prolog implementations represent terms by using chains of pointers through activation records. This is efficient because it allows much sharing of representation. However, it does constrain any search algorithm using these representations to be depth-first. There are various reasons why search orders other than depth-first might be desirable, not the least of which is to support a multiprocessor tree search. This paper describes a representation for terms that is comparable in efficiency to the best known, and yet supports arbitrary orders of tree search.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. Bruynooghe, M.: “The memory management of PROLOG implementations,” in Logic Programming, K. L. Clark and S.-Å. Tärnlund (eds.) (Academic Press, New York, NY) (1982) 83–98.

    Google Scholar 

  2. Mellish, C. S.: “An Alternative to Structure Sharing in the Implementation of a Prolog Interpreter,” in Logic Programming, K. L. Clark and S.-Å. Tärnlund (eds.) (Academic Press, New York, NY) (1982) 99–106.

    Google Scholar 

  3. Pereira, F. C. N. and Warren, D. H. D.: “Parsing as Deduction,” Proceedings of the 21st Annual Meeting of the Association for Computational Linguistics (Cambridge, MA) (June, 1983) 137–144.

  4. Warren, D. H. D.: “Implementing Prolog—Compiling Logic Programs, 1 and 2,” D. A. I. Research Report (University of Edinburgh, Edinburgh) (1977).

    Google Scholar 

  5. Warren, D. S.: “Efficient Parsing with General Grammars,” Tech. Rep. #81/028 (Dept. of Computer Science, SUNY, Stony Brook, NY) (July, 1981).

    Google Scholar 

  6. Warren, D. S., Ahamad, M., Debray, S. K. and Kale, L. V.: “Executing Distributed Prolog Programs on a Broadcast Network,” Tech. Rep. #83/054 (Dept. of Computer Science, SUNY, Stony Brook, NY) (August, 1983).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

Copyright © 1984 IEEE. Reprinted, with permission, from 1984 INTERNATIONAL SYMPOSIUM ON LOGIC PROGRAMMING, February 6–9, 1984, Atlantic City, NJ, pp. 198–202.

About this article

Cite this article

Warren, D.S. Efficient Prolog memory management for flexible control strategies. New Gener Comput 2, 361–369 (1984). https://doi.org/10.1007/BF03037327

Download citation

  • Received:

  • Issue Date:

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

Keywords

Navigation