| Demoen, B. and Sagonas, K.: CAT: The Copying Approach to Tabling, Proceedings of PLILP'98, 1998. |
....as the instruction set presented in the SLGWAM de nition of [11] In that sense, the SLGWAM implementation in [11] which we refer to as SLGWAM 98 , was the rst instantiation of the SLGWAM architecture. Other implementations of the SLGWAM architecture have been developed, notably CAT [3], CHAT [5] and S ntese (the Portuguese word for synthesis ) which is a combination of SLGWAM 98 and CHAT. These implementations show a great deal of similarity overall, but di er in what we term environment management, which consists of how information for suspended computations is managed, and ....
....[6] We note in passing that to implement incremental completion eciently SLGWAM 98 maintains a completion stack with a frame for each non completed tabled subgoal in an evaluation. The completion stack is also used by CAT, CHAT, and S ntese, which descend from SLGWAM 98 . CAT The goal of CAT [3] is to add tabling to the WAM, without changing engine performance for non tabled code. To accomplish this, CAT copies all relevant portions of the stacks to a separate area, instead of keeping suspended computations in the stacks as does SLGWAM 98 . Copying of the stack sections corresponding to ....
[Article contains additional citation context not shown here]
B. Demoen and K. Sagonas. CAT: A copying approach to tabling. In PLILP, pages 21-35, 1998.
....respect to memory eciency. Since only relevant portions of the stacks are copied, and released as soon as they are no longer necessary, no unused memory is ever trapped as in SLGWAM. On the other hand, the cost of suspending a goal may be arbitrarily worse than SLGWAM, due to the copying involved [3]. 4.3 CHAT CHAT [5] is the rst implementation of a hybrid approach that aims at getting the best advantages from both CAT and SLGWAM. The main goal of CHAT is to keep the overhead on non tabled Prolog execution as low as possible, while having a better behavior for tabled programs than CAT. ....
B. Demoen and K. Sagonas. CAT: A copying approach to tabling. In PLILP, pages 21-35, 1998.
....branch must be restored. SLG WAM achieves this by using an extension of the standard trail, the forward trail, to keep track of the bindings values. An alternative to the SLG WAM is to keep on working on the current stacks but store the frozen stacks away on an external space, as is done in CAT [5] (the same principle was used to suspend orparallel work in Muse [1] The CHAT model [6] signi cantly reduces the overheads of copying and is currently the default scheme in XSB Prolog. In more recent work some authors have proposed a linear tabling mechanism [20] and a reordering based tabling ....
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In Proceedings of PLILP/ALP98. Springer Verlag, September 1998.
....erased. To later resume a suspended branch, the bindings belonging to the branch must be restored. SLG WAM achieves this by using an extension of the standard trail, the forward trail, to keep track of the bindings values. Other implementation mechanisms for tabling have been proposed recently [6, 5, 9, 16]. 3 Tabling and Parallelism In previous work [11] we proposed two computational models to combine tabling with or parallelism, the OPT and the TOP approaches. We have decided to implement the OPT approach [12] The OPT approach generalizes Warren s multisequential engine framework for ....
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In Proceedings of PLILP/ALP98. Springer Verlag, September 1998.
....imposes about 10 overhead on standard Prolog programs, which is obviously unacceptable to Prolog vendors and implementers. To simplify the implementation of tabling in XSB, Demoen and Sagonas proposed two alternative schemes for preserving the choice points of consumers and the related stacks [3, 4]. The new schemes are simpler than SLG WAM and impose less overhead on the execution of standard Prolog programs, but the implementation is still complicated and the cut operator is left unhandled. In addition, the new schemes have a new problem that SLG WAM does no have: the garbage collector ....
Demoen, B. and Sagonas, K.: CAT: The Copying Approach to Tabling, Proceedings of PLILP'98, 1998.
....[18] 119] 110] 120] 136] Clear progress from Definite LPs, through Stratified and Normal LPs to Abductive LPs, Disjunctive LPs, and Quantitative LPs. Implementation and Systems [8] 129] 79] 49] 67] 98] 121] 109] 39] 9] 22] 51] 133] 99] 135] 101] 52] [42], 43] 54] 93] 107] 108] 31] XSB, YAP, Lola, and others Optimizations [36] 5 Overview ffl Magic Sets and Related Research (e.g. Alexander Method) Formulation [102] 7] 111] 124] 20] 87] 85] 10] 70] 91] 117] 47] 60] 96] 11] 114] 104] 84] ....
B. Demoen and K. Sagonas. CAT: A copying approach to tabling. In PLILP, pages 21--35, 1998.
....in the original implementation of the SLG WAM [9] which uses freeze registers and a forward trail to support suspending and resuming within WAM stacks. Another class of algorithms copies computation paths into execution space as they are resumed and out of execution space as they are suspended [2]. In terms of tabled evaluation, memory sharing algorithms provide the bene t of simple and ecient switching between environment paths, but may trap unused computation paths in frozen areas of memory, while memory copying algorithms have complementary bene ts and weaknesses. Memory management ....
B. Demoen and K. Sagonas. CAT: A copying approach to tabling. In PLILP, pages 21-35, 1998.
....overheads. Besides, to support all forms of suspension with minimal overhead, the unified suspension mechanism must be implemented efficiently. Moreover, support for the tabling component in the TOP approach requires a slightly different tabling engine than SLG WAM. The recently proposed CAT model [4] seems to fulfill best the requirements of the TOP approach, since it assumes a linear stack for the current branch and uses an auxiliary area to save the suspended nodes. Therefore, in order to implement the TOP approach using CAT, we should adopt, for the or parallel component, an environment ....
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In Proc. of PLILP/ALP'98. Springer-Verlag, Sep. 1998.
.... choice point library for backtrack programming Pierre Etienne Moreau LORIA CNRS INRIA Lorraine BP 239 54506 Vand uvre l es Nancy Cedex, France E mail: Pierre Etienne.Moreau loria.fr Abstract Implementing a compiler for a language with nondeterministic features is known to be a di cult task. This paper presents two new functions setChoicePoint and fail that extend the C language to e ciently ....
....deterministic computations and is of more general interest; it could be used in implementations of constraint solvers, imperative languages with backtracking such as Alma 0 [ the WAM [ and Prolog like languages. A rst implementation of our techniques has been done by Marian Vittek in 1996. The experimental results, presented in [ show that nondeterministic rewriting can be implemented as e ciently as the best current implementations of functional and logic programming languages. This paper presents a formalisation of the implementation and gives detailed algorithms to re use, ....
[Article contains additional citation context not shown here]
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. Personal Communication, 1998.
....freezing them, i.e. by not reclaiming space on backtracking as is done in WAM and by allocating new space outside the frozen areas. Execution environments of consumers are shared and end up interspersed on the stacks as in the SLG WAM [SS98] Copying based implementations of tabling, such as CAT [DS99] are also possible but their space requirements are usually higher than sharing based ones. All the implementation models for the suspension resumption mechanism result in tabling systems that have inherently more complex memory models than plain Prolog and in general their space requirements ....
....However it appeared to us very unsatisfactory from a scientific point of view. So we abandoned the work on the garbage collector and concentrated (more than a year later) on alternative ways for implementing suspension resumption of consumers. This resulted in the CAT implementation schema [DS99] which lead indirectly to the understanding of the usefulness logic of logic programming systems with tabling described in Section 6 of this article. Armed with this theoretical understanding we resumed work on a more accurate garbage collector in August 1998, finishing the sliding collector and ....
[Article contains additional citation context not shown here]
Bart Demoen and Konstantinos Sagonas. CAT: the Copying Approach to Tabling. Journal of Functional and Logic Programming, November 1999. Special issue on selected papers from PLILP/ALP'98. 52
....the other hand this can also be avoided in the setting of [2] of course this goes back to a conversation with K. Sagonas it can be found in [8] the implementation of suspending consumers in a tabling Prolog by freezing the stacks (as XSB does) or by copying their relevant parts as in CAT [4]. Freezing stacks requires an extra freeze register the SF register from B Prolog was introduced for such purpose and has an overal (but small) impact on the performance and the implementation, while a copying approach is more orthogonal to the rest of the machinery. Also, freezing the stack ....
B. Demoen, 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.
....but appeared to us very unsatisfactory from a scienti c point of view. So we abandoned the work on the garbage collector and concentrated (more than a year later) on alternative ways for implementing suspension resumption of consumers. This resulted in the Copying Approach to Tabling (abbrv. CAT [7]) this implementation schema lead directly to a better understanding of the usefulness logic of logic programming systems with tabling (see [8] Armed with this theoretical understanding we resumed work on a more accurate garbage collector in August 1998, nishing the sliding collector and at ....
....of suspended computations must somehow be preserved and reinstated. By now, several alternatives for suspension resumption exist: either by totally sharing the execution environments by interspersing them in the WAM stacks (as in the SLG WAM [14] or by a total copying approach (as in CAT [7]) or by a hybrid approach (as in CHAT [9] In this paper, we stick to a CHAT implementation, and refer the interested reader to the above references for di erences between these abstract machines 1 . Independently of the implementation model chosen for the suspension resumption mechanism, ....
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In C. Palamidessi, H. Glaser, and K. Meinke, editors, Principles of Declarative Programming, number 1490 in LNCS, pages 21-35, Pisa, Italy, Sept. 1998. Springer.
....[11] describes one implementation of suspension resumption but no alternative is hinted at, because it was assumed at that time that reasonable (i.e. suciently ecient) alternatives did not exist. A rst alternative implementation for suspension resumption in tabling was o ered by CAT [3] which stands for the Copying Approach to Tabling. The guiding principle of the design was that the underlying WAM should not be a ected by the introduction of tabling and CAT achieved exactly that: starting from a WAM implementation, CAT implements suspension resumption of consumers without ....
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In C. Palamidessi, H. Glaser, and K. Meinke, editors, Principles of Declarative Programming (PLILP'98), number 1490 in LNCS, pages 21-35, Sept. 1998. Springer.
....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. should we mention the COMPCHAT fix at this point 1 Introduction In [3], we developed a new approach to the implementation of the suspend resume mechanism that tabling needs: the Copying Approach to Tabling abbreviated as CAT. The essential characteristic of the approach is that preserving the execution state of suspended computations through freezing of the WAM ....
....perform completion and space reclamation in a non stack based manner without need for memory compaction. Finally, experimentation with new scheduling strategies seems more easy within CAT. On the whole, CAT is also easier to understand than the SLG WAM. The main drawback of CAT, as pointed out in [3], is that its worst case performance renders it arbitrarily worse than the SLG WAM: CAT might need to copy arbitrary large parts of the stacks; the SLG WAM s way of freezing in contrast is an operation with constant cost. Although this bad behaviour of CAT has not shown up as a real problem in our ....
[Article contains additional citation context not shown here]
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.
....The SLG WAM [15] the abstract machine of XSB, preserves consumer states by freezing them, i.e. by not reclaiming space on backtracking as is done in WAM and by allocating new space outside the frozen areas. Freezing is not the only possible way to implement the control of tabled execution. In [10], we introduced the Copying Approach to Tabling abbreviated CAT. In short, CAT preserves and reinstalls the execution environments of suspended computations through copying. CAT resembles other copy based techniques, notably MUSE [2] and the implementation of backtracking in C described in [11] ....
....and review the two approaches to implementing tabling: the SLG WAM and the CAT. The description of these two approaches is relatively self contained, however, its focus is on issues related to memory management and as such the description is not exhaustive; the reader is therefore referred to [15, 10] for full details of the two implementation schemes. Section 3 explains cooperation between CAT and heap garbage collection, with a detailed discussion on early reset. We pay special attention to how the understanding of garbage collection for CAT, can be used for designing a garbage collector for ....
[Article contains additional citation context not shown here]
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In H. Glaser, K. Meinke, and C. Palamidessi, editors, Proceedings of the Joint Conference on PLILP/ALP'98, LNCS, Pisa, Italy, Sept. 1998. Springer-Verlag.
....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. should we mention the COMPCHAT x at this point 1 Introduction In [3], we developed a new approach to the implementation of the suspend resume mechanism that tabling needs: the Copying Approach to Tabling abbreviated as CAT. The essential characteristic of the approach is that preserving the execution state of suspended computations through freezing of the WAM ....
....perform completion and space reclamation in a non stack based manner without need for memory compaction. Finally, experimentation with new scheduling strategies seems more easy within CAT. On the whole, CAT is also easier to understand than the SLG WAM. The main drawback of CAT, as pointed out in [3], is that its worst case performance renders it arbitrarily worse than the SLG WAM: CAT might need to copy arbitrary large parts of the stacks; the SLG WAM s way of freezing in contrast is an operation with constant cost. Although this bad behaviour of CAT has not shown up as a real problem in our ....
[Article contains additional citation context not shown here]
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.
....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. 1 Introduction In [2], we developed a new approach to the implementation of the suspend resume mechanism that tabling needs: CAT. The essential characteristic of the approach is that freezing of the stacks (as in SLG WAM [4] was replaced by copying the state of suspended computations. One advantage is that this ....
....is that CAT can perform completion and space reclamation in a non stack based manner without need for memory compaction. Finally, experimentation with new strategies seems more easy within CAT. On the whole, CAT is also easier to understand than SLG WAM. The main drawback of CAT, as pointed out in [2], is that its worst case performance renders it arbitrarily worse than SLG WAM: CAT might need to copy arbitrary large parts of the stacks; the SLG WAM s way of freezing in contrast is an operation with constant cost. Although this bad behaviour of CAT has not shown up as a real problem in our ....
[Article contains additional citation context not shown here]
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In H. Glaser, K. Meinke, and C. Palamidessi, editors, Proceedings of the Joint Conference on PLILP/ALP'98, LNCS, Pisa, Italy, Sept. 1998. Springer-Verlag.
....rst try to nd the reason elsewhere. As dProlog relies on the XSB compiler for generating abstract machine code, it su ers from the problem that nested terms in the head of a clause are always constructed (from a certain depth on) even if the argument is instantiated. As an example, the fact foo([6,7,8]) Is translated as shown in the rst column of the next table: generated by XSB plain WAM compressed WAM getlist Areg1 getlist Areg1 getlist Areg1 uninumcon 6 uninumcon 6 uninumcon 6 unitvar Areg1 unitvar Areg1 unilist putlist Areg2 getlist Areg1 bldnumcon 8 uninumcon 7 uninumcon 7 bldcon ....
.... One can see an analogy between on the one hand the implementation of delay as in B Prolog or by a copying to the heap approach, and on the other hand the implementation of suspending consumers in a tabling Prolog by freezing the stacks (as XSB does) or by copying their relevant parts as in CAT [6]. Freezing stacks requires an extra freeze register the SF register from B Prolog was introduced for such purpose unless one is lucky and can apply a trick like in CHAT [7] and can have an overal impact on performance and the implementation, while a copying approach is more orthogonal to the ....
B. Demoen, 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.
....The default con guration of XSB shares these elements while the option enable chat copies these elements. While sharing and copying have minor performance di erences, the main reason to try the enable chat con guration is to use a heap garbage collector that has been written for it. See [35, 14, 15, 16] for in depth discussion of the engine memory management. 2.1.1 Possible Installation Problems Lack of Space for Optimized Compilation of C Code When making the optimized version of the emulator, the temporary space available to the C compiler for intermediate les is sometimes not sucient. For ....
.... the web site contain papers covering in detail various aspects of tabling (often through the links for individuals involved in XSB) An overview of SLG resolution, and practical evaluation strategies for it are provided in [8, 41, 38, 19] The engine of XSB, the SLG WAM, is described in [35, 33, 18, 37, 7, 14] as it is implemented in Version 2.2 and its performance analyzed. Examples of large scale applications that use tabling are overviewed in [42, 9, 12] 5.1 XSB as a Prolog System Before describing how to program using tabling it is perhaps worthwhile reviewing some of the goals of XSB 1. To ....
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.
....[12] describes one implementation of suspension resumption but no alternative is hinted at, because it was assumed at that time that reasonable (i.e. suciently ecient) alternatives did not exist. A rst alternative implementation for suspension resumption in tabling was o ered by CAT [3] which stands for the Copying Approach to Tabling. The guiding principle of the design was that the underlying WAM should not be a ected by the introduction of tabling and CAT achieved exactly that: starting from a WAM implementation, CAT implements suspension resumption of consumers without ....
....models based on primitive operations that need to be performed in this context (variable access, task creation and switching) and show a very strong, alas negative result: no implementation model (with nite number of processors) can perform all three operations in constant time. As noted in [3], there is a strong analogy between models of implementing task creation switching for Or parallelism and suspension resumption for tabling. Our work is thus in line with [7] in as far as it deals with closely related (but di erent) mechanisms. However, in this case, we obtained a more positive ....
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.
....The SLG WAM [12] the abstract machine of XSB, preserves consumer states by freezing them, i.e. by not reclaiming space on backtracking as is done in WAM and allocating new space above the freeze points. Freezing is not the only possible way to implement the control of tabled execution. In [8], we introduced the Copying Approach to Tabling abbreviated CAT. In short, CAT preserves and reinstalls the execution environments of suspended computations through copying. CAT resembles other copy based techniques, notably MUSE [2] and the implementation of backtracking in C described in [9] ....
....The CAT area has four memory areas (containing information from each of the four WAM stacks) Figure 2 shows these memory areas in a CAT based implementation. When execution 3 Actually, it does so in a more incremental way, but as this is not relevant for this paper we refer those interested to [8] for more details. 4 encounters a consumer, a choice point C is created for it. Let the youngest generator choice point in the stack be G (the dots show possible Prolog choice points that appear in between) A CAT copy is about to be made; the situation is depicted in Figure 2(a) The shaded ....
[Article contains additional citation context not shown here]
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. Technical Report CW 260, K.U. Leuven, Apr. 1998. Submitted for publication.
....option appeared to us very unsatisfactory from a scientific point of view. So we left the garbage collector for what it was and concentrated (more than a year later) on alternative ways for implementing suspension resumption of consumers. This lead to the Copying Approach to Tabling (abbrv. CAT [7]) this implementation schema lead directly to a better understanding of the usefulness logic of logic programming systems with tabling (see [8] Armed with this theoretical understanding of what is needed for accurate memory management in tabled abstract machines, whose internals we briefly ....
....of suspended computations must somehow be preserved and reinstated. By now, several possibilities for suspension resumption exist: either by totally sharing the execution environments by interspersing them in the WAM stacks (as in the SLG WAM [14] or by a total copying approach (as in CAT [7]) or by a hybrid approach (as in CHAT [9] In this paper, we stick to a CHAT implementation of tabling, and refer the interesting reader to the above references for differences between these abstract machines 1 . Independently of the implementation model that is chosen for the ....
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.
....describes one implementation of suspension resumption but no alternative is hinted at, mainly because it was assumed at that time that reasonable (i.e. sufficiently efficient) alternatives did not exist. A first alternative implementation for suspension resumption in tabling was offered by CAT [4] which stands for the Copying Approach to Tabling. The guiding principle of the design was that the underlying WAM should not be affected by the introduction of tabling and CAT achieved exactly that: starting from a WAM implementation, CAT achieves suspension resumption of consumers without ....
....models based on primitive operations that need to be performed in this context (variable access, task creation and switching) and show a very strong, alas negative result: no implementation model (with finite number of processors) can perform all three operations in constant time. As noted in [4], there is a strong analogy between models of implementing task creation switching for Or parallelism and suspension resumption for tabling. Our work is thus in line with [7] in as far as it deals with closely related (but different) mechanisms. However, in this case, we obtained a more positive ....
B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In C. Palamidessi, H. Glaser, and K. Meinke, editors, Proceedings of the Joint Conference on PLILP/ALP'98, number 1490 in LNCS, pages 21--35, Pisa, Italy, Sept. 1998. Springer-Verlag.
No context found.
Demoen, B. and Sagonas, K.: CAT: The Copying Approach to Tabling, Proceedings of PLILP'98, 1998.
No context found.
B. Demoen and K. Sagonas. CAT: A copying approach to tabling. In PLILP, pages 21-35, 1998.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC