## Lambda Lifting: Transforming Programs to Recursive Equations (1985)

Citations: | 179 - 4 self |

### BibTeX

@INPROCEEDINGS{Johnsson85lambdalifting:,

author = {Thomas Johnsson},

title = {Lambda Lifting: Transforming Programs to Recursive Equations},

booktitle = {},

year = {1985},

pages = {190--203},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

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. An attribute grammar and a functional program implementing the chosen algorithm is given. Originally publised in Proceedings 1985 Conference on Functional Programming Languages and Computer Architecture, Lecture Notes in Computer Science 201, Nancy, France, 1985. Springer Verlag. y As part B of author's thesis. Main addition: the attribute grammar formulation. 1 Introduction When compiling a lazy functional language using the technique described in [Joh84] it is presumed that the input program is in the form of a set of function definitions, possibly mutually recursive, tog...

### Citations

191 |
A new implementation technique for applicative languages
- Turner
- 1979
(Show Context)
Citation Context ...nd recursive definitions (let and letrec) , both in defining their meaning and in implementations, is to treat them as syntactic sugaring for lambda expressions and the fix-point combinator Y [Lan66] =-=[Tur79]-=- [Hug82]. The following two transformation rules are then used. let x = e 1 in e 2 ) (x:e 2 )e 1 letrec x = e 1 in e 2 ) let x = Y (x:e 1 ) in e 2 The resulting expression contains lambda expressions ... |

179 |
The next 700 programming languages
- Landin
- 1966
(Show Context)
Citation Context ...ursive and recursive definitions (let and letrec) , both in defining their meaning and in implementations, is to treat them as syntactic sugaring for lambda expressions and the fix-point combinator Y =-=[Lan66]-=- [Tur79] [Hug82]. The following two transformation rules are then used. let x = e 1 in e 2 ) (x:e 2 )e 1 letrec x = e 1 in e 2 ) let x = Y (x:e 1 ) in e 2 The resulting expression contains lambda expr... |

122 | Efficient compilation of lazy evaluation
- Johnsson
- 1984
(Show Context)
Citation Context ...nce, 1985. Springer Verlag. y As part B of author's thesis. Main addition: the attribute grammar formulation. 1 Introduction When compiling a lazy functional language using the technique described in =-=[Joh84]-=- it is presumed that the input program is in the form of a set of function definitions, possibly mutually recursive, together with an expression to be evaluated and printed as the value of the program... |

87 | A compiler for lazy ML - Augustsson - 1984 |

81 | Compiling pattern matching - Augustsson - 1985 |

79 |
Using circular programs to eliminate multiple traversals of data
- Bird
- 1984
(Show Context)
Citation Context ...and Ld uses it to compute the first and second component of the tuple. Circular programs such as this one requires lazy evaluation to work. A discussion of such programming techniques can be found in =-=[Bir84]-=- and in [Joh87]. BsLambdalift expr = let Xset sol s z = itlist(f.p.U (assocdef f sol []) p) s z in letrec solve [] = [] k solve ((f,s,e).[]) = [(f,s)] k solve ((f,s,e).l) = let so = solve(map(t.let (f... |

74 | Attribute grammars as a functional programming paradigm
- Johnsson
- 1987
(Show Context)
Citation Context ...previous section. This attribute grammar is then translated into a functional program evaluating the attributes. A further discussion of attribute grammar based functional programming can be found in =-=[Joh87]-=-. An attribute grammar can be thought of as a decoration of the parse tree with namevalue pairs. Normally, the parse tree has been constructed (implicitly or explicitly) during parsing of the input st... |

46 |
The Design and Analysis of Algorithms
- Aho, Hopcroft, et al.
- 1974
(Show Context)
Citation Context ... Then each E f is obtained by E f = [ g2X S g where X = fh j fC hg and S g is the set of free variables in the function g. The best time complexity known for the transitive closure problem is O(n 3 ) =-=[AHU76]-=- and that will also be the worst case complexity of our lambda lifting algorithm (n is the number of functions in the program) if all the equations for all the functions in the program are solved in o... |

6 |
Super Combinators---A New Implementation Method for Applicative Languages
- Hughes
- 1982
(Show Context)
Citation Context ...sive definitions (let and letrec) , both in defining their meaning and in implementations, is to treat them as syntactic sugaring for lambda expressions and the fix-point combinator Y [Lan66] [Tur79] =-=[Hug82]-=-. The following two transformation rules are then used. let x = e 1 in e 2 ) (x:e 2 )e 1 letrec x = e 1 in e 2 ) let x = Y (x:e 1 ) in e 2 The resulting expression contains lambda expressions in place... |