Beyond Depth-First Strategies: Improving Tabled Logic Programs through Alternative Scheduling
نویسندگان
چکیده
Tabled evaluation ensures termination for programs with finite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the first one encountered will use program-clause resolution; the rest will resolve with the answers generated by the first subgoal. This use of answer resolution prevents infinite looping that sometimes happens in SLD. Because answers that are produced in one path of the computation may be consumed, asynchronously, in others, tabling systems face an important scheduling choice not present in traditional top-down evaluation: when to schedule answer resolution. This paper investigates alternate scheduling strategies for tabling in a WAM implementation, the SLG-WAM. The original SLG-WAM had a simple mechanism for scheduling answer resolution that was expensive in terms of trailing and choice-point creation. We propose here a more sophisticated scheduling strategy, batched scheduling, which reduces the overheads of these operations and provides dramatic space reduction as well as speedups for many programs. We also propose a second strategy, local scheduling, which has applications to nonmonotonic reasoning, and when combined with answer subsumption, can arbitrarily improve the performance of some programs. ∗A preliminary version of this paper appeared in [FSW96]. †This research was performed while the first author was at the Department of Computer Science, State University of New York at Stony Brook, Stony Brook, NY. 1 The Journal of Functional and Logic Programming 1998-3 Freire, Swift, and Warren Beyond Depth-First Strategies §1
منابع مشابه
Beyond Depth-First: Improving Tabled Logic Programs through Alternative Scheduling Strategies
Tabled evaluation ensures termination for programs with nite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the rst one encountered will use program clause resolution; the rest will resolve with the answers generated by the rst subgoal. This use of answer resolution prevents innnite looping which sometimes happens in SLD. Becaus...
متن کاملBeyond Depth - First : Improving Tabled LogicPrograms through Alternative
Tabled evaluations ensure termination of logic programs with nite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the rst one encountered will use program clause resolution; the rest uses answer resolution. This use of answer resolution prevents innnite looping which happens in SLD. Given the asynchronicity of answer generation a...
متن کاملDepth - First : Improving Tabled Logic Programsthrough Alternative Scheduling Strategies ?
Tabled evaluations ensure termination of logic programs with nite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation , only the rst one encountered will use program clause resolution; the rest uses answer resolution. This use of answer resolution prevents innnite looping which happens in SLD. Given the asynchronicity of answer generation ...
متن کاملBeyond Depth - First : Improving Tabled
Tabled evaluations ensure termination of logic programs with nite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the rst one encountered will use program clause resolution; the rest uses answer resolution. This use of answer resolution prevents innnite looping which happens in SLD. Given the asynchronicity of answer generation a...
متن کاملOn the Optimality of Scheduling Strategies in Subsumption-based Tabled Resolution
Subsumption-based tabled logic programming promotes more aggressive reuse of answer tables over variant-based tabling. However resolving subgoals against answers in tabled logic programming may require accessing incomplete answer tables (i.e., more answers remain to be added). In subsumption-based tabling it is far more efficient to retrieve from completed tables. Scheduling strategies promote ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Journal of Functional and Logic Programming
دوره 1998 شماره
صفحات -
تاریخ انتشار 1998