Advertisement

Speculative Computations in Or-Parallel Tabled Logic Programs

  • Ricardo Rocha
  • Fernando Silva
  • Vítor Santos Costa
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3132)

Abstract

Pruning operators, such as cut, are important to develop efficient logic programs as they allow programmers to reduce the search space and thus discard unnecessary computations. For parallel systems, the presence of pruning operators introduces the problem of speculative computations. A computation is named speculative if it can be pruned during parallel evaluation, therefore resulting in wasted effort when compared to sequential execution. In this work we discuss the problems behind the management of speculative computations in or-parallel tabled logic programs. In parallel tabling, not only the answers found for the query goal may not be valid, but also answers found for tabled predicates may be invalidated. The problem here is even more serious because to achieve an efficient implementation it is required to have the set of valid tabled answers released as soon as possible. To deal with this, we propose a strategy to deliver tabled answers as soon as it is found that they are safe from being pruned, and present its implementation in the OPTYap parallel tabling system.

Keywords

Logic Program Speculative Computation Generator Node Current Branch Valid Answer 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ali, K.: A Method for Implementing Cut in Parallel Execution of Prolog. In: Proceedings of the International Logic Programming Symposium, pp. 449–456. IEEE Computer Society Press, Los Alamitos (1987)Google Scholar
  2. 2.
    Hausman, B.: Pruning and SpeculativeWork in OR-Parallel PROLOG. PhD thesis, The Royal Institute of Technology (1990)Google Scholar
  3. 3.
    Ali, K., Karlsson, R.: Scheduling Speculative Work in MUSE and Performance Results. International Journal of Parallel Programming 21, 449–476 (1992)zbMATHCrossRefGoogle Scholar
  4. 4.
    Beaumont, A., Warren, D.H.D.: Scheduling SpeculativeWork in Or-Parallel Prolog Systems. In: Proceedings of the 10th International Conference on Logic Programming, pp. 135–149. The MIT Press, Cambridge (1993)Google Scholar
  5. 5.
    Ciepielewski, A.: Scheduling in Or-parallel Prolog Systems: Survey and Open Problems. International Journal of Parallel Programming 20, 421–451 (1991)CrossRefGoogle Scholar
  6. 6.
    Rocha, R., Silva, F., Santos Costa, V.: On a Tabling Engine that Can Exploit Or-Parallelism. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol. 2237, pp. 43–58. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  7. 7.
    Rocha, R., Silva, F., Santos Costa, V.: YapOr: an Or-Parallel Prolog System Based on Environment Copying. In: Barahona, P., Alferes, J.J. (eds.) EPIA 1999. LNCS (LNAI), vol. 1695, pp. 178–192. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  8. 8.
    Rocha, R., Silva, F., Santos Costa, V.: YapTab: A Tabling Engine Designed to Support Parallelism. In: Proceedings of the 2nd Conference on Tabulation in Parsing and Deduction, pp. 77–87 (2000)Google Scholar
  9. 9.
    Ali, K., Karlsson, R.: Full Prolog and Scheduling OR-Parallelism in Muse. International Journal of Parallel Programming 19, 445–475 (1990)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Sagonas, K., Swift, T., Warren, D.S.: XSB as an Efficient Deductive Database Engine. In: Proceedings of the ACM SIGMOD International Conference on the Management of Data, pp. 442–453. ACM Press, New York (1994)Google Scholar
  11. 11.
    Sagonas, K., Swift, T.: An Abstract Machine for Tabled Execution of Fixed-Order Stratified Logic Programs. ACM Transactions on Programming Languages and Systems 20, 586–634 (1998)CrossRefGoogle Scholar
  12. 12.
    Ramakrishnan, I.V., Rao, P., Sagonas, K., Swift, T., Warren, D.S.: Efficient Access Mechanisms for Tabled Logic Programs. Journal of Logic Programming 38, 31–54 (1999)zbMATHCrossRefGoogle Scholar
  13. 13.
    Guo, H.F., Gupta, G.: Cuts in Tabled Logic Programming. In: Proceedings of the Colloquium on Implementation of Constraint and LOgic Programming Systems (2002)Google Scholar
  14. 14.
    Guo, H.F., Gupta, G.: A Simple Scheme for Implementing Tabled Logic Programming Systems Based on Dynamic Reordering of Alternatives. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol. 2237, pp. 181–196. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  15. 15.
    Castro, L.F., Warren, D.S.: Approximate Pruning in Tabled Logic Programming. In: Degano, P. (ed.) ESOP 2003. LNCS, vol. 2618, pp. 69–83. Springer, Heidelberg (2003)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Ricardo Rocha
    • 1
  • Fernando Silva
    • 1
  • Vítor Santos Costa
    • 2
  1. 1.DCC-FC & LIACCUniversity of PortoPortugal
  2. 2.COPPE Systems & LIACCFederal University of Rio de JaneiroBrazil

Personalised recommendations