![]() |
![]() |
![]() |
![]() |
![]() |
Dynamic Errors
What You Will Learn
- To recognize and interpret a dynamic error
- To find the SDL symbol last executed
- To continue an interrupted transition
Finding a Dynamic Error
In this exercise, a dynamic error in the Demongame system will be detected. The error is found by simply executing the first four transitions of the system:
- Select the Restart command from the File menu.
- Set the trace level to 6.
- We will not use graphical trace in this exercise. So, exit the currently open SDL Editor from its File menu.
- As you will not need the Command and Watch windows, close them by selecting Close All from the View menu.
- Execute the four next transitions until a warning message is printed in the text area:
********************* WARNING ********************Warning in SDL Output of signal BumpSignal sent to NULL, signal discardedSender: Demon:1TRANSITIONProcess : Demon:1State : GenerateInput : TSymbol : #SDTREF(SDL,c:\IBM\Rational\SDL_TTCN_Suite6.3\work\...TRACE BACKProcess : DemonBlock : DemonBlockSystem : Demongame**************************************************
- The message indicates that there was no receiver for the Bump signal sent from the Demon process. This is quite true, as no process instance of type Game has been created. The definition of the Demon game is thus not correct, as it is actually requires that the user always has a game running, when Bump signals are sent. A better (and correct) solution would be to direct the Bump signals from Demon to Main, which then retransmits the signal to the instance of the Game process, if it exists.
- When no GR trace is in effect, you can still see where the error occurred. Choose Prev Symbol in the Show menu. This opens an SDL Editor and selects the last symbol that was executed. In this case, the output of Bump in the Demon process.
- To execute the interrupted transition to its end, issue a Next-Transition command as usual. In the printed trace you can see that no signal was sent in the erroneous output statement.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |