ABSTRACT
Early 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 tabling is to use iterative computation rather than suspension to compute fixpoints. Although linear tabling is simple, easy to implement, and superior in space efficiency, the current implementations are several times slower than XSB, the state-of-the-art implementation of OLDT, due to re-evaluation of looping subgoals. In this paper, we present a new linear tabling method and propose several optimization techniques for fast computation of fixpoints. The optimization techniques significantly improve the performance by avoiding redundant evaluation of subgoals, re-application of clauses, and reproduction of answers in iterative computation. Our implementation of the method in B-Prolog not only consumes an order of magnitude less stack space than XSB for some programs but also compares favorably well with XSB in speed.
- Bancilhon, F., and Ramakrishnan, R. An amateur's introduction to recursive query processing strategies. Proc. of ACM SIGMOD '86 (May 28-30, 1986), 16--52.]] Google ScholarDigital Library
- Bol, R. N., and Degerstedt, L. Tabulated resolution for the well-founded semantics. Journal of Logic Programming 34, 2 (Feb. 1998), 67--109.]]Google ScholarCross Ref
- Chen, W., and Warren, D. S. Tabled evaluation with delaying for general logic programs. Journal of the ACM 43, 1 (Jan. 1996), 20--74.]] Google ScholarDigital Library
- Demoen, B., and Sagonas, K. CAT: The copying approach to tabling. LNCS (PLILP) 1490 (1998), 21--35.]] Google ScholarDigital Library
- Demoen, B., and Sagonas, K. CHAT: The copy-hybrid approach to tabling. LNCS (PADL) 1551 (1999), 106--121.]] Google ScholarDigital Library
- Freire, J., Swift, T., and Warren, D. S. Beyond depth-first: Improving tabled logic programs through alternative scheduling strategies. LNCS (PLILP) 1140 (1996), 243--257.]] Google ScholarDigital Library
- Guo, H.-F., and Gupta, G. A simple scheme for implementing tabled logic programming systems based on dynamic reordering of alternatives. LNCS (ICLP) 2237 (2001), 181--195.]] Google ScholarDigital Library
- Lloyd, J. W. Foundation of Logic Programming, 2 ed. Springer-Verlag, 1988.]] Google ScholarDigital Library
- Michie, D. "memo" functions and machine learning. Nature (Apr. 1968), 19--22.]]Google Scholar
- Przymusinski, T. C. Every logic program has a natural stratification and an iterated least fixed point model. In PODS '89. Proceedings of the Eighth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, March 29--31, 1989, Philadelphia, PA (1989), ACM, Ed., ACM Press, pp. 11--21.]] Google ScholarDigital Library
- Ramakrishnan, C. Model checking with tabled logic programming. In ALP News Letter (2002), ALP.]]Google Scholar
- Rocha, R., Silva, F., and Costa, V. S. On a tabling engine that can exploit or-parallelism. LNCS (ICLP) 2237 (2001), 43--58.]] Google ScholarDigital Library
- Sagonas, K., and Swift, T. An abstract machine for tabled execution of fixed-order stratified logic programs. ACM Transactions on Programming Languages and Systems 20, 3 (1 May 1998), 586--634.]] Google ScholarDigital Library
- Shen, Y., Yuan, L., You, J., and Zhou, N. Linear tabulated resolution based on Prolog control strategy. Theory and Practice of Logic Programming (TPLP) 1, 1 (Feb. 2001), 71--103.]] Google ScholarDigital Library
- Tamaki, H., and Sato, T. OLD resolution with tabulation. In Proceedings of the Third International Conference on Logic Programming (London, 1986), E. Shapiro, Ed., Lecture Notes in Computer Science, Springer-Verlag, pp. 84--98.]] Google ScholarDigital Library
- Ullman, J. D. Database and Knowledge-Base Systems, vol. 1 & 2. Computer Science Press, 1988.]] Google ScholarDigital Library
- Uratani, N., Takezawa, T., Matsuo, H., and Morita, C. ATR integrated speech and language database. Technical Report TR-IT-0056, ATR Interpreting Telecommunications Research Laboratories, 1994. In Japanese.]]Google Scholar
- Warren, D. S. Memoing for logic programs. Comm. of the ACM, Special Section on Logic Programming 35, 3 (Mar. 1992), 93.]] Google ScholarDigital Library
- Zhou, N., Sato, T., and Hasida, K. Toward a high-performance system for symbolic and statistical modeling. In IJCAI Workshop on Learning Statistical Models from Relational Data (2003), p. to appear.]]Google Scholar
- Zhou, N.-F. Parameter passing and control stack management in Prolog implementation revisited. ACM Transactions on Programming Languages and Systems 18, 6 (Nov. 1996), 752--779.]] Google ScholarDigital Library
- Zhou, N.-F., Shen, Y.-D., Yuan, L.-Y., and You, J.-H. Implementation of a linear tabling mechanism. LNCS (PADL) 1753 (2000), 109--123.]] Google ScholarDigital Library
Index Terms
- Efficient fixpoint computation in linear tabling
Recommendations
Linear tabling strategies and optimizations
Recently there has been a growing interest in research in tabling in the logic programming community because of its usefulness in a variety of application domains including program analysis, parsing, deductive databases, theorem proving, model checking, ...
Semi-naive evaluation in linear tabling
PPDP '04: Proceedings of the 6th ACM SIGPLAN international conference on Principles and practice of declarative programmingSemi-naive evaluation is an effective technique employed in bottom-up evaluation of logic programs to avoid redundant joins of answers. The impact of this technique on top-down evaluation had been unknown. In this paper, we introduce semi-naive ...
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 ...
Comments