Hostname: page-component-78c5997874-94fs2 Total loading time: 0 Render date: 2024-11-12T00:09:22.492Z Has data issue: false hasContentIssue false

Continuation-based compilation of functional languages for parallel machines

Published online by Cambridge University Press:  04 March 2009

J.-F. Giorgi
Affiliation:
IRISA/INRIA, Campus de Beaulieu, 35042 Rennes Cedex, France. giorgi@irisa.fr, lemetayer@irisa.fr
D. Le Métayer
Affiliation:
IRISA/INRIA, Campus de Beaulieu, 35042 Rennes Cedex, France. giorgi@irisa.fr, lemetayer@irisa.fr

Abstract

We tackle the problems of correctness and efficiency of paralled implementations of functional languages. We present a compilation technique described in terms of program transformations in the functional framework. The original functional expression is transformed into a functional term, which can be seen as traditional machine code. The main feature of the parallel implementation is the use of continuations. We introduce a parallel abstract machine describing lazy task creation in terms of exportation of continuations. The advantages of the approach are twofold: (1)correetness proofs are made simpler and (2) the implementation is efficient because the use of continuations reduces the task management overhead.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1992

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

REFERENCES

Appel, A. W. and Jim, T. (1989) Continuation-passing, closure-passing style. Proc. POPL 293302.CrossRefGoogle Scholar
Augustsson, L. and Johnsson, T. (1989) Paralled graph reduction with the <v, G>-machine. Proc.Conf. on Functional programming and Computer Architecture 203213.-machine.+Proc.Conf.+on+Functional+programming+and+Computer+Architecture203–213.>Google Scholar
Banâtre, J.-P. and Le Métayer, D. (1991) Programming by multiset transformation. Communication of the ACM (to appear).Google Scholar
Berry, G. and Boudol, G. (1990) The chemical abstract machine. Proc POPL 8194.CrossRefGoogle Scholar
Bush, V. J. and Gurd, J. R. (1985) Transforming recursive programs for execution on parallel machines. Conference on Functional Programming and Computer Architecture. Springer Verlag LNCS 201 350367.Google Scholar
Fradet, P. and Le Métayer, D. (1991) Compilation of functional languages by program transformation. ACM Transactions on Programming Languages and Systems 13(1) 2151.CrossRefGoogle Scholar
Goldberg, B. F. (1988) Multiprocessor execution of functional programs. PhD thesis, Graduate School of Yale University. Yale Research Report RR-618.CrossRefGoogle Scholar
Harrison, P. G. and Reeve, M. J. (1986) The parallel graph reduction machine, ALICE. Proc. on Graph Redution Workshop. Springer Verlag LNCS 279 181202.Google Scholar
Hertzberger, L. O. and Vree, W. G. (1989) A coarse grain parallel architecture for functional languages. Proc. PARLE '89. springer Verlag LNCS 365 263285.Google Scholar
Hieb, R. and Dybvig, R. K. (1990) Continuations and Concurrency. In: Proc. 2nd ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming 128136.CrossRefGoogle Scholar
Hudak, P. (1986) Para-Functional Programming. Computer 19(8) 6071.CrossRefGoogle Scholar
Huet, G. and Oppen, D. (1980) Equations and rewrite rules: a survey. In: Formal Languages: Perspective and Open Problems, ed. Book, R., Academic Press.Google Scholar
Johnsson, T. (1985) Lambda-lifting – transforming programs to recursive equations. Proc. Conf. on Functional Programming and Computer Architecture. Spinger Verlag LNCS 201 190203.Google Scholar
Kranz, D., Kelsey, R., Rees, J., Hudak, P., Philbin, J. and Adams, N. (1986) ORBIT: An Optimizing Compiler for Scheme. Proc. of the SIGPLAN '86 Symposium on Compiler Construction 219233.Google Scholar
Lemaítre, M., Castan, M., Durand, M. H., Durrieu, G. and Lecussan, B. (1986) Mechanisms for Efficient Multiprocessor Combinator Reduction. Proc. ACM Symp. on Lisp and Functional Programming 113121.CrossRefGoogle Scholar
Mohr, E., Kranz, D. A. and Halstead, R. H. Jr (1990) Lazy Task Creation: A Technique for Increasing the Granulrity of Parallel Programs. Proc. of 1990 ACM Conf. on Lisp and Functional Programming 185197.CrossRefGoogle Scholar
Peyton, Jones S. L. (1989) Parallel implementations of functional programming languages. The Computer journal 32(2) 175186.CrossRefGoogle Scholar
Steele, G. L. Jr (1978) Rabbit: a compiler for Scheme. AI technical report, MIT.Google Scholar
Turner, D. A. (1979) A new implementation tecnique for applicate languages. Software Practice and Experience 9 3149.CrossRefGoogle Scholar
Vegdahl, S. R. (1984) A Survey of Proposed Architecture for the Execution of Functional Languages. IEEE Transactions on computers C–33(12).Google Scholar
Wand, M. (1980) Continuation-Based Multiproceesing. ACM Conf. on Lisp and Functional Programming 1928.Google Scholar
Wand, M. (1982a) Deriving Target Code as a Representations of Continuations Semantics. ACM Transactions on programming Languages and Systems 4(3) 496517.CrossRefGoogle Scholar
Wand, M. (1982b) Semantics-Directed Machine Architecture. Proc. POPL 234241.CrossRefGoogle Scholar
Wand, M. (1983) Loops in Combinator-Based Compilers. Proc. POPL 190196.CrossRefGoogle Scholar