The Modularization of Scenario Implementation

Date of Submission: 
December 10, 2004
Report Number: 
Report PDF: 
The notion of ``scenarios'' has become an important concept for understanding and specifying the required behaviors for a software system and its components during requirements gathering, analysis, and software design. Unfortunately, in existing programming languages, there is no programming abstraction for modularizing the implementation of scenarios in a program. Like a cross-cutting concern, when implemented with a traditional programming language, a scenario may have to be implemented with statements that scatter at various locations in the program. These statements may also tangle with the statements that implement other scenarios. This paper presents an extension to object-oriented programming languages that allows the software developers to define, within a scenario implementation module, the implementation for a set of related scenarios that represent the alternative paths that the system and its components will take in performing a specific task. At runtime, the scenario implementation module can be instantiated to observe the execution events within specific program contexts and to perform appropriate scenario actions in response for integrating the scenarios into the program execution. When used properly, this new kind of behavior abstraction can improve the program structures and the traceability of the scenarios from design to implementation.