Results 11 -
18 of
18
A Polymorphic Future and First-class Function Type for Concurrent Object-Oriented Programming
- TO BE SUBMITTED TO THE JOURNAL OF OBJECT-ORIENTED SYSTEMS
"... A "future" is a typed synchronization mechanism used to represent avalue that will come into existence at some point in time after the creation of the future. In this paper, a polymorphic future type is introduced that differs from previous mechanisms in that it provides a first-class, extensible f ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
A "future" is a typed synchronization mechanism used to represent avalue that will come into existence at some point in time after the creation of the future. In this paper, a polymorphic future type is introduced that differs from previous mechanisms in that it provides a first-class, extensible facility for expressing synchronized access to the typed result value of a concurrent computation. The proposed mechanism requires write-once/read-many synchronization, which is implemented in terms of common thread synchronization primitives, thereby ensuring a high-degree of efficiency. The type definition and type specialization features of C++ are used to illustrate how one would implement a polymorphic future type in a strongly typed object-oriented language supporting polymorphic type definitions.
Safe-for-Space Threads in Standard ML
- CCITT International
, 1998
"... Threads can easily be implemented using first-class continuations, but the straightforward approaches for doing so lead to space leaks, especially in a language with exceptions like Standard ML. We show how these space leaks arise, and give a new implementation for threads that is safe-for-space. 1 ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Threads can easily be implemented using first-class continuations, but the straightforward approaches for doing so lead to space leaks, especially in a language with exceptions like Standard ML. We show how these space leaks arise, and give a new implementation for threads that is safe-for-space. 1 Introduction The ability to provide simple implementations of lightweight, concurrent threads is often cited as one of the great attractions of first-class continuations. We show that this task is not nearly as simple as previously thought, at least if one is concerned about space safety. Programming with threads is common in domains such as networking, operating systems, and user interfaces. Threads are not strictly necessary for such applications, but designing these systems with threads leads to an overall system structure that is much easier to understand and modify. Principles for programming with threads can be found in any undergraduate textbook on operating-system design. An excelle...
Non-speculative and Upward Invocation of Continuations in a Parallel Language
- In International Joint Conference on Theory and Practice of Software Development (TAPSOFT/FASE'95), LNCS 915
, 1995
"... . A method of preserving the sequential semantics in parallel programs with first-class continuations is to invoke continuations non-speculatively. This method, which prevents a continuation from being invoked as long as its invocation can infringe the sequential semantics, reduces parallelism by th ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
. A method of preserving the sequential semantics in parallel programs with first-class continuations is to invoke continuations non-speculatively. This method, which prevents a continuation from being invoked as long as its invocation can infringe the sequential semantics, reduces parallelism by the severe conditions that it imposes, especially on upward uses. In this paper, we present new conditions for invoking continuations in an upward way and both preserving the sequential semantics and providing parallelism. This new approach is formalised in the PCKS-machine, which is proved to be correct by showing that it has the same observational equivalence theory as the sequential semantics. 1 Introduction The continuation of an expression is the computation that remains to be performed after evaluating this expression [16]. Some programming languages like Scheme [14], or SML of New Jersey [1] provide the user with two facilities to act on the interpreter continuation: the capture and th...
A Parallel Functional Language With First-Class Continuations. Programming Style and Semantics
- Computers and Artificial Intelligence
"... We present an operational semantics for a functional language with rst-class continuations and transparent constructs for parallelism fork and pcall. The sequential semantics of programs with rst-class continuations is preserved when parallel evaluation is allowed, by verifying whether some expre ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
We present an operational semantics for a functional language with rst-class continuations and transparent constructs for parallelism fork and pcall. The sequential semantics of programs with rst-class continuations is preserved when parallel evaluation is allowed, by verifying whether some expressions have returned a value before applying a continuation. These expressions are the ones that are evaluated before this continuation is applied in a left-to-right sequential order. An implementation is proposed using a notion of higher-order continuation that we call metacontinuation. This semantics is costless when rst-class continuations are not used. Several programs also illustrate the programming style that can be adopted in such a language. Keywords: Scheme, parallelism, transparency, continuation, metacontinuation, left expression, operational semantics. 1 Introduction There are essentially two trends to extend a functional language with parallel constructs. On the one...
Representing Control in Parallel Applicative Programming
, 1994
"... This research is an attempt to reason about the control of parallel computation in the world of applicative programming languages. Applicative languages, in which computation is performed through function application and in which functions are treated as first-class objects, have the benefits of ele ..."
Abstract
- Add to MetaCart
This research is an attempt to reason about the control of parallel computation in the world of applicative programming languages. Applicative languages, in which computation is performed through function application and in which functions are treated as first-class objects, have the benefits of elegance, expressiveness and having clean semantics. Parallel computation and real-world concurrent activities are much harder to reason about than the sequential counterparts. Many parallel applicative languages have thus hidden most control details with their declarative programming styles, but they are not expressive enough to characterize many real world concurrent activities that can be easily explained with concepts such as message passing, pipelining and so on. Ease of programming should not come at the expense of expressiveness. Therefore, we design a parallel applicative language Pscheme such that programmers can express explicitly the control of parallel computation while maintaining ...
Subcontinuations
, 1993
"... . Continuations have proven to be useful for implementing a variety of control structures, including exception handling facilities and breadth-first searching algorithms. However, traditional continuations are not useful in the presence of concurrency, because the notion of the rest of the computati ..."
Abstract
- Add to MetaCart
. Continuations have proven to be useful for implementing a variety of control structures, including exception handling facilities and breadth-first searching algorithms. However, traditional continuations are not useful in the presence of concurrency, because the notion of the rest of the computation represented by a continuation does not in general make sense. Traditional continuations can also be difficult to use in nonconcurrent settings, since their global nature is sometimes problematic. This article presents a new type of continuation, called a subcontinuation. Just as a traditional continuation represents the rest of a computation from a given point in the computation, a subcontinuation represents the rest of a subcomputation from a given point in the subcomputation. Subcontinuations may be used to control tree-structured concurrency by allowing nonlocal exits to arbitrary points in a process tree and allowing the capture of a subtree of a computation as a composable continuati...
Continuing Into the Future: the Return
, 1996
"... future is an annotation that indicates which expressions of a program may be evaluated in parallel. By definition, future is transparent, i.e. annotated programs return the same results as in the absence of annotations. In such a framework, the interaction of parallelism and first-class continuati ..."
Abstract
- Add to MetaCart
future is an annotation that indicates which expressions of a program may be evaluated in parallel. By definition, future is transparent, i.e. annotated programs return the same results as in the absence of annotations. In such a framework, the interaction of parallelism and first-class continuations has been considered as a delicate matter for a long time. Indeed, unrestricted parallelism and first-class continuations may lead to non-deterministic programs, which is contradictory to the notion of annotation. In this paper, we overview the formal semantics of future and first-class continuations. The semantics is an abstract machine that models a parallel computer with a shared memory. 1 Introduction The continuation of an expression is defined as the computation that remains to be performed after evaluating the expression [22]. Some languages, like Scheme [21, 23] or Standard ML of New-Jersey [1] provide the programmer with first-class continuations; in these languages, contin...
Multi-way Streams in Scheme
, 1989
"... We present a mechanism for the maintenance of streams based on the Scheme facility of call-with-current-continuation or call/cc. The mechanism supports stream sharing and has overhead cost which is independent of top-level program parameters if call/cc is implemented in heap-based systems. It is ..."
Abstract
- Add to MetaCart
We present a mechanism for the maintenance of streams based on the Scheme facility of call-with-current-continuation or call/cc. The mechanism supports stream sharing and has overhead cost which is independent of top-level program parameters if call/cc is implemented in heap-based systems. It is shown how the control structure of call/cc can save programming effort in cases where multiple procedures output to the same stream in irregular order. 1 Introduction In Scheme, a stream is typically implemented as a two-element cell: one element contains the value of the stream head and the other element contains a procedure which computes the remaining stream tokens. Stream tokens can be grabbed one at a time because, in Scheme, the body of a procedure is not evaluated until the procedure is invoked. This implementation works well for single streams but may have efficiency problems in stream networks. Consider, for example, the very simple network that results from splitting a stream ...

