Linear Tabulated Resolution Based on Prolog Control Strategy

Theory and Practice of Logic Programming (Impact Factor: 1.05). 04/2000; 1(1). DOI: 10.1017/S1471068400001010
Source: CiteSeer


Infinite loops and redundant computations are long recognized open problems in Prolog. Two ways have been explored to resolve these problems: loop checking and tabling. Loop checking can cut infinite loops, but it cannot be both sound and complete even for function-free logic programs. Tabling seems to be an effective way to resolve infinite loops and redundant computations. However, existing tabulated resolutions, such as OLDT-resolution, SLG-resolution, and Tabulated SLS-resolution, are non-linear because they rely on the solution-lookup mode in formulating tabling. The principal disadvantage of non-linear resolutions is that they cannot be implemented using a simple stack-based memory structure like that in Prolog. Moreover, some strictly sequential operators such as cuts may not be handled as easily as in Prolog. In this paper, we propose a hybrid method to resolve infinite loops and redundant computations. We combine the ideas of loop checking and tabling to establish a linear tabul...

Download full-text


Available from: Li-Yan Yuan, Oct 21, 2012
7 Reads
  • Source
    • "There are advanced tabulation methods for Prolog like OLDT-resolution (Tamaki et al., 1986), linear tabulated resolution (Shen et al., 2001; Zhou et al., 2003). These methods use sophisticated techniques (e.g. the suspension-resumption mechanism and the stack-wise representation of OLDT) that are better implemented by the underlying Prolog abstract machine. "
    [Show abstract] [Hide abstract]
    ABSTRACT: We present optimizations for the modal logic programming system MProlog, including the standard form for resolution cycles, optimized sets of rules used as meta-clauses, optimizations for the version of MProlog without existential modal operators, as well as iterative deepening search and tabulation. Our SLD-resolution calculi for MProlog in a number of modal logics are still strongly complete when resolution cycles are in the standard form and optimized sets of rules are used. We also show that the labelling technique used in our direct approach is relatively better than the Skolemization technique used in the translation approaches for modal logic programming.
    Journal of Applied Non-Classical Logics 01/2009; 19(2):167-181. DOI:10.3166/jancl.19.167-181
  • Source
    • "Our tabling system not only consumes considerably less stack space than XSB for some programs but also compares favorably well in speed with XSB. The theoretical framework of linear tabling is given in (Shen et al. 2001). The main objective of this paper is to propose evaluation strategies and their optimizations for linear tabling. "
    [Show abstract] [Hide abstract]
    ABSTRACT: Recently, the iterative approach named linear tabling has received considerable attention because of its simplicity, ease of implementation, and good space efficiency. Linear tabling is a framework from which different methods can be derived based on the strategies used in handling looping subgoals. One decision concerns when answers are consumed and returned. This paper describes two strategies, namely, {\it lazy} and {\it eager} strategies, and compares them both qualitatively and quantitatively. The results indicate that, while the lazy strategy has good locality and is well suited for finding all solutions, the eager strategy is comparable in speed with the lazy strategy and is well suited for programs with cuts. Linear tabling relies on depth-first iterative deepening rather than suspension to compute fixpoints. Each cluster of inter-dependent subgoals as represented by a top-most looping subgoal is iteratively evaluated until no subgoal in it can produce any new answers. Naive re-evaluation of all looping subgoals, albeit simple, may be computationally unacceptable. In this paper, we also introduce semi-naive optimization, an effective technique employed in bottom-up evaluation of logic programs to avoid redundant joins of answers, into linear tabling. We give the conditions for the technique to be safe (i.e. sound and complete) and propose an optimization technique called {\it early answer promotion} to enhance its effectiveness. Benchmarking in B-Prolog demonstrates that with this optimization linear tabling compares favorably well in speed with the state-of-the-art implementation of SLG.
    Theory and Practice of Logic Programming 06/2007; 8(01). DOI:10.1017/S147106840700316X · 1.05 Impact Factor
  • Source
    • "SLDT resolution [Shen et al. 2001; Zhou et al. 2000] was the first attempt in this direction. The main idea behind SLDT is to steal the backtracking point—using the terminology in [Shen et al. 2001; Zhou et al. 2000]—of the previous tabled call when a variant call is found, to avoid exploring the current recursive clause which may lead to non-termination. However, because the variant call avoids applying the same recursive clause as the previous call, the computation may be incomplete. "
    [Show abstract] [Hide abstract]
    ABSTRACT: 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.
Show more