Advertisement

A Tabling Implementation Based on Variables with Multiple Bindings

  • Pablo Chico de Guzmán
  • Manuel Carro
  • Manuel Hermenegildo
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5649)

Abstract

Suspension-based tabling systems have to save and restore computation states belonging to OR branches. Stack freezing combined with (forward) trailing is among the better-known implementation approaches for this purpose. Resuming a goal using this technique reinstalls the bindings for all the variables in the environment where the goal was suspended. In this paper we explore an alternative approach where variables can keep track of several bindings, associated with suspensions. Resuming a goal boils down to determining which suspension has to be resumed, in order to select, when dereferencing, the bindings which were active at the moment of suspending. We present the ideas behind this approach, highlight several advantages over other suspension-based implementations, and perform an experimental evaluation. We also recall the similarity between OR-parallelism and suspension-based implementations of tabling, and discuss similarities with the Version Vectors Method, among others.

Keywords

Logic Programming Tabling Implementation Performance OR-Parallelism 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Warren, D.S.: Memoing for logic programs. Communications of the ACM 35(3), 93–111 (1992)CrossRefGoogle Scholar
  2. 2.
    Chen, W., Warren, D.S.: Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43(1), 20–74 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Tamaki, H., Sato, M.: OLD resolution with tabulation. In: Wada, E. (ed.) Logic Programming 1986. LNCS, vol. 264, pp. 84–98. Springer, Heidelberg (1987)Google Scholar
  4. 4.
    Ramakrishnan, R., Ullman, J.D.: A survey of research on deductive database systems. Journal of Logic Programming 23(2), 125–149 (1993)CrossRefGoogle Scholar
  5. 5.
    Warren, R., Hermenegildo, M., Debray, S.K.: On the Practicality of Global Flow Analysis of Logic Programs. In: Fifth International Conference and Symposium on Logic Programming, pp. 684–699. MIT Press, Cambridge (1988)Google Scholar
  6. 6.
    Dawson, S., Ramakrishnan, C.R., Warren, D.S.: Practical Program Analysis Using General Purpose Logic Programming Systems – A Case Study. In: Proceedings of PLDI 1996, pp. 117–126. ACM Press, New York (1996)Google Scholar
  7. 7.
    Zou, Y., Finin, T., Chen, H.: F-OWL: An Inference Engine for Semantic Web. In: Hinchey, M.G., Rash, J.L., Truszkowski, W.F., Rouff, C.A. (eds.) FAABS 2004. LNCS, vol. 3228, pp. 238–248. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  8. 8.
    Ramakrishna, Y., Ramakrishnan, C., Ramakrishnan, I., Smolka, S., Swift, T., Warren, D.: Efficient Model Checking Using Tabled Resolution. In: Grumberg, O. (ed.) CAV 1997. LNCS, vol. 1254, pp. 143–154. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  9. 9.
    Sagonas, K., Swift, T.: An Abstract Machine for Tabled Execution of Fixed-Order Stratified Logic Programs. ACM Transactions on Programming Languages and Systems 20(3), 586–634 (1998)CrossRefGoogle Scholar
  10. 10.
    Demoen, B., Sagonas, K.: CAT: The Copying Approach to Tabling. In: Palamidessi, C., Meinke, K., Glaser, H. (eds.) ALP 1998 and PLILP 1998. LNCS, vol. 1490, pp. 21–35. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  11. 11.
    Demoen, B., Sagonas, K.: CHAT: the copy-hybrid approach to tabling. Future Generation Computer Systems 16, 809–830 (2000)CrossRefGoogle Scholar
  12. 12.
    Zhou, N.F., Shen, Y.D., Yuan, L.Y., You, J.H.: Implementation of a linear tabling mechanism. J. of Functional and Logic Programming 2001(10) (October 2001)Google Scholar
  13. 13.
    Zhou, N.F., Sato, T., Shen, Y.D.: Linear Tabling Strategies and Optimizations. Theory and Practice of Logic Programming 8(1), 81–109 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Guo, H.F., Gupta, G.: A Simple Scheme for Implementing Tabled Logic Programming Systems Based on Dynamic Reordering of Alternatives. In: International Conference on Logic Programming, pp. 181–196 (2001)Google Scholar
  15. 15.
    de Guzmán, P.C., Carro, M., Hermenegildo, M.: Towards a Complete Scheme for Tabled Execution Based on Program Transformation. In: Gill, A. (ed.) PADL 2009. LNCS, vol. 5418, pp. 224–238. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  16. 16.
    Demoen, B., Sagonas, K.: CHAT is θ(SLG-WAM). In: Ganzinger, H., McAllester, D., Voronkov, A. (eds.) LPAR 1999. LNCS, vol. 1705, pp. 337–357. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  17. 17.
    Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M., López-Garcí, P., Puebla, G.: The Ciao System. Ref. Manual (v1.13). Technical report, C. S. School, UPM (2006), http://www.ciaohome.org
  18. 18.
    Warren, D.H.D.: OR-Parallel Execution Models of Prolog. In: Ehrig, H., Levi, G., Montanari, U. (eds.) CAAP 1987 and TAPSOFT 1987. LNCS, vol. 249. Springer, Heidelberg (1987)Google Scholar
  19. 19.
    Warren, D.S.: Efficient Prolog Memory Management for Flexible Control Strategies. In: International Symposium on Logic Programming, Silver Spring, MD, Atlantic City, pp. 198–203. IEEE Computer Society, Los Alamitos (1984)Google Scholar
  20. 20.
    Warren, D.H.D.: The SRI Model for OR-Parallel Execution of Prolog—Abstract Design and Implementation. In: Furukawa, K., Fujisaki, T., Tanaka, H. (eds.) Logic Programming 1987. LNCS, vol. 315, pp. 92–102. Springer, Heidelberg (1988)Google Scholar
  21. 21.
    Ali, K., Karlsson, R.: The MUSE Approach to Or-Parallel Prolog. International Journal of Parallel Programming 19(2), 129–162 (1990)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Lusk, E., Butler, R., Disz, T., Olson, R., Stevens, R., Warren, D.H.D., Calderwood, A., Szeredi, P., Brand, P., Carlsson, M., Ciepielewski, A., Hausman, B., Haridi, S.: The Aurora Or-parallel Prolog System. New Generation Computing 7(2/3), 243–271 (1988)Google Scholar
  23. 23.
    Hausman, B., Ciepielewski, A., Haridi, S.: Or-Parallel Prolog Made Efficient on Shared Memory Multiprocessors. In: Symposium on Logic Programming, SICS, August 1987, pp. 69–79 (1987)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Pablo Chico de Guzmán
    • 1
  • Manuel Carro
    • 1
  • Manuel Hermenegildo
    • 1
    • 2
  1. 1.School of Computer ScienceUniv. Politécnica de MadridSpain
  2. 2.IMDEA SoftwareSpain

Personalised recommendations