Abstract
We present a parallelizing compiler for lazy functional programs that uses strictness analysis to detect the implicit parallelism within programs. It generates an intermediate functional program, where a special syntactic construct ‘letpar’, which is semantically equivalent to the well-known let-construct, is used to indicate subexpressions for which a parallel execution is allowed. Only for sufficiently complex expressions a parallelization will be worthwhile. For small expressions the communication overhead may outweigh the benefits of the parallel execution. Therefore, the parallelizing compiler uses some heuristics to estimate the complexity of expressions.
The distributed implementation of parallelized functional programs described in [Loogen et al. 89] enabled us to investigate the impact of various parallelization strategies on the runtimes and speedups. The strategy, which only allows the parallel execution of non-predefined function calls in strict positions, shows the best runtimes and reasonable speedup results.
Chapter PDF
Similar content being viewed by others
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.
References
S.Abramsky: Strictness Analysis and Polymorphic Invariance, Workshop on Programs as Data Objects, LNCS 217, Springer Verlag 1985.
S.Abramsky, C.Hankin (eds.): Abstract Interpretation of Declarative Languages, Ellis Horwood Limited 1987.
G.Burn, C.L.Hankin, S.Abramsky: Strictness Analysis for Higher-Order Functions, Science of Computer Programming, Vol.7, November 1986.
G.Burn: Evaluation Transformers — A Model for the Parallel Evaluation of Functional Languages, Conf. on Functional Progr. Lang. and Computer Architecture, LNCS 274, Springer Verlag 1987.
G.Burn: Abstract Interpretation and the Parallel Evaluation of Functional Languages, Ph.D. Thesis, Imperial College, London 1987.
G.Burn: A shared memory parallel G-machine based on the evaluation transformer model of computation, Workshop on the Impl. of Lazy Functional Languages, Report 53, Programming Methodology Group, Chalmers University of Technology, Göteborg 1988.
C.Clack, S.Peyton-Jones: Strictness Analysis — A Practical Approach, Conf. on Functional Progr. Languages and Computer Architecture, LNCS 201, Springer Verlag 1985.
M.C.J.D.van Eekelen, M.J.Plasmeijer, J.E.W.Smeetsers: Parallel Graph Rewriting on Loosely Coupled Machine Architectures, Technical Report 88-9, University of Nijmegen 1988.
K.Hammond, S.Peyton-Jones: Some Early Experiments on the GRIP Parallel Reducer, Workshop on the Impl. of Functional Languages on Parallel Architectures, Technical Report no. 90-16, University of Nijmegen 1990.
P.Hartel, H.Glaser, J.Wild: On the Benefits of Different Analyses in the Compilation of Lazy Functional Languages, Workshop on the Parallel Impl. of Functional Languages, Technical Report CSTR 91-7, University of Southampton 1991.
G.Hogen: Integration of the Evaluator Technique in the Parallel Abstract Machine PAM, Diploma Thesis, RWTH Aachen 1991 (in german).
P.Hudak: Para-functional programming, a paradigm for programming multiprocessor systems, ACM Symp. on Principles of Progr. Languages 1986.
P.Hudak, B.Goldberg: Serial Combinators: Optimal Grains of Parallelism, Conf. on Functional Progr. Languages and Computer Architecture, LNCS 201, Springer Verlag 1985.
P.Hudak, B.Goldberg: Efficient Distributed Evaluation of Functional Programs Using Serial Combinators, IEEE Transactions on Computers, Vol. C-34, No. 10, October 85.
P.Hudak, J.Young: Higher Order Strictness Analysis in Untyped Lambda Calculus, ACM Symp. on Principles of Progr. Languages, POPL 1986.
J.Hughes: Compile-time analysis of functional programs, in Turner (ed.): Research Topics in Functional Programming, Addison-Wesley 1990.
Th.Johnsson: Lambda Lifting, Conf. on Functional Progr. Languages and Computer Architectures 1985, LNCS 201, Springer Verlag 1985.
A.Kindler: Automatic Parallelization of Functional Programs, Diploma Thesis, RWTH Aachen 1991 (in german).
H. Kuchen, A. Wagener: Comparison of Dynamic Load Balancing Strategies, Workshop on Distributed and Parallel Processing, Sofia 1990, Elsevier Publishers 1990.
D.Lester, G.Burn: An Executable Specification of the HDG-Machine, Technical Report, GEC Research Centre, East Lane, Wembley, Middlesex HA9 7PP, United Kingdom.
R.Loogen, H.Kuchen, K.Indermark, W.Damm: Distributed Implementation of Programmed Graph Reduction, Conf. on Parallel Architectures and Languages Europe 1989, LNCS 365, Springer Verlag 1989.
C.Martin, C.Hankin: Finding Fixed Points in Finite Lattices, Conf. on Functional Progr. Languages and Computer Architecture, LNCS 274, Springer Verlag 1987.
D.Maurer: Strictness Computations Using Special λ-expressions, Workshop on Programs as Data Objects, LNCS 217, Springer Verlag 1985.
D.McBurney, R.Sleep: Concurrent Clean on ZAPP, Workshop on the Impl. of Functional Lang. on Parallel Architectures, Technical Report no. 90-16, University of Nijmegen 1990.
A.Mycroft: Abstract Interpretation and Optimizing Transformations for Applicative Programs, Ph.D. Thesis, University of Edinburgh, 1981.
E.Nöcker: Strictness Analysis Using Abstract Reduction, Workshop on the Impl. of Functional Languages on Parallel Architectures, Technical Report no. 90-16, University of Nijmegen 1990.
M.Raber, Th.Remmel, E.Hoffmann, D.Maurer, F.Müller, H.-G.Oberhauser, R.Wilhelm: Compiled Graph Reduction on a Processor Network, GI/ITG Tagung, Paderborn, Informatik Fachberichte, Springer Verlag 1988.
J.Vrancken: Reflections on Parallel Functional Languages, Workshop on the Impl. of Functional Lang. on Parallel Architectures, Technical Report no. 90-16, University of Nijmegen 1990.
P.Wadler: Strictness analysis on non-flat domains (by Abstract interpretation over finite domains), in: [Abramsky, Hankin 87].
P.Wadler, J.Hughes: Projections for Strictness Analysis, Conf. on Functional Progr. Languages and Computer Architecture, LNCS 274, Springer Verlag 1987.
J.Young, P.Hudak: Finding Fixpoints on Function Spaces, Research Report YALEU/DCS/RR-505, Yale University, December 1986.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hogen, G., Kindler, A., Loogen, R. (1992). Automatic parallelization of lazy functional programs. In: Krieg-Brückner, B. (eds) ESOP '92. ESOP 1992. Lecture Notes in Computer Science, vol 582. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55253-7_15
Download citation
DOI: https://doi.org/10.1007/3-540-55253-7_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55253-6
Online ISBN: 978-3-540-46803-5
eBook Packages: Springer Book Archive