![]() |
![]() |
![]() |
![]() |
![]() |
Generating and Starting a Simulator
Once you have designed and analyzed a complete SDL system, it is possible to simulate the system, i.e. to interactively inspect and check its actual behavior. To be able to simulate the DemonGame system, you must first generate an executable simulator and then start the simulator with a suitable user interface.
What You Will Learn
- To generate an executable simulator
- To start the simulator user interface
- To start a simulator from the user interface
Generating the Simulator
To generate an executable simulation program, do as follows:
- Make sure the system diagram icon is selected in the Organizer.
- Select the Make command from the Generate menu. The Make dialog is opened:
- Adjust the options in accordance to the figure, i.e.
- Click the Make button.
- Select the Organizer log from the Tools menu. Check that no errors occurred. The Organizer's status bar should read "Analyzer done" and the Organizer Log should report no errors between the "Make started" and "Make completed" messages.
- If errors were reported, bring up the Make dialog again, but click the Full Make button instead. This time, no errors should be reported.
Starting the Simulator
The generated simulator is now stored on a file called demongame_xxx.sct (on UNIX) or demongame_xxx.exe (in Windows) in the directory from which you started the SDL Suite (the _xxx suffix is platform or kernel/compiler specific). The simulator contains a monitor system that provides a set of commands which can be used to control and monitor the execution of the simulator.
It is possible for you to execute the simulator directly from an OS prompt, in which case you have to enter all commands to the monitor system textually using a simple command-line interface.
The SDL Suite provides a user-friendly graphical interface to the simulator that is started from the Organizer.
- From the Tools menu, select the sub-menu SDL and the command Simulator UI. The Simulator UI window is opened:
- The text area to the right informs you that no simulator is running. The text area displays the textual input/output from the monitor system, such as entered commands, the results of commands, and error messages.
To start a simulator, select Open from the File menu, or click the Open quick button.
- In the file selection dialog, the generated simulator file described above should be listed. Select it and click OK or Open.
- The text area of the Simulator UI greets you with a welcome message to acknowledge that the simulator has been started:
Welcome to SDL SIMULATOR. Simulating system Demongame.When a simulator is started, the static process instances in the system are created (in this case Main and Demon), but their initial transitions are not executed. The process in turn to be executed is the Main process.
The Simulator UI is now ready to accept commands to the monitor system. Whenever it is possible to enter a command, the prompt Command: is issued in the text area.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |