Lambda lifting: Transforming programs to recursive equations
Lambda lifting is a technique for transforming a functional program with local function definitions, possibly with free variables in the function definitions, into a program consisting only of global function (combinator) definitions which will be used as rewrite rules. Different ways of doing lambda lifting are presented, as well as reasons for rejecting or selecting the method used in our Lazy ML compiler. A functional program implementing the chosen algorithm is given.
Unable to display preview. Download preview PDF.
- [Aho76]A. V. Aho, J. E. Hopcroft, and J. D. Ullman, The design and Analysis of Algorithms, Addison-Wesley, Reading, Mass. (1976).Google Scholar
- [Augu84]L. Augustsson, "A Compiler for Lazy ML", pp. 218–227 in Proceedings of the 1984 ACM Symposium on Lisp and Functional Programming, Austin (August 1984).Google Scholar
- [Augu85]L. Augustsson, "Compiling Pattern Matching" in Proceedings 1985 Conference on Functional Programming Languages and Computer Architecture, Nancy, France (September 1985).Google Scholar
- [Bird84]R. S. Bird, "Using Circular Programs to Eliminate Multiple Traverals of Data", Acta Informatica, Vol. 21, pp. 239–250 (1984).Google Scholar
- [Hugh82]J. Hughes, "Super Combinators — A New Implementation Method for Applicative Languages", pp. 1–10 in Proceedings of the 1982 ACM Symposium on Lisp and Functional Programming, Pittsburgh (1982).Google Scholar
- [John84]T. Johnsson, "Efficient Compilation of Lazy Evaluation", pp. 58–69 in Proceedings of the SIGPLAN '84 Symposium on Compiler Construction, Montreal (June 1984).Google Scholar
- [Land66]P. J. Landin, "The Next 700 Programming Languages", Communications of the ACM, Vol. 9 no. 3, pp. 157–164 (March 1966).Google Scholar
- [Turn79]D. A. Turner, "A New Implementation Technique for Applicative Languages", Software — Practice and Experience, Vol. 9, pp. 31–49 (1979).Google Scholar