Results 1 -
3 of
3
Coroutines in lua
- Journal of Universal Computer Science
, 2004
"... Abstract: After a period of oblivion, a renewal of interest in coroutines is being observed. However, most current implementations of coroutine mechanisms are restricted, and motivated by particular uses. The convenience of providing true coroutines as a general control abstraction is disregarded. T ..."
Abstract
-
Cited by 7 (6 self)
- Add to MetaCart
Abstract: After a period of oblivion, a renewal of interest in coroutines is being observed. However, most current implementations of coroutine mechanisms are restricted, and motivated by particular uses. The convenience of providing true coroutines as a general control abstraction is disregarded. This paper presents and discusses the coroutine facilities provided by the language Lua, a full implementation of the concept of asymmetric coroutines. It also shows that this powerful construct supports easy and succint implementations of useful control behaviors.
Revisiting Coroutines
, 2004
"... This paper defends the revival of coroutines as a general control abstraction. After proposing a new classification of coroutines, we introduce the concept of full asymmetric coroutines and provide a precise definition for it through an operational semantics. We then demonstrate that full coroutines ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
This paper defends the revival of coroutines as a general control abstraction. After proposing a new classification of coroutines, we introduce the concept of full asymmetric coroutines and provide a precise definition for it through an operational semantics. We then demonstrate that full coroutines have an expressive power equivalent to one-shot continuations and oneshot partial continuations. We also show that full asymmetric coroutines and one-shot partial continuations have many similarities, and therefore present comparable benefits. Nevertheless, coroutines are easier implemented and understood, specially in the realm of procedural languages. Finally, we provide a collection of programming examples that illustrate the use of full asymmetric coroutines to support direct and concise implementations of several useful control behaviors, including cooperative multitasking.
A Proposal for Coroutines and Suspend/Resume in E-LOTOS
- ISO/IEC JTC1/SC21/WG7 Meeting on Enhancements to LOTOS (1.21.20.2.3
, 1996
"... The importance of coroutines as a programming paradigm is recognized. This paper proposes to extend LOTOS with a coroutine operator, for which syntax, static semantics, and untimed semantics are provided. We show that this coroutine mechanism generalizes several other operatorrs, which exist in LOTO ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
The importance of coroutines as a programming paradigm is recognized. This paper proposes to extend LOTOS with a coroutine operator, for which syntax, static semantics, and untimed semantics are provided. We show that this coroutine mechanism generalizes several other operatorrs, which exist in LOTOS or which have been proposed for E-LOTOS, including trap, suspend-resume, and hiding. Keywords Coroutine, ET-Lotos, E-Lotos, Formal Description Techniques, Lotos, Process Algebra, Protocols. 1 Comments about the existing core behaviour language At present, the definition of E-Lotos, as provided by the Kansas City output document is far advanced. However, some issues remain unsolved, especially in the behaviour part: ffl The definition of the core behaviour language, as produced after the Kansas City meeting, has introduced a new class of objects, exceptions, which can be felt as "similar to gates, but different". Following the famous Occam razor principle, we must question ourselves ab...

