## The Call-by-Need Lambda Calculus (1994)

Venue: | Journal of Functional Programming |

Citations: | 45 - 2 self |

### BibTeX

@ARTICLE{Maraist94thecall-by-need,

author = {John Maraist and Martin Odersky and Philip Wadler},

title = {The Call-by-Need Lambda Calculus},

journal = {Journal of Functional Programming},

year = {1994},

volume = {8},

pages = {275--317}

}

### Years of Citing Articles

### OpenURL

### Abstract

We present a calculus that captures the operational semantics of call-by-need. The call-by-need lambda calculus is confluent, has a notion of standard reduction, and entails the same observational equivalence relation as the call-by-name calculus. The system can be formulated with or without explicit let bindings, admits useful notions of marking and developments, and has a straightforward operational interpretation. Introduction The correspondence between call-by-value lambda calculi and strict functional languages (such as the pure subset of Standard ML) is quite good; the correspondence between callby -name lambda calculi and lazy functional languages (such as Miranda or Haskell) is not so good. Call-by-name re-evaluates an argument each time it is used, a prohibitive expense. Thus, many lazy languages are implemented using the call-by-need mechanism proposed by Wadsworth (1971), which overwrites an argument with its value the first time it is evaluated, avoiding the need for any s...

### Citations

669 | Light linear logic - Girard - 1998 |

410 | Explicit substitutions
- Abadi, Cardelli, et al.
- 1991
(Show Context)
Citation Context ...uction rules is more appropriate. On call-by-need and explicit substitutions. At first glance the call-by-need system seems to be little aside from yet one more formulation of explicit substitutions (=-=Abadi et al., 1990, for exam-=-ple). However, the assumptions made by explicit substitution schemes regarding what the "expensive" operation is in reduction are different. Explicit substitution schemes track substitutions... |

341 |
The calculi of lambda conversion
- Church
- 1941
(Show Context)
Citation Context ...ations, abstractions and variables. A context C[ ] is a term with a single hole [ ] in it. By C[M ] we denote the term that results from replacing the hole in C[ ] with M . The call-by-name calculus (=-=Church, 1941-=-) consists of a single reduction rule, fi, which describes the simplification of the application of an abstraction to an arbitrary argument. We define the reduction relation \Gamma\Gamma\Gamma! (fi) t... |

296 |
The Lambda Calculus: Its Syntax and Semantics. Volume 103
- Barendregt
- 1984
(Show Context)
Citation Context ...end in the same term: M 0 \Gamma\Gamma\Gamma! cpl y u u : Since developments coincide with (fi 0 )-reduction, which is strongly normalising and confluent, we have the following result: Proposition 1 (=-=Barendregt, 1981-=-, Theorem 11.2.25) All call-by-name developments are finite, all can be extended to a complete development, and all complete developments with the same origin end in the same term. 2 The call-by-need ... |

198 | A natural semantics for lazy evaluation
- Launchbury
- 1993
(Show Context)
Citation Context ...a let-binding in the term under examination. Most other formalisations of call-by-need, including the representation of terms for the STG machine (Peyton Jones, 1992), Launchbury's natural semantics (=-=Launchbury, 1993-=-), and our earlier work on the subject with Ariola and Felleisen (1995), restrict constructor subcomponents to either variables or values, and copy the subcomponents in the rule analogous to (V K ). I... |

193 | Parameter-passing and the lambda calculus
- Crank, Felleisen
- 1991
(Show Context)
Citation Context ...ofs. An advantage of Launchbury's semantics over ours is that his copes more neatly with recursion, by the use of multiple, recursive let bindings. An extension of our semantics to include recursion (=-=Ariola and Felleisen, 1994-=-, for example) would lose the ordering property of the heap, and hence lose the close connection to standard reductions (Mossin et al., 1995). We discuss other extensions for recursion below. 6 Call-b... |

129 | Efficient compilation of lazy evaluation
- Johnsson
- 1984
(Show Context)
Citation Context ... the call-by-need mechanism proposed by Wadsworth (1971), which overwrites an argument with its value the first time it is evaluated, avoiding the need for any subsequent re-evaluation (Turner, 1979; =-=Johnsson, 1984-=-; Koopman and Lee, 1989; Peyton Jones, 1992). Call-by-need reduction implements the observational behaviour of call-by-name in a way that requires no more substitution steps than call-by-value reducti... |

127 | An algorithm for optimal lambda calculus reduction
- Lamping
- 1990
(Show Context)
Citation Context ...tion implementations, and we do not view this effect as a shortcoming. Sharing of subterms across different instantiations of bound variables is addressed by optimal reduction strategies (Levy, 1980; =-=Lamping, 1990-=-; Field, 1990; Abadi et al., 1990; Maranget, 1991). Although the additional sharing of those calculi does allow the fewest possible reduction steps, it is not clear how useful optimal reduction is for... |

88 |
Optimal reductions in the lambda calculus, in To H
- Levy
- 1980
(Show Context)
Citation Context ... graph reduction implementations, and we do not view this effect as a shortcoming. Sharing of subterms across different instantiations of bound variables is addressed by optimal reduction strategies (=-=Levy, 1980-=-; Lamping, 1990; Field, 1990; Abadi et al., 1990; Maranget, 1991). Although the additional sharing of those calculi does allow the fewest possible reduction steps, it is not clear how useful optimal r... |

69 | Semantics of weakening and contraction - Jacobs - 1992 |

61 |
The design and implementation of programming languages
- Hughes
(Show Context)
Citation Context ...ew the conversion of M to N as appropriate to a transformation carried out before program execution. In particular, the full laziness transformation enables sharing of such subterms (Wadsworth, 1971; =-=Hughes, 1983-=-). Even after a full laziness pass, we would still copy the non-value (f y y): let f = M 0 in let x = (y:f y y) in C[x] ! let f = M 0 in let x = (y:f y y) in C[y:f y y] : Such expressions are indeed c... |

46 |
On laziness and optimality in lambda interpreters: Tools for specification and analysis
- Field
- 1990
(Show Context)
Citation Context ...tions, and we do not view this effect as a shortcoming. Sharing of subterms across different instantiations of bound variables is addressed by optimal reduction strategies (Levy, 1980; Lamping, 1990; =-=Field, 1990-=-; Abadi et al., 1990; Maranget, 1991). Although the additional sharing of those calculi does allow the fewest possible reduction steps, it is not clear how useful optimal reduction is for compilation ... |

38 | Cyclic lambda calculi - Ariola, Blom - 1997 |

35 | Cyclic lambda graph rewriting - Ariola, Klop - 1994 |

27 | Modeling Sharing and Recursion for Weak Reduction Strategies using Explicit Substitution - Benaissa, Lescanne, et al. - 1996 |

13 | The semantics of lazy functional languages - Josephs - 1989 |

3 | The Geometry of Implementation. Doctoral Thesis - Mackie - 1994 |

2 |
The Lazy Lambda Calculus, chapter 4, pages 65--116. The UT Year of Programming Series
- Abramsky
- 1990
(Show Context)
Citation Context ... is also adequate (fully-abstract) fors` need , since the observational equivalence theories of both calculi are the same. For instance, Abramsky and Ong's adequate model of the lazy lambda calculus (=-=Abramsky, 1990-=-) is also adequate fors` need . 7 Extensions The formulation of call-by-need we have reviewed is rather basic, and lacks a number of common syntactic conveniences, which we consider now. In Section 7.... |

1 | DILL --- dual intuitionistic linear logic. Draft paper, available from the author - Barber - 1995 |

1 | private communication of unpublished result attributed to Stefan Blom and Zena - Rose - 1997 |

1 |
A fresh look at combinator graph reduction
- Lee
- 1989
(Show Context)
Citation Context ...proposed by Wadsworth (1971), which overwrites an argument with its value the first time it is evaluated, avoiding the need for any subsequent re-evaluation (Turner, 1979; Johnsson, 1984; Koopman and =-=Lee, 1989-=-; Peyton Jones, 1992). Call-by-need reduction implements the observational behaviour of call-by-name in a way that requires no more substitution steps than call-by-value reduction. It seems to give us... |