On the Transfer of Control between Contexts

Programming Symposium, Proceedings Colloque sur la Programmation |

Published by Lecture Notes in Computer Science 19, Springer | Organized by CNRS

Editor(s): Bernard Robinet

ISBN 3-540-06859-7

DOI | Author's Version

We describe a single primitive mechanism for transferring control from one module to another, and show how this mechanism, together with suitable facilities for record handling and storage allocation, can be used to construct a variety of higher-level transfer disciplines. Procedure and function calls, coroutine linkages, non-local gotos, and signals can all be specified and implemented in a compatible way. The conventions for storage allocation and name binding associated with control transfers are also under the programmer’s control. Two new control disciplines are defined: a generalization of coroutines, and a facility for handling errors and unusual conditions which arise during program execution. Examples are drawn from the Modular Programming Language, in which all of the facilities described are being implemented.