Skip to main content

High Level Thread-Based Competitive Or-Parallelism in Logtalk

  • Conference paper
  • 391 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5418))

Abstract

This paper presents the logic programming concept of thread-based competitive or-parallelism, which combines the original idea of competitive or-parallelism with committed-choice nondeterminism and speculative threading. In thread-based competitive or-parallelism, an explicit disjunction of subgoals is interpreted as a set of concurrent alternatives, each running in its own thread. The individual subgoals usually correspond to predicates implementing different procedures that, depending on the problem specifics, are expected to either fail or succeed with different performance levels. The subgoals compete for providing an answer and the first successful subgoal leads to the termination of the remaining ones. We discuss the implementation of thread-based competitive or-parallelism in the context of Logtalk, an object-oriented logic programming language, and present experimental results.

This work has been partially supported by the FCT research projects STAMPA (PTDC/EIA/67738/2006) and MOGGY (PTDC/EIA/70830/2006).

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Gupta, G., Pontelli, E., Ali, K., Carlsson, M., Hermenegildo, M.V.: Parallel Execution of Prolog Programs: A Survey. ACM Transactions on Programming Languages and Systems 23, 472–602 (2001)

    Article  Google Scholar 

  2. Ertel, W.: Performance Analysis of Competitive Or-Parallel Theorem Proving. Technical report fki-162-91, Technische Universität München (1991)

    Google Scholar 

  3. Shapiro, E.: The Family of Concurrent Logic Programming Languages. ACM Computing Surveys 21, 413–510 (1989)

    Article  Google Scholar 

  4. González, A.: Speculative Threading: Creating New Methods of Thread-Level Parallelization. Technology@Intel Magazine (2005)

    Google Scholar 

  5. Moura, P.: (ISO/IEC DTR 13211–5:2007 Prolog Multi-threading Support), http://logtalk.org/plstd/threads.pdf

  6. Moura, P.: Logtalk – Design of an Object-Oriented Logic Programming Language. PhD thesis, Department of Computer Science, University of Beira Interior (2003)

    Google Scholar 

  7. Ali, K., Karlsson, R.: The Muse Approach to OR-Parallel Prolog. International Journal of Parallel Programming 19, 129–162 (1990)

    Article  MathSciNet  Google Scholar 

  8. 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 

  9. Lusk, E., Butler, R., Disz, T., Olson, R., Overbeek, R., Stevens, R., Warren, D.H.D., Calderwood, A., Szeredi, P., Haridi, S., Brand, P., Carlsson, M., Ciepielewski, A., Hausman, B.: The Aurora Or-Parallel Prolog System. In: International Conference on Fifth Generation Computer Systems, Institute for New Generation Computer Technology, pp. 819–830 (1988)

    Google Scholar 

  10. Calderwood, A., Szeredi, P.: Scheduling Or-parallelism in Aurora – the Manchester Scheduler. In: International Conference on Logic Programming, pp. 419–435. MIT Press, Cambridge (1989)

    Google Scholar 

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

    Article  Google Scholar 

  12. Beaumont, A., Raman, S., Szeredi, P., Warren, D.H.D.: Flexible Scheduling of OR-Parallelism in Aurora: The Bristol Scheduler. In: Aarts, E.H.L., van Leeuwen, J., Rem, M. (eds.) PARLE 1991. LNCS, vol. 506, pp. 403–420. Springer, Heidelberg (1991)

    Chapter  Google Scholar 

  13. Sindaha, R.: Branch-Level Scheduling in Aurora: The Dharma Scheduler. In: International Logic Programming Symposium, pp. 403–419. MIT Press, Cambridge (1993)

    Google Scholar 

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

    Article  Google Scholar 

  15. 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 

  16. Beaumont, A., Warren, D.H.D.: Scheduling Speculative Work in Or-Parallel Prolog Systems. In: International Conference on Logic Programming, pp. 135–149. MIT Press, Cambridge (1993)

    Google Scholar 

  17. Moura, P.: (Logtalk), http://logtalk.org

  18. Pfaff, T.J., Tran, M.M.: The generalized jug problem. Journal of Recreational Mathematics 31, 100–103 (2003)

    Google Scholar 

  19. Boldi, P., Santini, M., Vigna, S.: Measuring with jugs. Theoretical Computer Science 282, 259–270 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  20. Berger, E.D., Mckinley, K.S., Blumofe, R.D., Wilson, P.R.: Hoard: A scalable memory allocator for multithreaded applications. In: International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 117–128 (2000)

    Google Scholar 

  21. Tamaki, H., Sato, T.: OLDT Resolution with Tabulation. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 84–98. Springer, Heidelberg (1986)

    Chapter  Google Scholar 

  22. Chen, W., Warren, D.S.: Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43, 20–74 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  23. Chico de Guzmán, P., Carro, M., Hermenegildo, M.V., Silva, C., Rocha, R.: An Improved Continuation Call-Based Implementation of Tabling. In: Hudak, P., Warren, D.S. (eds.) PADL 2008. LNCS, vol. 4902, pp. 197–213. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  24. Marques, R.: Concurrent Tabling: Algorithms and Implementation. PhD thesis, Department of Computer Science, New University of Lisbon (2007)

    Google Scholar 

  25. Marques, R., Swift, T., Cunha, J.: Extending tabled logic programming with multi-threading: A systems perspective (2008), http://www.cs.sunysb.edu/~tswift

  26. Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M.V., López, P., Puebla, G.: (Ciao Prolog System Manual), http://clip.dia.fi.upm.es/Software/Ciao

  27. Madeira, S.C., Oliveira, A.L.: Biclustering algorithms for biological data analysis: a survey. IEEE/ACM Transactions on Computational Biology and Bioinformatics 1, 24–45 (2004)

    Article  Google Scholar 

  28. Mechelen, I.V., Bock, H.H., Boeck, P.D.: Two-mode clustering methods: a structured overview. Statistical Methods in Medical Research 13, 979–981 (2004)

    MathSciNet  MATH  Google Scholar 

  29. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. The MIT Electrical Engineering and Computer Science Series. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  30. Hastie, T., Tibshirani, R., Friedman, J.: The Elements of Statistical Learning. Data Mining, Inference and Prediction. Springer Series in Statistics (2001)

    Google Scholar 

  31. Moura, P., Crocker, P., Nunes, P.: High-Level Multi-threading Programming in Logtalk. In: Hudak, P., Warren, D.S. (eds.) PADL 2008. LNCS, vol. 4902, pp. 265–281. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  32. Moura, P., Rocha, R., Madeira, S.C.: Thread-Based Competitive Or-Parallelism. In: Garcia de la Banda, M., Pontelli, E. (eds.) ICLP 2008. LNCS, vol. 5366, pp. 713–717. Springer, Heidelberg (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Moura, P., Rocha, R., Madeira, S.C. (2008). High Level Thread-Based Competitive Or-Parallelism in Logtalk. In: Gill, A., Swift, T. (eds) Practical Aspects of Declarative Languages. PADL 2009. Lecture Notes in Computer Science, vol 5418. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-92995-6_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-92995-6_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-92994-9

  • Online ISBN: 978-3-540-92995-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics