An Efficient and Flexible Engine for Computing Fixed Points

An efficient and flexible engine for computing fixed points is critical for many practical applications. In this paper, we firstly present a goal-directed fixed point computation strategy in the logic programming paradigm. The strategy adopts a tabled resolution (or memorized resolution) to mimic the efficient semi-naive bottom-up computation. Its main idea is to dynamically identify and record those clauses that will lead to recursive variant calls, and then repetitively apply those alternatives incrementally until the fixed point is reached. Secondly, there are many situations in which a fixed point contains a large number or even infinite number of solutions. In these cases, a fixed point computation engine may not be efficient enough or feasible at all. We present a mode-declaration scheme which provides the capabilities to reduce a fixed point from a big solution set to a preferred small one, or from an infeasible infinite set to a finite one. The mode declaration scheme can be characterized as a meta-level operation over the original fixed point. We show the correctness of the mode declaration scheme. Thirdly, the mode-declaration scheme provides a new declarative method for dynamic programming, which is typically used for solving optimization problems. There is no need to define the value of an optimal solution recursively, instead, defining a general solution suffices. The optimal value as well as its corresponding concrete solution can be derived implicitly and automatically using a mode-directed fixed point computation engine. Finally, this fixed point computation engine has been successfully implemented in a commercial Prolog system. Experimental results are shown to indicate that the mode declaration improves both time and space performances in solving dynamic programming problems.

[1]  Giridhar Pemmasani,et al.  Online Justification for Tabled Logic Programs , 2003, FLOPS.

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

[3]  Robert A. Kowalski,et al.  The Semantics of Predicate Logic as a Programming Language , 1976, JACM.

[4]  David Scott Warren,et al.  Query evaluation under the well-founded semantics , 1993, PODS.

[5]  C. R. Ramakrishnan,et al.  Justifying proofs using memo tables , 2000, PPDP '00.

[6]  Gopal Gupta,et al.  Simplifying Dynamic Programming via Tabling , 2004, PADL.

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

[8]  K. A. Ross,et al.  Tabled Evaluation with Delaying for General Logic Programs , 1996 .

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

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

[11]  Y. S. Ramakrishna,et al.  Eecient Model Checking Using Tabled Resolution ? , 1997 .

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

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

[14]  Kotagiri Ramamohanarao,et al.  A Generalization of the Differential Approach to Recursive Query Evaluation , 1987, J. Log. Program..

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

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

[17]  Theresa Swift Tabling for non‐monotonic programming , 2004, Annals of Mathematics and Artificial Intelligence.

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

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

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

[21]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.