A compiling approach for exploiting and-parallelism in parallel logic programming systems

  • Zhiyi Hwang
  • Shouren Hu
Submitted Presentations
Part of the Lecture Notes in Computer Science book series (LNCS, volume 366)


Exploiting and-parallelism is important in the research of parallel execution of logic programs. In this paper, we present a compiling approach for exploiting and-parallelism in logic programming. The approach consists of three phases: analysis of entry modes; derivation of exit modes; and determination of execution graph expressions. Compared with other approaches [2,4,5], this approach, with the compile-time program-level data-dependence analysis of logic programs, can efficiently exploit and-parallelism in logic programs. Two precompilers, based on our approach and DeGroot's [3] respectively, have been implemented in SES-PIM system [19]. Through compiling and running some typical benchmarks in SES-PIM, we conclude that our approach can exploit the maximum and-parallelism under "producer-consumer" scheme, exactly, the same degree as the dynamic approach [20] once employed in SES-PIM, and needs significantly less dynamic overhead than DeGroot's while exploiting more and-parallelism than DeGroot's.


Logic programming Parallel execution Compiling And-parallelism Data-dependence Prolog 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Conery, J. S. The AND/OR model for parallel interpretation of logic programs Ph.D. Th. Dept. of Infor. and Computer Sci. UC, Irvine, 1983.Google Scholar
  2. [2]
    DeGroot, D. Restricted And-Parallelism Proc. of the Inter. Conf. on Fifth Generation Computer System (Nov. 1984) pp. 471–478.Google Scholar
  3. [3]
    DeGroot, D. A Technique for Compiling Execution Graph Expressions for Restricted And-Parallelism in Logic Programs Proc. of the 1987 Inter. Supercomputing Conf. (June 1987).Google Scholar
  4. [4]
    Chang, J.-H., Despain, A. M. and DeGroot, D. And-parallelism of Logic Programs based on a static data dependency analysis COMPCON 85, pp. 218–225, Feb., 1985.Google Scholar
  5. [5]
    Tung, Yu-Wen and Moldovan, Dan I. Detection of And-Parallelism in Logic Programming Proc. of the 1986 Int. Conf. on Parallel Processing, IEEE, 1986, pp. 984–991.Google Scholar
  6. [6]
    Clark, K. L. and Gregory, S. PARLOG: parallel programming in logic Research report DOC 84/4, Imperial College, London, England.Google Scholar
  7. [7]
    Shapiro, E. Y. A Subset of Concurrent Prolog and its Interpreter ICOT. Technical Report: TR-003 (Feb., 1983).Google Scholar
  8. [8]
    Pollard, G. H. Parallel Execution of Horn Clause Programs Ph.D. Th., Univ. of London, Imperial College of Sci. & Tech., U.K., 1987.Google Scholar
  9. [9]
    Kowalski, R. Predicate Logic as Programming Language Proc. of IFIP Congress, North Holland Publishing Company, Amsterdam, pp. 569–574, 1974.Google Scholar
  10. [10]
    Warren, D. H. D. An Abstract Prolog Instruction Set Technical Note 309, SRI International, AI center, Computer Science and Technology Division, 1983.Google Scholar
  11. [11]
    Melish, C. S. The Automatic Generation of Mode Declarations for Prolog Programs DAI Research paper 163, Dept. of Artificial Intelligence, Univ. of Edinburgh (August 1981).Google Scholar
  12. [12]
    DeGroot, D. Restricted And-Parallelism and Side-effects in Logic Programming in Supercomputers and AI Machines, Kai Hwang and Doug DeGroot Editors, McGraw-Hill, 1988.Google Scholar
  13. [13]
    Hermenegildo, M. V. An Abstract Machine for Restricted AND-Parallel Execution of Logic Programs Proc. of the 3rd Inter. Conf. on Logic Programming (July, 1986)Google Scholar
  14. [14]
    Warren, D. H. D. The SRI Model for Or-parallel Execution of Prolog—Abstract Design and Implementation Issues Proc. of the 1987 Inte. Symposium on Logic Programming, San Francisco, California, IEEE, pp.92–102, 1987.Google Scholar
  15. [15]
    Hausman, B., Ciepielewski, A. and Haridi, S. Or-parallel Prolog made efficient on shared memory multiprocessors Proc. of the 1987 Inte. Symposium on Logic Programming, San Francisco, California, IEEE, pp.69–79, 1987.Google Scholar
  16. [16]
    Gao, Yaoqin and Hu, Shouren Design of a Parallel Abstract Machine based on the RAP-PSOF Parallel Model of Logic Programs to appear in Proc. of International Conference on Computer and Communication, Beijing, 1989.Google Scholar
  17. [17]
    Sun, Chengzheng and Ci, Yungui The OR-forest Description for the Execution of Logic Programs Lecture Notes in Computer Science, the Proc. of the Third International Conference on Logic Programming (July, 1986), pp.710–717.Google Scholar
  18. [18]
    Sun, Chengzheng and Ci, Yungui PSOF: A Process Model Based on the OR-forest Description Proc. of the International Conference on Computer and Communication, 1986, Beijing.Google Scholar
  19. [19]
    Sun, Chengzheng and Ci, Yungui SES-PIM: A Simulation and Experiment System for PIM-PSOF the Second National Conference on Logic Programming, 1986, China.Google Scholar
  20. [20]
    Sun, Chengzheng and Ci, Yungui An Automatic Partition Algorithm for And-parallel Execution in the Framework of OR-forest Proc. of the Second International Conference on Computers and Applications, 1987, Beijing.Google Scholar
  21. [21]
    Hwang, Zhiyi and Hu, Shouren A Compiling Approach for Exploiting And-Parallelism in Logic programming Proc. of the 1988 Annual Conference of National Artificial Intelligence Federation, 1988, China.Google Scholar
  22. [22]
    Hwang, Zhiyi and Hu, Shouren Analysis of RAP the Third National Conference on Logic Programming, 1987, China.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Zhiyi Hwang
    • 1
  • Shouren Hu
    • 1
  1. 1.Department of Computer ScienceChangsha Institute of TechnologyChangshaP. R. China

Personalised recommendations