Computer Science – Programming Languages
Scientific paper
2011-06-07
Computer Science
Programming Languages
37 pages, 11 figures, 3 tables; To appear in Theory and Practice of Logic Programming (TPLP)
Scientific paper
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. To appear in Theory and Practice of Logic Programming (TPLP)
Demoen Bart
Nguyen Phuong-Lan
No associations
LandOfFree
Representation Sharing for Prolog does not yet have a rating. At this time, there are no reviews or comments for this scientific paper.
If you have personal experience with Representation Sharing for Prolog, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Representation Sharing for Prolog will most certainly appreciate the feedback.
Profile ID: LFWR-SCP-O-26427