Selective recomputation for handling side-effects in parallel logic programs

  • Zhiyi Huang
  • Chengzheng Sun
  • Abdul Sattar
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1292)


In contrast to merely AND- and merely OR- parallel execution models/systems, the side- effect problem in AND/OR parallel execution of Prolog programs is intricate and need to be carefully investigated. To decrease the non-trivial recomputation occurred in previous approach, this paper presents a Selective Recomputation(SR) approach for handling side-effects in the OR-forest model which can exploit both AND- and OR-parallelism. Firstly, the background and motivation is introduced. Secondly, the complex side-effects orderings in AND/OR parallel execution models/systems are clearly described using an innovative concept — side-effect execution permit token. Thirdly, recomputation line is proposed to divide an AND-parallel child tree into non-recomputation part and recomputation part. Therefore, the recomputation is only confined to the recomputation part of an AND-parallel child tree, instead of the entire tree. And the non-recomputation part can be explored in parallel as pure child tree. Finally, by adopting the delayed execution of soft side-effect built-ins, the non-recomputation part is enlarged and thus the recomputation is minimized and parallelism is maximized. Through comparison and analysis, we conclude the SR approach can solve the side-effect problem with minimum recomputation and maximum parallelism. The idea of SR is applicable to other AND/OR parallel execution models/systems as well.


Logic Programming Parallel Processing AND-parallelism OR-parallelism OR-forest Side-effect 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    K.A.M. Ali, Roland Karlsson: “The MUSE Approach to Or-Parallel Prolog,” International Journal of Parallel Programming, 19(2):129–162, April 1990.Google Scholar
  2. 2.
    A. Calderwood, P. Szeredi: “Scheduling OR-parallelism in Aurora-the Manchester scheduler,” In Proc. of the Sixth International Conference on Logic Programming, MIT Press, pp419–435, June 1989.Google Scholar
  3. 3.
    Mats Carlsson: “Design and Implementation of an OR-Parallel Prolog Engine,” Ph.D. Thesis, The Royal Institute of Technology, Stockholm, 1990.Google Scholar
  4. 4.
    D. DeGroot: “Restricted AND-Parallelism and Side-effects,” In International Symposium on Logic Programming, San Francisco, 1987, pp80–89.Google Scholar
  5. 5.
    Y. Gao, et al: “Intelligent Scheduling AND-and OR-parallelism in the Parallel Logic Programming System RAP/LOP-PIM,” In Proc. of the 20th Annual Inter. Conf. on Parallel Processing (ICPP'91), St. Charles, IL, USA, Aug. 1991.Google Scholar
  6. 6.
    G. Gupta, et al: “IDIOM: Integrating Dependent and-, Independent and-, and Orparallelism,” In 1991 International Logic Programming Symposium, pp152–166, MIT Press, Oct. 1991.Google Scholar
  7. 7.
    G. Gupta, M. Hermenegildo: “ACE: And/Or-parallel Copying-based Execution of Logic Programs,” In Proc. ICLP91 Workshop on Parallel Execution of Logic Programs, Lecture Notes in Computer Science 569, Springer Verlag, 1991.Google Scholar
  8. 8.
    G. Gupta, V. Santos Costa: “Cut and Side-Effects in And-Or Parallel Prolog,” In Proc. 4th IEEE Symposium on Parallel and Distributed Processing, Arlington, 1992.Google Scholar
  9. 9.
    Bogumil Hausman: “Pruning and Speculative Work in OR-Parallel Prolog,” Ph.D. Thesis, The Royal Institute of Technology, Stockholm, 1990.Google Scholar
  10. 10.
    M. Hermenegildo, K. Greene: “The &-prolog System: Exploiting Independent And-Parallelism,” New Generation Computing, 9(3,4):233–257, 1991.Google Scholar
  11. 11.
    Zhiyi Hwang, Shouren Hu: “A Compiling Approach for Exploiting AND-parallelism in Parallel Logic Programming Systems,” In Proc. of Parallel Architectures and Languages Europe, pp335–345, June 1989.Google Scholar
  12. 12.
    Zhiyi Hwang, Chengzheng Sun, et al: “Reduction of Code Space in Parallel Logic Programming Systems,” In Proc. of Parallel Architectures and Languages Europe, pp454–470, June 1991.Google Scholar
  13. 13.
    Ewing Lusk, D.H.D. Warren, S. Haridi, et al: “The Aurora or-parallel Prolog system,” New Generation Computing, 7(2,3):243–271, 1990.Google Scholar
  14. 14.
    K. Muthukumar and M. Hermenegildo: “Complete and Efficient Methods for Supporting Side-Effects in Independent/Restricted And-parallelism,” In 1989 International Conference on Logic Programming, MIT Press, June 1989.Google Scholar
  15. 15.
    G.H. Pollard: “Parallel Execution of Horn Clause Programs,” Ph.D. Thesis, Dept. of Computing, Imperial College, 1981.Google Scholar
  16. 16.
    E. Pontelli, G. Gupta, M. Hermenegildo: “&ACE: A High-Performance Parallel Prolog System,” In International Parallel Processing Symposium, IEEE Computer Society, 1995.Google Scholar
  17. 17.
    V. Santos Costa, D.H.D. Warren, R. Yang: “Andorra-I: A parallel Prolog system that transparently exploits both and-and or-parallelism,“ In Proc. of the Third ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, ACM Press, April 1991.Google Scholar
  18. 18.
    K. Shen: “Initial Results from the Parallel Implementation of DASWAM," In Proc. of Joint International Symposium of Logic Programming, pp513–527, Sep. 1996.Google Scholar
  19. 19.
    Chengzheng Sun, Yungui Ci: “The OR-forest Description for the Execution of Logic Programs,” In Proc. of Third International Conference on Logic Programming, pp457–466, 1986.Google Scholar
  20. 20.
    Chengzheng Sun, Yungui Ci: “The Sharing of Environment in AND-OR-parallel Execution of Logic Programs," In Proc. of 14th International Symposium on Computer Architecture, ppl37–144, 1987.Google Scholar
  21. 21.
    Chengzheng Sun, Yungui Ci: “The OR-forest-based parallel execution model of logic programs,” Future Generation Computer Systems, North-Holland, Volume 6, Number 1, (June 1990), pp25–34.Google Scholar
  22. 22.
    D.H.D. Warren: “An Abstract Prolog Instruction Set,” Technical Note 309, SRI International, 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Zhiyi Huang
    • 1
  • Chengzheng Sun
    • 1
  • Abdul Sattar
    • 1
  1. 1.Knowledge Representation and Reasoning Unit School of Computing & Information TechnologyGriffith UniversityNathanAustralia

Personalised recommendations