And-Or Parallelism on Shared-Memory Multiprocessors

Abstract This paper presents an extended and—or tree and an extended WAM (Warren Abstract Machine) for efficiently supporting both and-parallel and or-parallel execution of logic programs on shared-memory multiprocessors. Our approach for exploiting both and- and or-parallelism is based on the binding-arrays method for or-parallelism and the RAP (Restricted And-Parallelism) method for and-parallelism, two succesful methods for implementing or-parallelism and and-parallelism, respectively. Our combined and—or model avoids redundant computations when goals exhibit both and- and or-parallelism, by representing the cross product of the solutions from the and—or parallel goals rather than recomputing them. We extend the classical and—or tree with two new nodes: a “sequential” node (for RAPs sequencial goals), and a “cross-product” node (for the cross product of solutions from and—or parallel goals). The paper also presents an extension of the WAM, called AO—WAM, which is used to compile logic programs for and—or parallel execution based on the extended and—or tree. The AO—WAM incorporates a number of novel features: (i) inclusion of a base array with each processor's binding array for constant-time access to variables in the presence of and-parallelism, (ii) inclusion of new stack frames and instructions to express solution sharing , and (iii) novel optimizations which minimize the cost of binding-array updates in the presence of and-parallelism.

[1]  Manuel V. Hermenegildo,et al.  The DCG, UDG, and MEL Methods for Automatic Compile-time Parallelization of Logic Programs for Independent And-parallelism , 1990, ICLP.

[2]  David H. D. Warren,et al.  The SRI Model for Or-Parallel Execution of Prolog: Abstract Design and Implementation Issues , 1987, SLP.

[3]  Gopal Gupta,et al.  And-Or Parallelism in Full Prolog with Paged Binding Arrays , 1992, PARLE.

[4]  Manuel V. Hermenegildo,et al.  Determination of variable dependence information at compile-time through abstract interpretation , 1989 .

[5]  Dennis F. Kibler,et al.  AND Parallelism in Logic Programs , 1983, IJCAI.

[6]  Keith L. Clark,et al.  PARLOG: parallel programming in logic , 1986, ACM Trans. Program. Lang. Syst..

[7]  David H. D. Warren,et al.  Flexible scheduling of or-parallelism is Aurora: the Bristol scheduler , 1991 .

[8]  Seif Haridi,et al.  Kernel Andorra Prolog and its Computation Model , 1990, ICLP.

[9]  Philippe Robert,et al.  The PEPSys Model: Combining Backtracking, AND- and OR-Parallelism , 1987, SLP.

[10]  Seif Haridi,et al.  OR-Parallel Prolog Made Efficient on Shared Memory Multiprocessors , 1987, SLP.

[11]  Jeffrey D. Ullman,et al.  Principles Of Database And Knowledge-Base Systems , 1979 .

[12]  Gopal Gupta Parallel execution of logic programs on shared memory multiprocessors , 1992 .

[13]  Gopal Gupta Dynamic Parallel Evaluation of the Cross-Product Set Using Time-Stamps , 1992, Inf. Process. Lett..

[14]  Vipin Kumar,et al.  AND-Parallel Execution of Logic Programs on a Shared-Memory Multiprocessor , 1988, J. Log. Program..

[15]  Doug DeGroot,et al.  Restricted AND-Parallelism , 1984, FGCS.

[16]  Jacques Chassin de Kergommeaux,et al.  An Abstract Machine to Implement OR-AND Parallel Prolog Efficiently , 1990, J. Log. Program..

[17]  Manuel V. Hermenegildo,et al.  &-Prolog and its Performance: Exploiting Independent And-Parallelism , 1990, ICLP.

[18]  Manuel V. Hermenegildo,et al.  An Abstract Machine for Restricted AND-Parallel Execution of Logic Programs , 1986, ICLP.

[19]  Kazunori Ueda,et al.  Guarded Horn Clauses , 1986, LP.

[20]  Péter Szeredi Performance Analysis of the Aurora Or-Parallel Prolog System , 1989, NACLP.

[21]  Laxmikant V. Kalé,et al.  Joining AND Parallel Solutions in AND/OR Parallel Systems , 1990, NACLP.

[22]  Rong Yang,et al.  Andorra I: a parallel Prolog system that transparently exploits both And-and or-parallelism , 1991, PPOPP '91.

[23]  David Y. Y. Yun,et al.  A Scalable Abstract Machine Model to Support Limited-OR (LOR) / Restricted-AND Parallelism (RAP) in Logic Programs , 1988, ICLP/SLP.

[24]  Manuel V. Hermenegildo,et al.  Recomputation based Implementations of And-Or Parallel Prolog , 1992, FGCS.

[25]  Seif Haridi,et al.  Or-Parallel Prolog on Shared Memory Multiprocessors , 1989, J. Log. Program..

[26]  Doug DeGroot,et al.  AND-Parallelism of Logic Programs Based on a Static Data Dependency Analysis , 1985, COMPCON.

[27]  Manuel V. Hermenegildo,et al.  Efficient Management of Backtracking in AND-Parallelism , 1986, ICLP.