Running animated models
Rhapsody animation is a key technology that enables model validation.
You can validate the analysis and design model by tracing and stimulate the executable model. In addition, the Rhapsody animator helps you debug your system at the design level rather than the source code level by actually executing the model and animating the various UML design diagrams. Rather than merely simulating the application and viewing values of variables and pointers, you see actual values of instances of states and relations.
The animator enables you to juxtapose different views of an application while it is running. You can watch the animated model executing in any of the following views:
- Sequence diagrams
- Statecharts
- Activity diagrams
- Browser
- Event Queue window
- Call Stack window
- Output window
Simultaneously viewing animated sequence diagrams, animated statecharts, animated activity diagrams, and the animated browser in adjacent windows as the model is executing enables you to verify that the design behaves as wanted. Highlighting in the animated diagrams helps you to pinpoint the current state of execution.
While the model is running, you can use the Animation toolbar to step through the program, set and clear breakpoints, and inject events to observe how the system reacts in quasi-real time. You can observe the operation for the system either in the animated views or by generating an output trace.
The animator is a design-level debugger, as well as a model validator. In other words, the animator supports the standard functionality of a programming language debugger at the design level. The objects you follow are design-level objects; that is, objects that are modeled in Rhapsody .
Animation features
During an animation session, you can perform the following activities:
- Inspect and modify the status of the model:
- View current instances and the relationships between them.
- View the current state for reactive objects.
- View animated sequence diagrams depicting events and operations actually sent or called.
- Generate events.
- Open or close animated views.
- Set breakpoints.
- Advance execution using the Go buttons on the Animation toolbar.
Preparing for animation
Here are the general steps to prepare for and run animation, with references to the more specific procedures.
- If necessary, create a component. See Creating components for a project.
- If necessary, create a configuration. See Creating configurations.
- Set the Instrumentation mode for the configuration to Animation. See Setting the instrumentation mode.
- Set the active configuration. The active configuration is the one generated when you generate code. See Setting the active configuration.
- Generate code for the configuration. See Generating code from a Rhapsody model.
- Build the animated component. See Building your application.
- Run the animated component. See Running the animated model.