Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Garbarge collection for Prolog based on WAM

Published: 01 June 1988 Publication History

Abstract

The Warren abstract machine (WAM) has become a generally accepted standard Prolog implementation technique. Garbage collection is an important aspect in the implementation of any Prolog system. A synopsis of the WAM is presented and then marking and compaction algorithms are shown that take advantage of WAM's unique use of the data areas. Marking and compaction are performed on both the heap and the trail; both use pointer reversal techniques, which obviate the need for extra stack space. However, two bits for every pointer on the heap are reserved for the garbage collection algorithm. The algorithm can work on segments of the heap, which may lead to a significant reduction of the total garbage collection time. The time of the algorithms are linear in the size of the areas.

References

[1]
Barklund, J., and Millroth, H. Garbage cut for garbage collection of iterative Prolog programs. In Proceedings of the 1986 Symposium on Logic Programming (Salt Lake City, Utah).
[2]
Bekkers, Y., Caner, B., Ridoux, O., and Ungaro. L. A short note on garbage collection in Prolog interpreters. Logic Programming Newsletter, no. 5 (Winter 83/84).
[3]
Bruynooghe, M. A note on garbage collection in Prolog interpreters. In Proceedings of the First International Logic Programming Conference, 1982, pp. 52-55.
[4]
Bruynooghe, M. Garbage collection in Prolog interpreters. In J. Campbell (Ed.), Implementations of PROLOG, Ellis Horwood, Chichester, England 1984, pp. 259-267.
[5]
Bruynooghe, M. The memory management of Prolog implementations. In K.L. Clark and S-A T~irnlund (Eds.), Logic Programming. Academic Press, New York, 1982, pp. 82-98.
[6]
Carlsson, M. Compilation for Tricia and its abstract machine. Tech. Rep. 35, 1986, UPMAIL, Uppsata University.
[7]
Gabriel. J., Lindholm, T., Lusk, E.L., and Overbeek, R.A. Tutorial on the Warren abstract machine for computational logic. Tech. Rep. ANL-84-84, Argonne National Lab., Argonne, Ill.
[8]
Lieberman, H., and Hewitt, C. A real lime garbage collector based on the life time of objects. Commun. ACM 26, 6 (June 1983), 419-429.
[9]
Morris, F.L. A time and space efficient garbage compaction algorithm. Commun. ACM 21, 8 (Aug, 1978), 662-665.
[10]
Sahlin, D. Garbage collection using the reset information and making tests deterministic using the rese! information. SICS working document. SICS, Kista, Sweden, Mar. 1986.
[11]
Sahtin, D. Making the garbage collection independent of the amount of garbage. Res. Rep. R87008, SICS, Kista, Sweden, ISSN 0283-3638.
[12]
Thorelli, L-E. Marking algorithms. BIT 12, 4 (1972), 555-568.
[13]
Pittomvils, E., Bruynooghe, M., Willems, Y.D. Towards a real time garbage collector for Prolog. In Proceedings of the Symposium on Logic Programming, 1985, pp. 185-198.
[14]
Warren, D.H.D. An abstract Prolog instruction set. Tech. Note 309, SRI International, Menlo Park, Calif., Oct. 1983.
[15]
Warren, D.H.D. Implementing Prolog--Compiling predicate logic programs. Rep. 39 and 40, University of Edinburgh, Department of Artificial Intelligence, Edinburgh, Scotland, May 1977.
[16]
Warren, D.S. The runtime environment for a Prolog compiler using a copy algorithm. Tech. Rep. 83/052, SUNY at Stony Brook, N.Y., 1983. Major revision. March 1984.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Communications of the ACM
Communications of the ACM  Volume 31, Issue 6
June 1988
149 pages
ISSN:0001-0782
EISSN:1557-7317
DOI:10.1145/62959
  • Editor:
  • P. J. Denning
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1988
Published in CACM Volume 31, Issue 6

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)125
  • Downloads (Last 6 weeks)19
Reflects downloads up to 26 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2013)Representation sharing for prologTheory and Practice of Logic Programming10.1017/S147106841100042113:1(71-106)Online publication date: 1-Jan-2013
  • (2012)Swi-prologTheory and Practice of Logic Programming10.1017/S147106841100049412:1-2(67-96)Online publication date: 1-Jan-2012
  • (2012)Sicstus prolog-the first 25 yearsTheory and Practice of Logic Programming10.1017/S147106841100048212:1-2(35-66)Online publication date: 1-Jan-2012
  • (2008)Comparing tag scheme variations using an abstract machine generatorProceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming10.1145/1389449.1389455(32-43)Online publication date: 15-Jul-2008
  • (2007)Incremental copying garbage collection for WAM-based Prolog systemsTheory and Practice of Logic Programming10.1017/S147106840600278X7:5(505-536)Online publication date: 1-Sep-2007
  • (2007)Prolog performance on larger datasetsProceedings of the 9th international conference on Practical Aspects of Declarative Languages10.1007/978-3-540-69611-7_12(185-199)Online publication date: 14-Jan-2007
  • (2006)A compacting garbage collector for unidirectional heapsImplementation of Functional Languages10.1007/BFb0055441(358-374)Online publication date: 28-May-2006
  • (2005)Improving memory usage in the BEAMProceedings of the 7th international conference on Practical Aspects of Declarative Languages10.1007/978-3-540-30557-6_12(143-157)Online publication date: 10-Jan-2005
  • (2005)MOA — A fast sliding compaction scheme for a large storage spaceMemory Management10.1007/3-540-60368-9_25(197-210)Online publication date: 1-Jun-2005
  • (2005)A simple and efficient copying garbage collector for prologProgramming Language Implementation and Logic Programming10.1007/3-540-58402-1_8(88-101)Online publication date: 28-May-2005
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media