CHAT: The Copy-Hybrid Approach to Tabling

  • Bart Demoen
  • Konstantinos Sagonas
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1551)


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.


Execution Environment Choice Point Abstract Machine Local Schedule Schedule Component 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    H. Aït-Kaci. Warren’s Abstract Machine: A Tutorial Reconstruction. The MIT Press, Cambridge, Massachusetts, 1991. See also: Scholar
  2. [2]
    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
  3. [3]
    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
  4. [4]
    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
  5. [5]
    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
  6. [6]
    D. H. D. Warren. An Abstract Prolog Instruction Set. Technical Report 309, SRI International, Menlo Park, U.S.A., Oct. 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Bart Demoen
    • 1
  • Konstantinos Sagonas
    • 1
  1. 1.Department of Computer ScienceKatholieke Universiteit LeuvenHeverleeBelgium

Personalised recommendations