15-312 Foundations of Programming Languages
Lecture 21: Futures

In this lecture we first discuss the semantics of lazy evaluation. This is a particular implementation strategy for call-by-name function application where the first time the argument is actually needed, its value is cached.

Lazy evaluation is related to the idea of futures which comes from the Multilisp language. Futures constitute a form of explicit parallelism where an expression future(e) spawns the computation of e as a separate thread, but returns immediately with a handle on the value yet to be computed. That handle can be passed around, but if its structure is ever explicitly required we block, waiting for the thread that computes the future to terminate. We sketch a semantics and show some example programs using futures.

[ Home | Schedule | Assignments | Software | Resources ]

Frank Pfenning