Beyond Depth-First Strategies: Improving Tabled Logic Programs through Alternative Scheduling

نویسندگان

  • Juliana Freire
  • Theresa Swift
  • David Scott Warren
چکیده

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

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

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