Skip to main content
Log in

A join algorithm for combining AND parallel solutions in AND/OR parallel systems

  • Published:
International Journal of Parallel Programming Aims and scope Submit manuscript

Abstract

When two or more literals in the body of a Prolog clause are solved in (AND) parallel, their solutions need to bejoined to compute solutions for the clause. This is often a difficult problem in parallel Prolog systems that exploit OR and independent AND parallelism in Prolog programs. In several AND/OR parallel systems proposed recently, this problem is side-stepped at the cost of unexploited OR parallelism in the program, in part due to the complexity of the backtracking algorithm beneath AND parallel branches. In some cases, the data dependency graphs used by these systems cannot represent all the exploitable indenpendent AND parallelism known at compile time.

In this paper, we describe the compile time analysis for an optimizedjoin algorithm for supporting independent AND parallelism in logic programs efficiently without leaving any OR parallelism unexploited. We then discuss how this analysis can be used to yield very efficient runtime behavior. We also discuss problems associated with a tree representation of the search space when arbitrarily complex data dependency graphs are permitted. We describe how these problems can be resolved by mapping the search space onto the data dependency graphs themselves. The algorithm has been implemented in a compiler for parallel Prolog based on the Reduce-OR process model. The algorithm is suitable for the implementation of AND/OR systems on both shared and nonshared memory machines. Performance on benchmark programs exhibiting AND and OR parallelism on one shared memory machine and one message passing machine is presented.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. L. V. Kalé, The REDUCE-OR Process Model for the Parallel Evaluation of Logic Programs,Int'l. Conf. on Logic Programming, pp. 616–632 (May 1987).

  2. W. Fenton, B. Ramkumar, V. A. Saletore, A. B. Sinha, and L. V. Kalé, Supporting Machine Independent Programing on Diverse Parallel Architectures,Int'l. Conf. on Parallel Processing (August 1991).

  3. L. V. Kalé, The Chare Kernel Parallel Programming System,Int'l. Conf. on Parallel Processing (August 1990).

  4. M. Hermenegildo and F. Rossi, On the Correctness and Efficiency of Independent AND Parallelism in Logic Programs,No. Amer. Conf. on Logic Programming, pp. 369–389 (October 1989).

  5. L. V. Kalé, B. Ramkumar, and W. Shu, A Memory Organization Independent Binding Environment for AND and OR Parallel Execution of Logic Programs,The 5th Int'l. Conf./Symp. on Logic Programming, pp. 1223–1240 (August 1988).

  6. B. Ramkumar and L. V. Kalé, Compiled Execution of the REDUCE-OR Process Model on Multiprocessors,No. Amer. Conf. on Logic Programming (October 1989).

  7. S. Haridi and P. Brand, ANDORRA Prolog: An Integration of Prolog and Committed Choice Languages,Int'l. Conf. on Fifth Generation Computer Systems, pp. 745–754 (November 1988).

  8. D. H. D. Warren, The Extended Andorra Model with Implicit Control,Workshop on Parallel Logic Programming at the Int'l. Conf. on Logic Programming (June 1990).

  9. G. Gupta and D. H. D. Warren, An Interprefer for the Extended Andorra Model,Workshop on Parallel Execution of Logic Programs at the No. Amer. Conf. on Logic Programming (October 1990).

  10. S. Haridi and S. Jansen, Kernel Andorra Prolog and Its Computation Model,Int'l. Conf. on Logic Programming, pp. 31–48 (June 1990).

  11. P. P. Li, A Parallel Execution Model for Logic Programming. PhD Thesis, Department of Computer Science, California Institute of Technology, Pasadena, California (April 1986).

    Google Scholar 

  12. V. Singh and M. R. Genesereth, PM: A Parallel Execution Model for Backward-Chaining Deductions, Technical Report KSL-85-18, Department of Computer Science, Stanford University (May 1985).

  13. P. Biswas and C.-C. Tseng, A Data-Driven Parallel Execution Model for Logic Programs,Int'l. Conf. on Logic Programming, pp. 1204–1222 (August 1988).

  14. J. S. Conery, Binding Environments for Parallel Logic Programs in Nonshared Memory Multiprocessors,Symp. on Logic Programming, pp. 457–467 (September 1987).

  15. M. J. Wise,Prolog Multiprocessors, Prentice Hall, International Edition (1986).

  16. J. C. de Kergommeaux and P. Robert, An Abstract Machine to Implement Efficiently OR-AND Parallel Prolog,Int'l. Conf. on Logic Programming (August 1988). Addendum to proceedings.

  17. P. Borgwardt, Parallel Prolog Using Stack Segments on Shared-Memory Multiprocessors,Symp. on Logic Programming (February 1984).

  18. G. Gupta and B. Jayaraman, Compiled AND-OR Parallelism on Shared Memory Multiprocessors,No. Amer. Conf. on Logic Programming, pp. 332–349 (October 1989).

  19. D. S. Warren, Efficient Prolog Memory Management for Flexible Control Strategies,Symp. on Logic Programming (February 1984).

  20. D. DeGroot, Restricted AND Parallelism,Int'l. Conf. on Fifth Generation Computer Systems, pp. 471–478 (November 1984).

  21. M. V. Hermenegildo, An Abstract Machine Based Execution Model for Computer Architecture Design and Efficient Implementation of Logic Programs in Parallel. PhD Thesis, Department of Computer Science, University of Texas at Austin (1986).

  22. M. Hermenegildo, Using Semaphores to Generalize CGEs. (Personal comunication).

  23. R. L. Rivest, T. H. Cormen, and C. E. Leiserson,Introduction to Algorithms, McGraw Hill, Englewoods-Cliffs, New Jersey, pp. 485–488 (1991).

    Google Scholar 

  24. B. Ramkumar, Machine Independent “AND” and “OR” Parallel Execution of Logic Programs. PhD thesis, Department of Computer Science, University of Illinois at Urbana-Champaign (1991).

  25. L. V. Kalé, “Completeness” and “Full Parallelism” of Parallel Logic Programming Schemes,Symp. on Logic Programming, pp. 125–133 (September 1987).

  26. S. K. Debray, N-W. Lin, and M. Hermenegildo, Task Granularity Analysis in Logic Programs,ACM SIGPLAN-90 Conf. on Programming Language Design and Implementation. AlsoSIGPLAN Notices Vol. 25, No. 6 (October 1990).

  27. K. Muthukumar and M. Hermenegildo, The DCG, UDG, and MEL Methods for Automatic Compile-Time Parallelization of Logic Programs for Independent And-Parallelism,Int'l. Conf. on Logic Programming, pp. 221–236 (June 1990).

  28. K. A. Hamburg, Graph Analysis, Determinacy Analysis, and Annotations for Parallel Execution of Logic Programs. Master's Thesis, Department of Computer Science, University of Illinois at Urbana-Champaign (August 1988).

Download references

Author information

Authors and Affiliations

Authors

Additional information

This work was supported in part by NSF Grants CCR-87-00988 and CCR-89-02496.

A shorter version of this paper appears in theProceedings of NACLP 1990.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ramkumar, B., Kalé, L.V. A join algorithm for combining AND parallel solutions in AND/OR parallel systems. Int J Parallel Prog 21, 67–107 (1992). https://doi.org/10.1007/BF01379315

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01379315

Key Words

Navigation