Skip to main content
Log in

OR parallel execution of Prolog programs with side effects

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

With the growing availability of multiprocessors, a great deal of attention has been given to executing Prolog in parallel. A question that naturally arises is how to execute standard sequential Prolog programs with side effects in parallel. The problem of performing side effects in AND parallel systems has been considered elsewhere. This paper presents a method that generates sequential semantics of side effect predicates in an OR parallel system. First, a general method is given for performing data side effects such as read and write. This method is then extended to control side effects such as asserta, assertz, and retract. Finally, a constant-time algorithm for performing cut is presented.

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

  • Apt, K. R., and van Emden, M. H. 1982. Contributions to the theory of logic programming.Journal of the ACM, 29 (3): 841–862.

    Google Scholar 

  • Borgwardt, P. 1984. Parallel Prolog using stack segments on shared-memory multiprocessors. In International Symposium on Logic Programming (Atlantic City, Feb.), IEEE, pp. 2–11.

  • Bruynooghe, M. 1982. The memory management of Prolog implementations. In Logic Programming (K. L. Clark and S. A. Tarnlund, eds.), Academic Press, London, pp. 83–98.

    Google Scholar 

  • Ciepielewski, A., and Haridi, S. 1983. A formal model for the or-parallel parallel execution of logic programs. In Information Processing (R.E.A. Mason, ed.), Eisevier, Amsterdam.

    Google Scholar 

  • Clark, K., and Gregory, S. 1986. PARLOG: Parallel programming in logic.ACM Transactions on Programming Languages and Systems, 8 (1): 1–49.

    Google Scholar 

  • Conery, J. 1987. Binding environments for parallel logic programs in non-shared memory multiprocessors. In Proceedings of the 1987 Symposium on Logic Programming (San Francisco, Aug. 31-Sept. 4), IEEE Computer Society Press, p. 457–467.

  • Courtois, P.J., Heymans, F., and Parnas, D.L. 1971. Concurrent control with readers and writers.Comm. ACM, 14 (10): 667–668.

    Google Scholar 

  • DeGroot, D. 1987. Restricted and-parallelism and side effects. In Proceedings of the 1987 Symposium on Logic Programming (San Francisco, Aug. 31–Sept. 4), IEEE Computer Society Press, pp. 80–89.

  • Harrison, W. L., and Padua, D. A. 1988. PARCEL: Project for the automatic restructuring and concurrent evaluation of lisp. To appear in Proceedings of the 1988 International Conference on Supercomputing (Saint-Malo, France, July 4–8).

  • Hausman, B., Ciepielewski, A., and Haridi, S. 1987. Or-parallel Prolog made efficient on shared memory multiprocessors. In Proceedings of the 1987 Symposium on Logic Programming (San Francisco, Aug. 31–Sept. 4), IEEE Computer Society Press, pp. 69–79.

  • Hoare, C. A. R. 1974. Monitors: An operating systems structuring concept.Comm. ACM, 17(10): 549–557.

    Google Scholar 

  • Kale, L. V., Ramkumar, B., and Shu, W. W. 1988. A memory organisation independent binding environment for AND and OR parallel execution of logic programs. To appear in Proceedings of Joint Fifth International Conference/Symposium on Logic Programming (Seattle, Aug. 15–19), IEEE Computer Society Press.

  • Kuck, D. J., Budnik, P., Chen, S.C., Davis, E. Jr., Han, J., Kraska, P., Lawrie, D. H., Muraoka, Y., Strebendt, R., and Towle, R. 1974. Measurements of parallelism in ordinary FORTRAN programs.IEEE Computer, 7 (1): 37–46.

    Google Scholar 

  • Lindstrom, G. 1984. Or-parallelism on applicative architectures. In Proceedings of the Second International Logic Programming Conference (Uppsala, Sweden, July), Ord & Form, Uppsala, pp. 159–170.

    Google Scholar 

  • Quintus Computer Systems, Inc. 1987. Quintus Prolog Reference Manual.

  • Padua, D. A., and Wolfe, M. J. 1986. Advanced compiler optimizations for supercomputers.Comm. ACM, 29 (12): 1184–1201.

    Google Scholar 

  • Sehr, D. C. 1988. An Or-parallel interpreter for Prolog programs with side effects. Master's thesis in preparation, University of Illinois.

  • Shapiro, E. Y. 1983. A subset of concurrent Prolog and its interpreter. CS83-06, Technical report, Weizmann Institute.

  • Ueda, K. 1985. Guarded Horn Clauses. Technical Report TR-103, ICOT.

  • Warren, D. H. D. 1977. Implementing Prolog—Compiling logic programs, 1 and 2. D.A.I. Research Report, University of Edinburgh.

  • Warren, D. H. D. 1987a. Or-parallel execution models of Prolog. In TAPSOFT'87, Joint Conference on Theory and Practice of Software Development (March).

  • Warren, D. H. D. 1987b. The SRI model for or-parallel execution of Prolog—Abstract design and implementation issues, invited paper. In Proceedings of the 1987 Symposium on Logic Programming (San Francisco, Aug. 31–Sept. 4), IEEE Computer Society Press, pp. 92–102.

  • Warren, D. S. 1984. Efficient Prolog memory management for flexible control strategies. In Proceedings of the 1984 Logic Programming Symposium (Atlantic City), IEEE Computer Society Press, pp. 198–202.

Download references

Author information

Authors and Affiliations

Authors

Additional information

The work of L. V. Kale was supported by the National Science Foundation under Grant NSF-CCR-8700988. The work of D. A. Padua and D. C. Sehr was supported in part by the National Science Foundation under Grant NSF-MIP-8410110, the Department of Energy under Grant DOE DE-FG02-85ER25001, and a donation from the IBM Corporation to the Center for Supercomputing Research and Development. D. C. Sehr holds a fellowship from the Office of Naval Research.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kale, L.V., Padua, D.A. & Sehr, D.C. OR parallel execution of Prolog programs with side effects. J Supercomput 2, 209–223 (1988). https://doi.org/10.1007/BF00128177

Download citation

  • Issue Date:

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

Keywords

Navigation