Compile-time memory reuse in logic programming languages through update in place

7Citations
Citations of this article
6Readers
Mendeley users who have this article in their library.

Abstract

Standard implementation techniques for single-assignment languages modify a data structure without destroying the original, which may subsequently be accessed. Instead a variant structure is created by using newly allocated cells to represent the changed portion and to replace any cell that references a newly allocated cell. The rest of the original structure is shared by the variant. The effort required to leave the original uncorrupted is unnecessary when the program will never reference the original again. This effort includes allocating and initializing new cells, as well as garbage collecting replaced cells. This article specifies a transformation system that introduces update-in-place operations, making Prolog programs update recursive data structures much as an imperative program would. The article introduces the notion of a reuse map, which formalizes reallocation decisions. Because optimal memory reuse is intractable, a heuristical method is presented that performs well in practice. Small Prolog programs that manipulate recursive data structures have their speed increased up to about five times (naive reverse), not counting any speedup obtained by avoiding garbage collection. Quicksort is about three times as fast, merge-sort about one and a half, matrix transposition about twice, and Gaussian elimination is about 1.2 times as fast.

References Powered by Scopus

Escape Analysis on Lists

75Citations
N/AReaders
Get full text

AGGREGATE UPDATE PROBLEM IN FUNCTIONAL PROGRAMMING SYSTEMS.

63Citations
N/AReaders
Get full text

Multiple specialization using minimal-function graph semantics

35Citations
N/AReaders
Get full text

Cited by Powered by Scopus

Storage size reduction by in-place mapping of arrays

29Citations
N/AReaders
Get full text

Resource-passing concurrent programming

12Citations
N/AReaders
Get full text

Scheduling tasks to maximize usage of aggregate variables in place

9Citations
N/AReaders
Get full text

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Cite

CITATION STYLE

APA

Gudjónsson, G., & Winsborough, W. H. (1999). Compile-time memory reuse in logic programming languages through update in place. ACM Transactions on Programming Languages and Systems, 21(3), 430–501. https://doi.org/10.1145/319301.319309

Readers' Seniority

Tooltip

Professor / Associate Prof. 2

50%

PhD / Post grad / Masters / Doc 2

50%

Readers' Discipline

Tooltip

Computer Science 5

100%

Save time finding and organizing research with Mendeley

Sign up for free