Dynamic reordering of alternatives for definite logic programs

Due to their highly declarative nature and efficiency, tabled logic programming systems have been applied to solving many complex problems. Tabled logic programming is essential for extending traditional logic programming with tabled resolution. In this paper, we propose a new tabled resolution scheme, called dynamic reordering of alternatives (DRA) resolution, for definite logic programs. The scheme keeps track of the type of the subgoals during resolution; if the subgoal in the current resolvent is a variant of a former tabled subgoal, tabled answers are used to resolve the subgoal; otherwise, program clauses are used similar to SLD resolution. Program clauses leading to variant subgoals at runtime are dynamically reordered for further computation until the subgoals are completely evaluated. DRA resolution allows query evaluation to be performed in a depth-first, left-to-right traversal order similar to Prolog-typed SLD resolution, thus yielding a simple technique for incorporating tabled resolution in traditional logic programming systems. We show the correctness of DRA resolution.

[1]  Li-Yan Yuan,et al.  Linear tabulated resolution based on Prolog control strategy , 2000, Theory and Practice of Logic Programming.

[2]  Bart Demoen,et al.  Semantics-based program analysis for logic-based languages using XSB , 1998, International Journal on Software Tools for Technology Transfer.

[3]  C. R. Ramakrishnan,et al.  Efficient Model Checking Using Tabled Resolution , 1997, CAV.

[4]  Li-Yan Yuan,et al.  Implementation of a Linear Tabling Mechanism , 2001, J. Funct. Log. Program..

[5]  Konstantinos Sagonas,et al.  XSB as an efficient deductive database engine , 1994, SIGMOD '94.

[6]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[7]  Bart Demoen,et al.  CHAT: the copy-hybrid approach to tabling , 1999, Future Gener. Comput. Syst..

[8]  Hisao Tamaki,et al.  OLD Resolution with Tabulation , 1986, ICLP.

[9]  Konstantinos Sagonas,et al.  An abstract machine for tabled execution of fixed-order stratified logic programs , 1998, TOPL.

[10]  Ricardo Rocha,et al.  An External Module for Implementing Linear Tabling in Prolog , 2006, ICLP.

[11]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[12]  David Scott Warren,et al.  An Abstract Machine for SLG Resolution: Definite Programs , 1994, ILPS.

[13]  David Scott Warren,et al.  Tabled evaluation with delaying for general logic programs , 1996, JACM.

[14]  Ricardo Rocha,et al.  On a Tabling Engine That Can Exploit Or-Parallelism , 2001, ICLP.

[15]  Juliana Freire,et al.  Beyond Depth-First Strategies: Improving Tabled Logic Programs through Alternative Scheduling , 1998, J. Funct. Log. Program..

[16]  Roland N. Bol,et al.  Tabulated Resolution for the Well-Founded Semantics , 1993, J. Log. Program..

[17]  Neng-Fa Zhou,et al.  Efficient fixpoint computation in linear tabling , 2003, PPDP '03.

[18]  Ehud Shapiro,et al.  Third International Conference on Logic Programming , 1986 .

[19]  Gopal Gupta,et al.  A Simple Scheme for Implementing Tabled Logic Programming Systems Based on Dynamic Reordering of Alternatives , 2001, ICLP.

[20]  David Scott Warren,et al.  Suspending and Resuming Computations in Engines for SLG Evaluation , 2002, PADL.

[21]  David A. Schmidt,et al.  Denotationaisemantics: a methodology for language development , 1986 .

[22]  David Scott Warren,et al.  Efficient Top-Down Computation of Queries under the Well-Founded Semantics , 1995, J. Log. Program..

[23]  C. R. Ramakrishnan,et al.  Practical program analysis using general purpose logic programming systems—a case study , 1996, PLDI '96.