page 1  (16 pages)
2to next section

Coroutine Semantics in the TOOL Programming Environment

Sergio Eduardo Rodrigues de Carvalho
Departamento de Inform?tica, Pontificia Universidade Cat?lica RJ
Rua Marques de S?o Vicente 225, G?vea, Rio de Janeiro, 22453
Telephone: (55)(21)274-4449 Fax: (55)(21) 511-5645
e-mail: sergio@inf.puc-rio.br

ABSTRACT

In this paper we discuss two situations, in object oriented programming, where the semantics of coroutines is useful: in the implementations of loop iterators and of dynamic data structure navigators. In both of these operations the receiving object is a loop control object. Iterators are applied to produce, outside of the loop's environment, the next value for the loop control object; navigators are applied to indicate, outside of the loop environment, the next element in a dynamic data structure.

KEYWORDS AND PHRASES

object orientation, coroutine, iterator, generic class, loop statement, data structure.