ABSTRACT
We introduce just enough tabling (JET), a mechanism to suspend and resume the tabled execution of logic programs at an arbitrary point. In particular, JET allows pruning of tabled logic programs to be performed without resorting to any recomputation. We discuss issues that are involved in supporting pruning in tabled resolution, how re-execution of tabled computations which were previously pruned can be avoided, and we describe the implementation of such a scheme based on an abstract machine like CHAT, which implements the suspension/resumption support that tabling requires through a combination of freezing and copying of execution states of suspended computations. Properties of just enough tabling and possible uses of the JET mechanism in a tabling system are also briefly discussed.
- L. F. Castro, T. Swift, and D. S. Warren. Suspending and resuming computations in engines for SLG evaluation. In S. Krishnamurthi and C. R. Ramakrishnan, editors, Practical Applications of Declarative Languages: Proceedings of the PADL'2002 Symposium, number 2257 in LNCS, pages 332--350. Springer, Jan. 2002.]] Google ScholarDigital Library
- L. F. Castro and D. S. Warren. Approximate pruning in tabled logic programming. In P. Degano, editor, Programming Languages and Systems: Proceedings of the European Symposium on Programming, number 2618 in LNCS, pages 69--83. Springer, Apr. 2003.]] Google ScholarDigital Library
- W. Chen and D. S. Warren. Tabled evaluation with delaying for general logic programs. J. ACM, 43(1):20--74, Jan. 1996.]] Google ScholarDigital Library
- B. Demoen and K. Sagonas. CHAT is θ (SLG-WAM). In H. Ganzinger, D. McAllester, and A. Voronkov, editors, LPAR'99: Proceedings of the 6th International Conference on Logic for Programming and Automated Reasoning, number 1705 in LNAI, pages 337--357. Springer, Sept. 1999.]] Google ScholarDigital Library
- B. Demoen and K. Sagonas. CHAT: the Copy-Hybrid Approach to Tabling. Future Generation Computer Systems, 16(7):809--830, May 2000.]] Google ScholarDigital Library
- H.-F. Guo and G. Gupta. A simple scheme for implementing tabled logic programming systems based on dynamic reordering of alternatives. In P. Codognet, editor, Proceedings of the 17th International Conference on Logic Programming, number 2237 in LNCS, pages 181--196. Springer, Nov./Dec. 2001.]] Google ScholarDigital Library
- H.-F. Guo and G. Gupta. Cuts in tabled logic programming. In B. Demoen, editor, Proceedings of CICLOPS'2002, the Colloquium on Implementation of Constraint and LOgic Programming Systems, pages 62--73, July 2002.]]Google Scholar
- I. V. Ramakrishnan, P. Rao, K. Sagonas, T. Swift, and D. S. Warren. Efficient access mechanisms for tabled logic programs. J. of Logic Program., 38(1):31--54, Jan. 1999.]]Google ScholarCross Ref
- R. Rocha, F. Silva, and V. Santos Costa. YapTab: A tabling engine designed to support parallelism. In Proceedings of Tabulation in Parsing and Deduction (TAPD), pages 77--87, Sept. 2000.]]Google Scholar
- K. Sagonas and T. Swift. An abstract machine for tabled execution of fixed-order stratified logic programs. ACM Trans. Prog. Lang. Syst., 20(3):586--634, May 1998.]] Google ScholarDigital Library
- K. Sagonas, T. Swift, and D. S. Warren. XSB as an efficient deductive database engine. In Proceedings of the ACM SIGMOD International Conference on the Management of Data, pages 442--453. ACM Press, May 1994.]] Google ScholarDigital Library
- Z. Somogyi, F. Henderson, and T. Conway. The execution algorithm of Mercury, an efficient purely declarative logic programming language. J. of Logic Program., 26(1-3):17--64, Oct./Dec. 1996.]]Google ScholarCross Ref
- H. Tamaki and T. Sato. OLD resolution with Tabulation. In E. Shapiro, editor, Proceedings of the Third International Conference on Logic Programming, number 225 in LNCS, pages 84--98. Springer-Verlag, July 1986.]] Google ScholarDigital Library
- D. H. D. Warren. An abstract Prolog instruction set. Technical Report 309, SRI International, Menlo Park, U.S.A., Oct. 1983.]]Google Scholar
- N.-F. Zhou, Y.-D. Shen, L.-Y. Yuan, and J.-H. You. Implementation of a linear tabling mechanism. J. of Functional and Logic Program., 2001(10), 2001.]]Google Scholar
Index Terms
Just enough tabling
Recommendations
Termination proofs for logic programs with tabling
Tabled evaluation is receiving increasing attention in the logic programming community. It avoids many of the shortcomings of SLD execution and provides a more flexible and often considerably more efficient execution mechanism for logic programs. In ...
Efficient fixpoint computation in linear tabling
PPDP '03: Proceedings of the 5th ACM SIGPLAN international conference on Principles and practice of declaritive programmingEarly resolution mechanisms proposed for tabling such as OLDT rely on suspension and resumption of subgoals to compute fixpoints. Recently, a new resolution framework called linear tabling has emerged as an alternative tabling method. The idea of linear ...
Efficient Java exception handling in just-in-time compilation
Research ArticlesJava uses exceptions to provide elegant error handling capabilities during program execution. However, the presence of exception handlers complicates the job of the just-in-time (JIT) compiler, while exceptions are rarely used in most programs. This ...
Comments