| Haynes, C. T., and Friedman, D. P. Embedding Continuations in Procedural Objects. ACM Trans. on Prog. Lang. and Syst. 9, 4 (1987), 582-598. |
....is the foundation for the sophisticated exception or conditionhandling systems in languages such as Common Lisp, ML, C , EuLisp, and Dylan. Higher order control operators provide a rich array of control metaphors e.g. coroutines, task scheduling, stream processing, and non blind backtracking [24, 25, 26, 27]. In a quantifiable sense, control operators are expressive [18] Neither purely functional languages nor those augmented with an assignment operator can simulate control actions with local syntactic translations. As can be expected, higher order control operators are even more expressive than ....
....manage and to understand. Too 3 often, a heavy price in terms of excessive bookkeeping code and makeshift modularity is paid. For example, it is difficult to keep multiple uses of control idioms from interfering, or to enforce arbitrary patterns of desired interference. Haynes, Friedman and Wand [25, 26, 27] present several sophisticated examples of programming that addresses the problem of constraining control, but because of its ad hoc nature, and its willing sacrifice of the more powerful raw control operator in favor of one of its constrained uses, more satisfactory techniques are needed. 1.3 ....
[Article contains additional citation context not shown here]
C. T. Haynes and D. P. Friedman. Embedding Continuations in Procedural Objects. ACM Transactions on Programming Languages and Systems, 9(4):245-- 254, 1987. 157
....it may be customized. Because different applications will exercise different operations in different ways, systems which permit customization of these operations on a per application basis offer the promise of greater flexibility and programmability. First class procedures[1, 21] and continuations[13, 28] are two abstractions we have found to be extremely useful in implementing a variety of environment and control operations. Languages such as Scheme[10] or ML[25] have demonstrated that these abstractions are effective building blocks for expressing a number of interesting data, program and ....
....5 provides details of Sting s memory model. Section 6 describes virtual processors, an 2 A continuation is an abstraction of a program point. It is typically represented as a procedure of one argument that defines the remaining computation needed to be performed from the program point it denotes [13]. abstraction that permit significant programmer level control over mapping, scheduling and load balancing of lightweight threads. Section 7 describes abstract physical machines, and Sting s exception handling mechanism. Section 8 provides benchmark results. Conclusions and comparison to related ....
[Article contains additional citation context not shown here]
Christopher Haynes and Daniel Friedman. Embedding Continuations in Procedural Objects. ACM Transactions on Programming Languages and Systems, 9(4):582--598, 1987.
....state is carried with the programs. In Obliq [1] rst class function values (closures) can migrate; closures consist of program code together with an environment that binds variables to values or memory locations [16] In Kali Scheme [2] again, closures can migrate; however, since continuations [8,6] are rst class values, Kali Scheme permits entire processes to migrate autonomously to new hosts. In Telescript [17] functions are not rst class values; however, Telescript provides special operations that permit processes to migrate autonomously. In this paper, we adopt a fairly simple but ....
C. Haynes and D. Friedman. Embedding continuations in procedural objects. ACM Transactions on Programming Languages and Systems, 9:582-598, 1987.
....which reinstall the environment of variables that was active when they were defined, continuations reinstall the rest of the computation which remains to be done when they were defined. Continuations have been proved to be valuable tools in Scheme where they are used to program non local exits [Haynes Friedman 87b] This work has been partially funded by GDR Programmation. y LIX, Ecole Polytechnique, 91128 Palaiseau Cedex, France, Email address: queinnec poly.polytechnique.fr z INRIA Rocquencourt, Domaine de Voluceau, 78153 Le Chesnay Cedex, France, Email address: serpette inria.fr 0 multitasking ....
....Cedex, France, Email address: queinnec poly.polytechnique.fr z INRIA Rocquencourt, Domaine de Voluceau, 78153 Le Chesnay Cedex, France, Email address: serpette inria.fr 0 multitasking [Wand 80] engines [Haynes Friedman 87a] etc. The problem of continuations is that they are too powerful [Haynes Friedman 87b] since they reify [Friedman Wand 84] the whole rest of the computation. To call one of them means losing control since they never return. A partial continuation [Johnson 87] is only a prefix of the computation that remains to be done. A partial continuation is thus a function that returns to ....
Christopher T. Haynes, Daniel P. Friedman, Embedding Continuations in Procedural Objects, ACM TOPLAS, Volume 9, # 4, October 1987, pp 582--598.
....being ideal vehicles within which to express a variety of issues related to concurrency, distribution and communication. Because these languages support the liberal use of abstract data types and structures, first class procedures with well defined encapsulation rules, and first class continuations[13], many concerns in the design of parallel or distributed system can be elegantly defined. However, there has been little effort to investigate the role of these languages and their implementations within such contexts. One obvious way of integrating concurrency into a high level symbolic language ....
....policy manager that implements policy decisions for the virtual processors that execute on P . Virtual processors (VPs) are responsible for managing user created threads, an abstraction of a separate locus of control; threads are represented as a generalized form of one shot continuations[13]. In addition, virtual processors also handle non blocking I O and software interrupts (page faults, thread quantum expiration, etc. Each virtual processor V is closed over a policy manager (TPM) that (a) schedules threads executing within V , b) migrates threads to from other 1 PP PP ....
Christopher Haynes and Daniel Friedman. Embedding Continuations in Procedural Objects. ACM Transactions on Programming Languages and Systems, 9(4):582--598, 1987.
....k. The seemingly redundant additional zero arity lambda expressions and the corresponding invocation on line four are present to ensure that k is invoked to restore the root of the controller before any attempt is made to invoke the controller. 5. Control Filters The Scheme procedure dynamic wind [15, 6] may be used to perform setup and clean up actions on entry to or exit from a given computation, even if exit or entry occurs as the result of a continuation invocation. This procedure accepts three arguments, each of which is a zero arity procedure: entry, body, and exit. In the absence of ....
....number of control points (labels and forks) within the subcontinuation rather than with respect to the total number of frames or words within the subcontinuation. Control filters are implemented straightforwardly using a mechanism similar to that described by Haynes and Friedman for dynamic wind [15]. A list of currently active filters is maintained by the system, and each time a controller is created or reestablished, a pointer to the topmost element of the list of filters is saved with the controller. When a controller is invoked, the elements of the current list above the saved pointer are ....
Haynes, Christopher T. and Friedman, Daniel P. Embedding continuations in procedural objects. ACM Transactions on Programming Languages and Systems, 9, 4 (1987) 582--598.
....at any point in the program causes the program s current context to be replaced by the continuation s context. This ability to substitute the current program context by a previously stored snapshot of a program context is simple and powerful. It allows a wide range of programming paradigms [10, 11, 12, 13] not possible with catch and throw. However, there is no analog to delimiting or handling a control action, as with errorset, or to distinguishing between different varieties of control actions, as with catch. Methods of handling and distinguishing control actions are left to user programs. ....
....be transferred to it after the jump to the first continuation has accomplished its purpose. In the presence of several continuations with their respective quasi handlers, keeping track of the various jump off points and avoiding clashes between them requires sophisticated bookkeeping strategies [5, 12]. It is therefore useful to explore options that tackle this problem without sacrificing the programming power of higherorder control. Here we show that the historical duality of first order throwing and handling is useful even for higher order control. In earlier work [21, 22] we showed that ....
C.T. Haynes and D.P. Friedman. Embedding Continuations in Procedural Objects. ACM Transactions on Programming Languages and Systems, 9(4):245--254, 1987.
....base language in which these abstractions can be easily expressed. High level languages such as Scheme [Clinger and Rees 1991] and ML [Milner et al. 1990] provide support for data abstraction via first class procedures and support for sophisticated control abstraction via first class continuations [Haynes and Friedman 1987]. Because of their generality, procedures and continuations can be used to express operations for parallel and distributed programming. Using them as building blocks for high level concurrent and distributed abstractions avoids the need to define an entirely new language or to introduce ad hoc ....
....that forms an integral part of the language and system environment. Scheme 48 supports concurrency using lightweight, preemptible threads; threads synchronize using locks and condition variables. Scheduling, blocking, and resumption of threads is defined in terms of operations on continuations [Haynes and Friedman 1987]. In Scheme, a continuation is reified as a procedure that, when applied, performs the remaining computation. To resume a blocked thread involves invoking the continuation representing the thread. Context switching is similarly implemented in terms of capture and invocation of continuations. ....
Haynes, C. and Friedman, D. 1987. Embedding continuations in procedural objects. ACM Trans. Program. Lang. Syst. 9, 4, 582--598.
....programming environments. This paper concentrates on the implications of the sting design for building asynchronous concurrency structures, organizing large scale concurrent computations, implementing robust programming environments, and implementing thread controllers using continuations[19, 43]. The paper is structured as follows. In the next section, we give an overview of sting focusing primarily on the structure of the coordination model. Section 3 gives an overview of the thread and virtual processor abstractions. Section 4 presents details of threads, and the thread controller. ....
....determined that their results are unnecessary. Speculative computation using sting, however, will not be able to undo non local side effects induced by useless tasks; the system does not provide a primitive backtracking mechanism. 4 4 Sting does not currently support first class continuations[19] across thread boundaries. Consider the implementation of a wait for one construct. This operator evaluates its list of arguments concurrently, returning the value yielded by the first of its arguments to complete. Thus, if a i yields v in the expression: wait for one a 1 a 2 : a i : ....
Christopher Haynes and Daniel Friedman. Embedding Continuations in Procedural Objects. ACM Transactions on Programming Languages and Systems, 9(4):582--598, 1987.
....object that can be called anywhere in the program, just like any other procedure. When it is invoked, evaluation reinstates the captured context in place of the current one, and fills it with the continuation s argument. It is easy to simulate other non local control actions in terms of K [5, 12, 14, 15, 26]. A K expression can occur anywhere inside a program; thus it can have any type s. Also, the program can invoke the continuation anywhere, but the latter s argument must be of the same type as the K expression. Further, the K subexpression returns a value of the type of the K expression. Given ....
C.T. Haynes and D.P. Friedman. Embedding continuations in procedural objects. ACM Transactions on Programming Languages and Systems, 9(4):245--254, 1987.
....it is known that more complicated control structures such as catch and throw and unwind protect can be implemented using first class continuations. Furthermore, continuations allow us to express more advanced features such as non local jumps, exception handling, backtracking, and co routines [9, 17]. We introduce the notion of first class continuations into object based concurrent computation. Computation in object based concurrent computation models has two dimensions of computation, namely internal computation (execution of methods) and external computation (communication between objects ....
C. T. Haynes and D. P. Friedman. Embedding continuations in procedural objects. ACM Transactions on Programming Languages and Systems, 9(4):582--598, April 1987.
.... dynamic variables (with a construct like dynamic set [34] Due to the purely dynamic nature of the semantics, the presence of mutable dynamic variables offers less parallelism as observed in [30] The interaction of dynamic binding and continuations is however beyond the scope of this paper [19]. 9 Related Work In the conference on the History of Programming Languages, McCarthy [25] relates that they observed the behaviour of dynamic binding on a program with higher order functions. The bug was fixed by introducing the funarg device and the function construct [32] Cartwright [4] ....
....that dynamic binding is a suitable tool to define the semantics of exceptions like notions. Furthermore, we believe that a single framework integrating continuations, side effects, and dynamic binding would help us in proving implementation strategies of fluid let in the presence of continuations [19]. 11 Acknowledgement Many thanks to Daniel Ribbens, Christian Queinnec, and the anonymous referees for their helpful comments. ....
Christopher Haynes and Daniel P. Friedman. Embedding Continuations in Procedural Objects. ACM Transactions on Programming Languages and Systems, 9(4):582--598, 1987.
....after the point. In Scheme, continuations can be obtained explicitly, stored in data structures, and later invoked to return to the computation. First class continuations are particularly useful for implementing coroutines, processes, exception handling mechanisms, and nonblind backtracking [32, 22, 31, 30]. The richness of Scheme is supported only by a small number of core syntactic forms. However, Scheme is not confined by the core forms: additional syntactic forms may be defined using syntactic definitions. Syntactic definitions allow programmers to define new syntactic forms in terms of existing ....
Haynes, C. T., and Friedman, D. P. Embedding continuations in procedural objects. ACM Transactions on Programming Languages and Systems 9, 4 (Oct. 1987), 582--598.
.... (factorial x) evaluate f arg) So, fact 10) is equivalent to (factorial 10) 4 Call with current continuation call cc is a sophisticated control construct that is intended for applications in which some action causes the computation of one process to be suspended and of another resumed [5, 6]. A computation (or continuation) that is suspended by call cc is permanently lost unless it is somehow saved, usually in a global variable. Thus, call cc can be used to implement escape mechanisms (simply do not save the continuation of the process being escaped from) and coroutine operations ....
C. T. Haynes, and D. P. Friedman, "Embedding continuations in procedural objects," ACM Trans. on Prog. Lang. and Sys., Vol. 9, No. 4 (October 1987), pp. 582-598.
.... x) evaluate f arg) So, fact 10) is equivalent to (factorial 10) 4 Call with current continuation call cc is a sophisticated control construct that is intended for applications in which some action causes the computation of one process to be suspended and of another resumed [5, 6]. A computation (or continuation) that is suspended by call cc is permanently lost unless it is somehow saved, usually in a global variable. Thus, call cc can be used to implement escape mechanisms (simply do not save the continuation of the process being escaped from) and coroutine operations 5 ....
C. T. Haynes, and D. P. Friedman, \Embedding continuations in procedural objects," ACM Trans. on Prog. Lang. and Sys., Vol. 9, No. 4 (October 1987), pp. 582-598.
No context found.
Haynes, C. T., and Friedman, D. P. Embedding Continuations in Procedural Objects. ACM Trans. on Prog. Lang. and Syst. 9, 4 (1987), 582-598.
No context found.
Haynes, Christopher T., and Friedman, Daniel P. "Embedding Continuations in Procedural Objects". ACM TOPLAS 9,4 (Oct. 1987),582-598.
No context found.
Haynes, Christopher T., and Friedman, Daniel P. "Embedding Continuations in Procedural Objects". ACM TOPLAS 9,4 (Oct. 1987),582-598.
No context found.
Haynes, Christopher T., and Friedman, Daniel P. "Embedding Continuations in Procedural Objects". ACM TOPLAS 9,4 (Oct. 1987),582-598.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC