Advertisement

On Improving the Efficiency of Deterministic Calls and Answers in Tabled Logic Programs

  • Miguel Areias
  • Ricardo Rocha
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5816)

Abstract

The execution model on which most tabling engines are based allocates a choice point whenever a new tabled subgoal is called. This happens even when the call is deterministic. However, some of the information from the choice point is never used when evaluating deterministic tabled calls with batched scheduling. Moreover, when a deterministic answer is found for a deterministic tabled call, the call can be completed early and the corresponding choice point can be removed. Thus, if applying batched scheduling to a long deterministic computation, the system may end up consuming memory and evaluating calls unnecessarily. In this paper, we propose a solution that tries to reduce this memory and execution overhead to a minimum. Our experimental results show that, for deterministic tabled calls and tabled answers with batched scheduling, it is possible not only to reduce the memory usage overhead, but also the running time of the execution.

Keywords

Tabling Deterministic Calls and Answers Implementation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Chen, W., Warren, D.S.: Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43(1), 20–74 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Freire, J., Swift, T., Warren, D.S.: Beyond Depth-First: Improving Tabled Logic Programs through Alternative Scheduling Strategies. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS, vol. 1140, pp. 243–258. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  3. 3.
    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
  4. 4.
    Rocha, R., Silva, F., Santos Costa, V.: On applying or-parallelism and tabling to logic programs. Theory and Practice of Logic Programming 5(1 & 2), 161–205 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Rocha, R., Silva, F., Santos Costa, V.: Dynamic mixed-strategy evaluation of tabled logic programs. In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668, pp. 250–264. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  6. 6.
    Santos Costa, V., Sagonas, K., Lopes, R.: Demand-driven indexing of prolog clauses. In: Dahl, V., Niemelä, I. (eds.) ICLP 2007. LNCS, vol. 4670, pp. 395–409. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Ramakrishnan, I.V., Rao, P., Sagonas, K., Swift, T., Warren, D.S.: Efficient Access Mechanisms for Tabled Logic Programs. Journal of Logic Programming 38(1), 31–54 (1999)CrossRefzbMATHGoogle Scholar
  8. 8.
    Carlsson, M.: On the Efficiency of Optimising Shallow Backtracking in Compiled Prolog. In: International Conference on Logic Programming, pp. 3–16. The MIT Press, Cambridge (1989)Google Scholar
  9. 9.
    Aït-Kaci, H.: Warren’s Abstract Machine – A Tutorial Reconstruction. MIT Press, Cambridge (1991)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Miguel Areias
    • 1
  • Ricardo Rocha
    • 1
  1. 1.DCC-FC & CRACSUniversity of PortoPortugal

Personalised recommendations