Skip to main content
Log in

Compiling OR-parallelism into AND-parallelism

  • Special Issue
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

This paper suggests a general method for compiling OR-parallelism into AND-parallelism. An interpreter for an AND/OR-parallel language written in the AND-parallel subset of the language induces a source-to-source transformation from the full language into the AND-parallel subset. This transformation can be identified and implemented as a special purpose compiler or applied using a general purpose partial evaluator.

The method is demonstrated to compile a variant of Concurrent Prolog into an AND-parallel subset of the language called Flat Concurrent Prolog (FCP). It is also shown applicable to the compilation of OR-parallel Prolog to FCP. The transformation identified is simple and efficient. The performance of the method is discussed in the context of programming examples. These compare well with conventionally compiled Prolog programs.

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. Bloch, C., “Source-to-Source Transformation of Logic Programs,”Weizmann Institute Technical Report CS84-22, 1984.

  2. Clark, K. L. and Gregory, S., “PARLOG: Parallel Programming in Logic,”Research Report DOC 84/4, April, 1984.

  3. Codish, M., “Compiling OR-Parallelism to AND-Parallelism,”Masters Thesis, Weizmann Institute of Science.

  4. Futamura, Y., “Partial Evaluation of Computation Process—An Approach to a Compiler-Compiler,”Systems, Computers, Controls, Vol.2, No. 5, pp. 721–728, 1971.

    Google Scholar 

  5. Gregory, S., “Design, Application and Implementation of a Parallel Logic Programming Language,”Phd. Thesis, Imperial College of Science and Technology, 1985.

  6. Jones, N. D., Sestoft, P. and Sondergaard, H.,An Experiment in Partial Evaluation: The Generation of a Compiler Generator, Insitute of Datalogy, University of Copenhagen, Denmark, 1985.

    Google Scholar 

  7. Kahn, K., “The Compilation of Prolog Programs Without the Use of a Prolog Compiler,”UPMAIL, The Dept. of Computing Science, Uppsala University, 1984.

  8. Levi, J., “A GHC Abstract Machine and Instruction Set,”Proceedings of 3rd ICLP, 1986.

  9. Mierowsky, C., Taylor, S., Shapiro, E., Levy, J. and Safra, M., “The Design and Implementation of Flat Concurrent Prolog,”Weizmann Institute Technical Report CS85-09, 1985.

  10. Miyazaki, T., Takeuchi, A. and Chikayama, T., “A Sequential Implementation of Concurrent Prolog Based on the Shallow Binding Scheme,”1985 Symposium on Logic Programming, IEEE Computer Society, pp. 110–118, 1985.

  11. Quintus Prolog Reference Manual, Quintus Computer Systems Inc., 1985.

  12. Safra, S., “Partial Evaluation of Concurrent Prolog,”Weizmann Institute Tech. Report, 1986.

  13. Taylor, S., Safra, S. and Shapiro, E., “Distributed Execution of Flat Concurrent Prolog,”Unpublished Note, 1985,International Journal of Parallel Processing, No. 3, in press.

  14. Saraswat, V. A., “Problems with Concurrent Prolog,”Unpublished Note.

  15. Shapiro, E., “A Subset of Concurrent Prolog and Its Interpreter,”ICOT Technical Report TR-003, February, 1983.

  16. Shapiro, E., “Concurrent Prolog: A Progress Report,”IEEE Computer, pp. 44–58, 1986 B.

  17. Silverman, W., Houri, A. and Hirsch, M.,Logix User Manual, Release 1.1, Weizmann Institute of Science, 1985.

  18. Takeuchi, A., “How to Solve It in Concurrent Prolog,”Unpublished Note, 1983.

  19. Takeuchi, A. and Furukawa, K., “Partial Evaluation of Prolog Programs and Its Application to Meta Programming,”ICOT Technical Report TR-126, 1985.

  20. Ueda, K., “Guarded Horn Clauses,”ICOT Technical Reort TR-103, 1985.

  21. Ueda, K., “Concurrent Prolog re-examined,”ICOT Technical Report, TR-102.

Download references

Author information

Authors and Affiliations

Authors

About this article

Cite this article

Codish, M., Shapiro, E. Compiling OR-parallelism into AND-parallelism. New Gener Comput 5, 45–61 (1987). https://doi.org/10.1007/BF03037457

Download citation

  • Received:

  • Issue Date:

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

Keywords

Navigation