Simulation, Validation, Visualisierung
The visualization enables the designer to see in which state the object system currently is. Therefore designers can test specifications before running the models on real machines.
What does the simulation show?
The simulation shows the object system: All objects (and the environment) of a system including their relations. Additionally the simulation shows what changes occur when when the system progresses when messages are sent. The user can trigger active messages offered by ScenarioTools. Active message are those that may occur at a certain state.
How is the simulation implemented?
The simulation is done using ScenarioTools (http://scenariotools.org/) for which we developed a visualization using Sirius (http://www.eclipse.org/sirius/).
How to setup and run a specification?
- Eclipse with the ScenarioTools and Sirius plugin
- A specification and a runtime configuration (e.g. My.sdl, My.runconfig)
- A .ecore file with the metamodel of the specification.
Step 1: Define a visualization
(Needs to be done once for each domain)
- To visualize the scenario we need to define a mapping between the model elements and graphical elements
- For this we create a .odesign file (important: the prefix of this file has to match the name of the .runconfig file. If your .runconfig file is called “My.runconfig” name your .odesign file “My.odesign”)
- Using the Sirius plugin in eclipse this can be done by creating a new “Viewpoint Specification Model”
- Refer to the Sirius Tutorial (https://wiki.eclipse.org/Sirius/Tutorials/4MinTutorial) or the documentation (http://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html) on how to declare the mapping.
- During the simulation ScenarioTools will open a new viewpoint, create the first defined representation and supply it with the root object of your object system
- Note: Because Sirius specifications are interpreted during runtime it is possible to modifiy it during a running simulation wich greatly simplifies the design progress
- If you are having problems with this step it can be helpful to look at examples.
Step 2: Start the Simulation
- If not already done, create a new Debug Configuration, choose “ScenarioTools Simulation” and select your .runconfig file
- Start a new Debug Session using the above configuration and a new Sirius editor displaying the initial state of the system should open
- It is recommended to switch to the “ScenarioTools SDL Simulation” perspective.
- Using the MessageEvent Selection View active messages can be viewed and triggered.
- The corresponding change of the model is updated in the visualization in real time
What are the results?
The simulation is able to display the object system, to show incoming and activated messages.