Speculative Computations in Or-Parallel Tabled Logic Programs
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.
KeywordsLogic Program Speculative Computation Generator Node Current Branch Valid Answer
Unable to display preview. Download preview PDF.
- 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.Hausman, B.: Pruning and SpeculativeWork in OR-Parallel PROLOG. PhD thesis, The Royal Institute of Technology (1990)Google Scholar
- 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
- 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
- 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
- 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