High Level Thread-Based Competitive Or-Parallelism in Logtalk

Paulo Moura, Ricardo Rocha and Sara C. Madeira

January 2009


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.


  author =    {P. Moura and R. Rocha and S. C. Madeira},
  title =     {{High Level Thread-Based Competitive Or-Parallelism in Logtalk}},
  booktitle = {Proceedings of the 11th International Symposium on Practical Aspects of Declarative 
               Languages (PADL 2009)},
  pages =     {107--121},
  number =    {5418},
  series =    {LNCS},
  publisher = {Springer},
  editor =    {A. Gill and T. Swift},
  month =     {January},
  year =      {2009},
  address =   {Savannah, Georgia, USA},

Download Paper

PDF file