CHAT: The Copy-Hybrid Approach to Tabling
- 298 Downloads
The Copying Approach to Tabling, abbrv. CAT, is an alternative to SLG-WAM and based on total copying of the areas that the SLG-WAM freezes to preserve execution states of suspended computations. The disadvantage of CAT as pointed out in a previous paper is that in the worst case, CAT must copy so much that it becomes arbitrarily worse than the SLG-WAM. Remedies to this problem have been studied, but a completely satisfactory solution has not emerged. Here, a hybrid approach is presented: CHAT. Its design was guided by the requirement that for non-tabled (i.e. Prolog) execution no changes to the underlying WAM engine need to be made. CHAT combines certain features of the SLG-WAM with features of CAT, but also introduces a technique for freezing WAM stacks without the use of the SLG-WAM’s freeze registers that is of independent interest. Empirical results indicate that CHAT is a better choice for implementing the control of tabling than SLG-WAM or CAT. However, programs with arbitrarily worse behaviour exist.
KeywordsExecution Environment Choice Point Abstract Machine Local Schedule Schedule Component
Unable to display preview. Download preview PDF.
- B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In C. Palamidessi, H. Glaser, and K. Meinke, editors, Principles of Declarative Programming, 10th International Symposium, PLILP’98, Held Jointly with the 6th International Conference, ALP’98, number 1490 in LNCS, pages 21–35, Pisa, Italy, Sept. 1998. Springer.Google Scholar
- B. Demoen and K. Sagonas. Memory Management for Prolog with Tabling. In Proceedings of ISMM’98: ACM SIGPLAN International Symposium on Memory Management, pages 97–106, Vancouver, B.C., Canada, Oct 1998. ACM Press.Google Scholar
- K. Sagonas and T. Swift. An Abstract Machine for Tabled Execution of Fixed-Order Stratified Logic Programs. ACM Transactions on Programming Languages and Systems, 20(3), May 1998.Google Scholar
- K. Sagonas, T. Swift, and D. S. Warren. An Abstract Machine for Computing the Well-Founded Semantics. In M. Maher, editor, Proceedings of the Joint International Conference and Symposium on Logic Programming, pages 274–288, Bonn, Germany, Sept 1996. The MIT Press.Google Scholar
- D. H. D. Warren. An Abstract Prolog Instruction Set. Technical Report 309, SRI International, Menlo Park, U.S.A., Oct. 1983.Google Scholar