Abstract:
Traditional first-class continuation mechanisms allow a captured continuation to be invoked multiple times. Many continuations, however, are invoked only once. This paper introduces one-shot continuations, shows how they interact with traditional multi-shot continuations, and describes a stack-based implementation of control that handles both one-shot and multi-shot continuations. The implementation eliminates the copying overhead for one-shot continuations that is inherent in multi-shot continuations. 1 Introduction Scheme [5] and some implementations of ML [17] provide continuations as first-class data objects. Continuations can be used to implement, at the source level, a number of interesting control features, such as loops, nonlocal exits, nonblind backtracking [22], nondeterministic computations [10, 14], and coroutines [7]. Source-level implementations of thread systems [9, 15, 21], especially in the area of graphical user interfaces (GUIs) [12, 13, 20, 23], are an important ...
Citations
|
1415
|
The Definition of Standard ML
– Milner, Tofte, et al.
- 1990
|
|
197
|
CML: A Higher-Order Concurrent Language
– Reppy
- 1991
|
|
186
|
Standard ML of New Jersey
– Appel, MacQueen
- 1991
|
|
95
|
Performance and Evaluation of LISP Systems
– Gabriel
- 1985
|
|
66
|
Representing control in the presence of first-class continuations
– Hieb, Dybvig, et al.
- 1990
|
|
52
|
Scheme: an interpreter for extended lambda calculus
– Sussman, Steele
- 1975
|
|
47
|
Dybvig. The SCHEME Programming Language
– Kent
- 1987
|
|
45
|
The spineless tagless g-machine
– Jones, Salkild
- 1989
|
|
31
|
Logic continuations
– Haynes
- 1986
|
|
28
|
A Multi-threaded Higher-order User Interface Toolkit
– Gansner, Reppy
- 1993
|
|
27
|
An Empirical and Analytical Study of Stack vs. Heap Cost for Languages with Closures
– Appel, Shao
- 1994
|
|
27
|
Obtaining coroutines with continuations
– Haynes, Friedman, et al.
- 1986
|
|
23
|
Abstracting timed preemption with engines
– Haynes, Friedman
- 1987
|
|
18
|
A Concurrent Window System
– Pike
- 1989
|
|
17
|
Transliterating Prolog into Scheme
– Felleisen
- 1985
|
|
16
|
et al. Revised report on the algorithmic language Scheme
– Clinger, Rees
- 1991
|
|
15
|
Register allocation using lazy saves, eager restores, and greedy shuffling
– Burger, Waddell, et al.
- 1995
|
|
11
|
Dybvig and Robert Hieb. Engines from Continuations
– Kent
- 1989
|
|
9
|
Montage: Breaking windows into small pieces
– Haahr
- 1990
|
|
8
|
Dybvig. An efficient implementation of multiple return values in scheme
– Ashley, Kent
- 1994
|
|
5
|
The spineless tagless G-machine
– Peyton-Jones, Salkild
- 1989
|
|
3
|
The Scheme Widget Library User's
– Waddell
- 1995
|
|
2
|
private communication
– Peyton-Jones
- 1991
|