Implementation of a linear tabling mechanism (2000) [17 citations — 2 self]
Abstract:
Delaying-based tabling mechanisms, such as the one adopted in XSB, are nonlinear in the sense that the computation state of delayed calls has to be preserved. In this paper, we present the implementation of a linear tabling mechanism. The key idea is to let a call execute from the backtracking point of a former variant call if such a call exists. The linear tabling mechanism has the following advantages over non-linear ones: (1) it is relatively easy to implement; (2) it imposes no overhead on standard Prolog programs; and (3) the cut operator works for a certain class of useful tabled programs and thus it is possible to use the cut operator to express negationas-failure and conditionals in those programs. The weakness of the linear mechanism is the necessity of re-computation for computing xpoints. However, we have found that re-computation can be avoided for a certain portion of calls of directly-recursive tabled predicates. We have implemented the linear tabling mechanism in B-Prolog. Experimental comparison shows that B-Prolog is close in speed to XSB when recomputation can be avoided. Concerning space eciency, B-Prolog is much better than XSB for some programs. 1
Citations
| 1654 | Foundations of Logic Programming – Lloyd - 1984 |
| 448 | An abstract Prolog instruction set – Warren |
| 186 | An amateur's introduction to recursive query processing strategies – Bancilhon, Ramakrishnan - 1989 |
| 183 | OLDT resolution with tabulation – Tamaki, Sato - 1986 |
| 179 | Tabled evaluation with delaying for general logic programs – Chen, Warren - 1996 |
| 106 | Memoing for logic programs – Warren - 1992 |
| 43 | An abstract machine for tabled execution of fixed-order stratified logic programs – Sagonas, Swift - 1998 |
| 32 | CAT: the Copying Approach to Tabling – Demoen, Sagonas - 1998 |
| 23 | CHAT: the Copy-Hybrid Approach to Tabling – Demoen, Sagonas - 1999 |
| 21 | Efficient access mechanisms for tabled logic programs – Ramakrishnan, Rao, et al. - 1999 |
| 16 | Parameter Passing and Control Stack Management in Prolog Implementation Revisited – Zhou - 1996 |
| 2 | Extension Table Built-ins for – Fa, Dietrich - 1992 |
| 1 | Efficient Tabling with Dynamic Alternative Reordering – Guo, Gupta - 2000 |

