Abstract
We describe the compiler analyses of Reform Prolog and evaluate their effectiveness in eliminating suspension and locking on a range of benchmarks. The results of the analysis may also be used to extract non-strict independent and-parallelism.
We find that 90% of the predicate arguments are ground or local, and that 95% of the predicate arguments do not require suspension code. Hence, very few suspension operations need to be generated to maintain sequential semantics. The compiler can also remove unnecessary locking of local data by locking only updates to shared data; however, even though locking writes are reduced to 52% of the unoptimized number for our benchmark set, this has little effect on execution times. We find that the ineffectiveness of locking elimination is due to the relative rarity of locking writes, and the execution model of Reform Prolog, which results in few invalidations of shared cache lines when such writes occur.
The benchmarks are evaluated on a cache-coherent KSR-1 multiprocessor with physically distributed memory, using up to 48 processors. Speedups scale from previous results on smaller, bus-based multiprocessors, and previous low parallelization overheads are retained.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Download to read the full chapter text
Chapter PDF
References
J. Bevemyr, A Recursion Parallel Prolog Engine, Licentiate of Philosophy Thesis, Uppsala Theses in Computer Science 16/93, Uppsala University, 1993.
J. Bevemyr, T. Lindgren & H. Millroth, Exploiting recursion-parallelism in Prolog, Int. Conf. PARLE-93 (eds. A. Bode, M. Reeve & G. Wolf), Springer LNCS 694, Springer-Verlag, 1993.
J. Bevemyr, T. Lindgren & H. Millroth, Reform Prolog: The language and its implementation, Proc. 10th Int. Conf. Logic Programming, MIT Press, 1993.
J.-H. Chang, High performance execution of Prolog programs based on a static dependency analysis, Ph.D. Thesis, UCB/CSD 86/263, Univ. Calif. Berkeley, 1986.
M. Codish, A. Mulkers, M. Bruynooghe, M. Garcia de la Banda & M. Hermenegildo, Improving abstract interpretations by combining domains, Proc. 1993 Symp. Partial Evaluation and Program Manipulation, ACM Press, 1993.
P. Cousot & R. Cousot, Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints, Proc. 4th ACM Symp. Principles of Programming Languages, ACM Press, 1977.
S.K. Debray, Static inference of modes and data dependencies in logic programs, ACM Trans. Programming Languages and Systems, Vol. 11, No. 3, pp. 418–450, July 1989.
S.K. Debray, Efficient dataflow analysis of logic programs, J. ACM, Vol. 39, No. 4, October 1992.
S.K. Debray & D.S. Warren, Automatic mode inference for logic programs, J. Logic Programming, Vol. 5, No. 3, 1988.
M.A. Friedman, A characterization of Prolog execution, Ph.D. Thesis, University of Wisconsin at Madison, 1992.
T.W. Gentzinger, Abstract interpretation for the compile-time optimization of logic programs, Ph.D. Thesis, University of South California, Report 93/09, 1993.
M.V. Hermenegildo & F. Rossi, Non-strict independent and-parallelism, Proc. 7th Int. Conf. Logic Programming, MIT Press, 1990.
N. Jones & H. SØndergaard, A semantics-based framework for the abstract interpretation of Prolog, report 86/14, University of Copenhagen, 1986.
H. Millroth, Reforming compilation of logic programs, Proc. 1991 Int. Symp. Logic Programming, MIT Press, 1991.
H. Millroth, SLDR-resolution: parallelizing structural recursion in logic programs, J. Logic Programming, to appear.
L. Naish, Parallelizing NU-Prolog, Proc. 5th Int. Conf. Symp. Logic Programming, MIT Press, 1988.
T. Lindgren, The compilation and execution of recursion-parallel Prolog on shared-memory multiprocessors, Licentiate of Philosophy Thesis, Uppsala Theses in Computer Science 18/93, November 1993.
D.A. Patterson & J.L. Hennessy, Computer Organization & Design: The Hardware/Software Interface, Morgan Kaufmann Publ., 1993.
E. Tick, Memory-and buffer-referencing characteristics of a WAM-based Prolog, J. Logic Programming, Vol. 11, pp. 133–162, 1991.
P. Van Roy, A. Despain, The benefits of global dataflow analysis for an optimizing Prolog compiler, Proc. 1990 North Am. Conf. Logic Programming, MIT Press, 1990.
D.H.D. Warren, An Abstract Prolog Instruction Set, SRI Tech. Note 309, SRI International, Menlo Park, Calif., USA, 1983.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lindgren, T., Bevemyr, J., Millroth, H. (1995). Compiler optimizations in Reform Prolog: Experiments on the KSR-1 multiprocessor. In: Haridi, S., Ali, K., Magnusson, P. (eds) EURO-PAR '95 Parallel Processing. Euro-Par 1995. Lecture Notes in Computer Science, vol 966. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0020492
Download citation
DOI: https://doi.org/10.1007/BFb0020492
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60247-7
Online ISBN: 978-3-540-44769-6
eBook Packages: Springer Book Archive