CHAT is O(SLG-WAM)
نویسندگان
چکیده
CHAT offers an alternative to SLG-WAM for implementing the suspension and resumption of consumers: unlike SLG-WAM, it does not use freeze registers nor a complicated trail to preserve their execution environments. CHAT also limits the amount of copying of CAT, which was previously put forward as an alternative to SLG-WAM. Although experimental results show that in practice CHAT is competitive with-if not better than-SLG-WAM, there remains the annoying fact that on contrived programs the original CHAT can be made arbitrarily worse than SLG-WAM, i.e. the original CHAT has a higher complexity. In this paper we show how to overcome this problem, in particular, we deal with the two sources of higher complexity of CHAT: the repeated traversal of the choice point stack, and the lack of sufficient sharing of the trail. This is achieved without fundamentally changing the underlying principle of CHAT by a technique that manipulates a Prolog choice point so that it assumes temporarily a different functionality and in a way that is transparent to the underlying WAM. There is more potential use of this technique besides lowering the worst case complexity of CHAT: it leads to considering scheduling strategies that were not feasible before either in CHAT or in SLG-WAM. We also discuss extensively issues related to the implementation of trail that tabled logic programming systems require. Abstract CHAT ooers an alternative to SLG-WAM for implementing the suspension and resumption of consumers: unlike SLG-WAM, it does not use freeze registers nor a complicated trail to preserve their execution environments. CHAT also limits the amount of copying of CAT, which was previously put forward as an alternative to SLG-WAM. Although experimental results show that in practice CHAT is competitive with | if not better than | SLG-WAM, there remains the annoying fact that on contrived programs the original CHAT can be made arbitrarily worse than SLG-WAM, i.e. the original CHAT has a higher complexity. In this paper we show how to overcome this problem, in particular, we deal with the two sources of higher complexity of CHAT: the repeated traversal of the choice point stack, and the lack of suucient sharing of the trail. This is achieved without fundamentally changing the underlying principle of CHAT by a technique that manipulates a Prolog choice point so that it assumes temporarily a diierent functionality and in a way that is transparent to the underlying WAM. There is more potential use …
منابع مشابه
A better CAT made-in-Belgium CHAT (or KAT)
The Copying Approach to Tabling, abbrv. CAT, is an alternative to SLG-WAM and based on total copying of the areas that 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 SLG-WAM. Remedies to this problem have been studied, but a ...
متن کاملCHAT is ( SLG - WAM ) ?
CHAT ooers an alternative to SLG-WAM for implementing the suspension and resumption of consumers: unlike SLG-WAM, it does not use freeze registers nor a complicated trail to preserve their execution environments. CHAT also limits the amount of copying of CAT, which was previously put forward as an alternative to SLG-WAM. Although experimental results show that in practice CHAT is competitive wi...
متن کاملA better CAT made - in - Belgium : CHAT ( or KATy )
The Copying Approach to Tabling, abbrv. CAT, is an alternative to SLG-WAM and based on total copying of the areas that 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 SLG-WAM. Remedies to this problem have been studied, but a ...
متن کاملCHAT: The Copy-Hybrid Approach to Tabling
The copying approach to tabling (CAT) is an alternative to SLG-WAM and based on incrementally copying the areas that the SLG-WAM freezes to preserve execution states of suspended computations. The main advantage of CAT over the SLG-WAM is that support for tabling does not affect the speed of the underlying abstract machine for strictly non-tabled execution. The disadvantage of CAT as pointed ou...
متن کاملCAT: The Copying Approach to Tabling
The SLG-WAM implements tabling by freezing the WAM stacks: this implementationtechnique has a reasonably small execution overhead , but is not easy to implement on top of an existing Prolog system. We here propose a new approach to the implementation of tabling: the Copying Approach to Tabling. CAT interferes absolutely not with normal Prolog execution and can be introduced in an existing Prolo...
متن کامل