Handling side-effects and cuts with selective recomputation in parallel Prolog

Abstract This paper proposes a Selective recomputation (SR) approach to handling side-effects and cut(!) in AND/OR parallel execution of Prolog programs. In contrast to the non-trivial recomputation involved in most of the existing solutions, the SR approach selectively recomputes the side-effect part of AND-parallel child trees in OR-forest while exploiting both independent AND-and OR-parallelism. In this paper, after introducing the background and motivation, we describe the complex side-effects ordering in AND/OR parallel execution models/systems by using an innovative concept – side-effect execution permit token. We then propose the recomputation line to divide an AND-parallel child tree into non-recomputation and recomputation parts. The recomputation is confined to the recomputation part of an AND-parallel child tree, rather than the entire tree. And the non-recomputation part can be explored in parallel, just as a pure child tree. Next, we adopt the delayed execution of soft side-effect built-ins, so that the non-recomputation part is enlarged and thus the recomputation is minimized and parallelism is maximized. Finally, we propose an optimal cut(!) implementation based on the SR approach. Through comparison and analysis, we conclude that the SR approach can solve the side-effect problem with the potential to minimize the recomputation and to maximize the parallelism.

[1]  George H. Pollard Parallel execution of Horn clause programs , 1982 .

[2]  Dingxing Wang,et al.  Intelligent Scheduling AND- and OR-Parallelism in the Parallel Logic Programming System RAP/LOP-PIM , 1991, ICPP.

[3]  Gao Yaoqing,et al.  Study of a Parallel Inference Machine for Parallel Execution of Logic Programs , 1990 .

[4]  Abdul Sattar,et al.  Parallel logic programming on distributed shared memory system , 1997, 1997 IEEE International Conference on Intelligent Processing Systems (Cat. No.97TH8335).

[5]  Gopal Gupta,et al.  Cuts and Side-Effects in And-Or Parallel Prolog , 1996, J. Log. Program..

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

[7]  Shouren Hu,et al.  A Compliling Approach for Exploiting And-parallelism in Parallel Logic Programming Systems , 1989, PARLE.

[8]  Rong Yang,et al.  IDIOM: Integrating Dependent And-, Independent And-, and Or-parallelism , 1991, ISLP.

[9]  Péter Szeredi,et al.  Scheduling Or-parallelism in Aurora: The Manchester Scheduler , 1989, International Conference on Logic Programming.

[10]  Doug DeGroot Restricted And-Parallelism and Side Effects , 1987, SLP.

[11]  Chengzheng Sun,et al.  The OR-Forest Description for the Execution of Logic Programs , 1986, ICLP.

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

[13]  Abdul Sattar,et al.  Selective Recomputation for Handling Side-Effects in Parallel Logic Programs , 1997, PLILP.

[14]  S. Chengzheng,et al.  The OR-forest-based parallel execution model of logic programs , 1990 .

[15]  Abdul Sattar,et al.  Handling Side-effects with Selective Recomputation in AND/OR Parallel Execution Models , 1997, ICLP.

[16]  Kish Shen Initial Results of the Parallel Implementation of DASWAM , 1996, JICSLP.

[17]  Mats Carlsson Design and implementation of an or-parallel Prolog engine , 1990, RIT / KTH / TRITA-CS.

[18]  Gao Yaoqing,et al.  Reduction of code space in parallel logic programming systems , 1991 .

[19]  Manuel V. Hermenegildo,et al.  Complete and Efficient Methods for Supporting Side-effects in Independent/Restricted AND-Parallelism , 1989, ICLP.

[20]  Enrico Pontelli,et al.  ACE: And/Or-parallel Copying-based Execution of Logic Programs , 1994, ICLP.

[21]  Chengzheng Sun,et al.  The sharing of environment in AND-OR-parallel execution of logic programs , 1987, ISCA '87.