Article
Coroutine behaviour and implementation
Article first published online: 27 OCT 2006
DOI: 10.1002/spe.4380100305
Copyright © 1980 John Wiley & Sons, Ltd
Additional Information
How to Cite
Pauli, W. and Soffa, M. L. (1980), Coroutine behaviour and implementation. Softw: Pract. Exper., 10: 189–204. doi: 10.1002/spe.4380100305
Publication History
- Issue published online: 27 OCT 2006
- Article first published online: 27 OCT 2006
- Manuscript Revised: 26 OCT 1979
- Manuscript Received: 2 JUL 1979
Funded by
- National Science Foundation. Grant Number: MCS79-06102
- Abstract
- References
- Cited By
Keywords:
- Coroutine;
- Spaghetti stack;
- Storage management;
- Control structures
Abstract
Algorithms using retentive control are currently being developed in operating systems, simulation, artificial intelligence and language implementation. This paper investigates two aspects of a form of retentive control, namely coroutines. The behaviour of coroutines and language primitives that express the operations on coroutines are explored by surveying the literature for coroutine usage. Secondly, the area of control implementation of coroutines is investigated by considering the Bobrow and Wegbreit spaghetti stack as a viable data structure for managing run-time storage. Changes in the basic model of the spaghetti stack, tailoring its use in a strictly coroutine environment with subsequent implementation alternatives, are explored. An investigation through experimentation is made of the effect control-related aspects of coroutines have on the revised spaghetti stack models. An analysis of the empirical results obtained provides a useful barometer for selecting appropriate storage management schemes based on coroutine design and usage.

1097-024X/asset/olbannerleft.jpg?v=1&s=2d7d001211f2c40f177a231141601e9f52afc1f3)
1097-024X/asset/olbannerright.jpg?v=1&s=3aec7891a8ba78b361ead9743adfc0b6eae6369a)
1097-024X/asset/cover.gif?v=1&s=5a70ecca2928358eca4ff75b9921d0552ffb6539)