Title: Representation Sharing for Prolog
Authors: Nguyen, Phuong-Lan * ×
Demoen, Bart * #
Issue Date: Jan-2013
Publisher: Cambridge University Press
Series Title: Theory and Practice of Logic Programming vol:13 issue:1 pages:71-106
Abstract: Representation sharing can reduce the memory footprint of a program by
sharing one representation between duplicate terms. The most common
implementation of representation sharing in functional programming systems is
known as hash-consing. In the context of Prolog, representation sharing has
been given little attention. Some current techniques that deal with
representation sharing are reviewed. The new contributions are: (1) an easy
implementation of {\em input sharing} for {\em findall/3}; (2) a description of
a {\em sharer} module that introduces representation sharing at runtime. Their
realization is shown in the context of the WAM as implemented by hProlog. Both
can be adapted to any WAM-like Prolog implementation. The sharer works
independently of the garbage collector, but it can be made to cooperate with
the garbage collector. Benchmark results show that the sharer has a cost
comparable to the heap garbage collector, that its effectiveness is highly
application dependent, and that its policy must be tuned to the collector.
ISSN: 1471-0684
Publication status: published
KU Leuven publication type: IT
Appears in Collections:Informatics Section
* (joint) first author
× corresponding author
# (joint) last author

Files in This Item:
File Description Status SizeFormat
sharing.pdfarticle Published 241KbAdobe PDFView/Open


All items in Lirias are protected by copyright, with all rights reserved.

© Web of science