Sahlin, Dan and Carlsson, Mats (1991) Variable shunting for the WAM. [SICS Report]
| Postscript 37Kb | ||
| PDF 1034Kb |
Abstract
This paper describes how to extend the garbage collection for WAM so that it will shunt chains of bound variables if possible. Doing so has two advantages: 1. Space is saved by making it possible to deallocate the intermediate cells. This is particularly useful when those cells are associated with frozen goals. 2. Later dereferencing is speeded up by not having to follow long variable chains. The main complication of this optimization is the treatment of the trailed variables. We claim that all possible chains of variables are shunted by this algorithm. The algorithm has been implemented in SICStus Prolog, and benchmark results are presented in this paper. The full source code for the shunting algorithm is given in this paper.
| Item Type: | SICS Report |
|---|---|
| Additional Information: | Revised version of R89003. |
| ID Code: | 2096 |
| Deposited By: | Vicki Carleson |
| Deposited On: | 23 Oct 2009 |
| Last Modified: | 18 Nov 2009 15:59 |
Repository Staff Only: item control page

