ACM Home Page
Please provide us with feedback. Feedback
Revisiting coroutines
Full text PdfPdf (189 KB)
Source
ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 31 ,  Issue 2  (February 2009) table of contents
Article No. 6  
Year of Publication: 2009
ISSN:0164-0925
Authors
Ana Lúcia De Moura  Catholic University of Rio de Janeiro (PUC--Rio), Rio de Janeiro, RJ
Roberto Ierusalimschy  Catholic University of Rio de Janeiro (PUC--Rio), Rio de Janeiro, RJ
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 38,   Downloads (12 Months): 381,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1462166.1462167
What is a DOI?

ABSTRACT

This article advocates the revival of coroutines as a convenient 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 one-shot delimited continuations. We also show that full asymmetric coroutines and one-shot delimited continuations have many similarities, and therefore present comparable benefits. Nevertheless, coroutines are easier implemented and understood, especially in the realm of procedural languages.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
 
3
4
 
5
 
6
Conway, D. 2000. Rfc 31: Subroutines: Co-routines. http://dev.perl.org/perl6/rfc/31.html.
7
 
8
9
 
10
 
11
Felleisen, M. 1985. Transliterating Prolog into Scheme. Tech. rep. 182, Indiana University.
12
 
13
 
14
Felleisen, M. and Friedman, D. 1986. Control operators, the SECD-machine, and the λ-calculus. In Formal Description of Programming Concepts-III, M. Wirsing, Ed. North-Holland, 193--217.
 
15
16
 
17
 
18
 
19
20
21
 
22
 
23
 
24
Ierusalimschy, R. and de Moura, A. L. 2008. Some proofs about coroutines. Monografias em Ciẽncia da Computação 04/08, PUC-Rio, Rio de Janeiro, Brazil.
 
25
26
 
27
 
28
Knuth, D. E. 1968. The Art of Computer Programming, Volume 1, Fundamental Algorithms. Addison-Wesley, Reading, MA.
 
29
30
 
31
 
32
Moody, K. and Richards, M. 1980. A coroutine mechanism for BCPL. Softw. Pract. & Exper. 10, 10, 765--771.
 
33
Moura, A., Rodriguez, N., and Ierusalimschy, R. 2004. Coroutines in Lua. J. Universal Comput. Sci. 10, 7, 910--925.
34
 
35
Pauli, W. and Soffa, M. L. 1980. Coroutine behaviour and implementation. Softw, Pract. & Exper. 10, 3, 189--204.
36
 
37
 
38
Schemenauer, N., Peters, T., and Hetland, M. 2001. PEP 255: Simple generators. http://www.python.org/peps/pep-0255.html.
39
40
 
41
 
42
 
43
Tismer, C. 2000. Continuations and stackless Python. In Proceedings of the 8th International Python Conference. Arlington, VA. http://www.python.org/workshops/2000-01/proceedings.html.
 
44
45
 
46

Collaborative Colleagues:
Ana Lúcia De Moura: colleagues
Roberto Ierusalimschy: colleagues