Skip to main content

Speculative Computations in Or-Parallel Tabled Logic Programs

  • Conference paper
Logic Programming (ICLP 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3132))

Included in the following conference series:

  • 404 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  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 

  3. Ali, K., Karlsson, R.: Scheduling Speculative Work in MUSE and Performance Results. International Journal of Parallel Programming 21, 449–476 (1992)

    Article  MATH  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 

  5. Ciepielewski, A.: Scheduling in Or-parallel Prolog Systems: Survey and Open Problems. International Journal of Parallel Programming 20, 421–451 (1991)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  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 

  9. Ali, K., Karlsson, R.: Full Prolog and Scheduling OR-Parallelism in Muse. International Journal of Parallel Programming 19, 445–475 (1990)

    Article  MathSciNet  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 

  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)

    Article  Google Scholar 

  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)

    Article  MATH  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 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Rocha, R., Silva, F., Santos Costa, V. (2004). Speculative Computations in Or-Parallel Tabled Logic Programs. In: Demoen, B., Lifschitz, V. (eds) Logic Programming. ICLP 2004. Lecture Notes in Computer Science, vol 3132. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-27775-0_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-27775-0_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22671-0

  • Online ISBN: 978-3-540-27775-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics