![]() |
![]() |
![]() |
![]() |
![]() |
Checking the System Diagram
What You Will Learn
- To invoke the Analyzer
- To set analysis options
- To work with the Organizer Log window
- To locate and correct syntax errors
Running the Analyzer
You should now check the syntax of the system diagram you created before proceeding further by creating the remaining diagrams. To do this, you will use the Analyzer tool, a back-end tool which is fully integrated with the Organizer.
- Select the SDL system diagram icon in the Organizer diagram structure. Then, from the Organizer's Generate menu, select the Analyze command.
- If you had (perhaps accidentally) modified any diagram, the Organizer first prompts you to save modified diagrams (by issuing the Save dialog, see Figure 39 on page 71) -- in which case you should click the Save All button to make sure everything is OK.
- Once the Save dialog is closed, the Analyzer dialog is opened.
- Adjust the options in accordance to Figure 42, i.e.
- Click the Analyze button. The Analyzer now starts processing the input with the options as specified in the options dialog. When it is finished, the Organizer status bar should read something with the essence "Analyzer done", possibly appended with extra information.
- The Organizer is provided with a textual window where important information is logged. By default, the Organizer Log window is raised as soon as information classified as "warning" or "error" is reported. If the window does not appear automatically after the analysis is complete, open the window manually. (Use the Organizer Log command from the Organizer's Tools menu to show the window, or the provided quick button).
![]()
Looking for Analysis Errors
The diagnostics that are reported by the Analyzer are appended to the Organizer Log (together with other important messages). Look at the tail of the log for the report summary, which should look something like:
--------------------------------------------------Number of warnings: <diagram dependent>+ Analysis completed(You may need to scroll down the Organizer Log window to bring the tail into view.)
The text "Number of warnings" or "Number of errors" shows how many syntactic warnings or errors that were detected in the diagram (if no warnings or errors were found, then these lines are missing altogether).
- For the purpose of this exercise, you may need to introduce a syntactic error into the diagram. You may for instance remove one of the separating commas in the signal list of channel C1 (but make sure there is a space separating the signals).
- Save everything and repeat the analysis.
Correcting Analysis Errors
Your Organizer log should now report an error looking something like:
#SDTREF(SDL,/opt/home/tmi/demongame/DemonGame.ssy(1) ,131(25,50),3,8) (on UNIX)#SDTREF(SDL,C:\IBM\Rational\SDL_TTCN_Suite6.3\work\d emongame\DemonGame.ssy(1),131(25,50),3,8) (in Windows)ERROR 312 Syntax error in rule SIGNALLIST, symbol Name found but one of the following expected:, ; commentResult Endgame;?How to Interpret the Error Message
Let us spend a few moments on explaining the contents of this error.
- The first part (#SDTREF...) is a reference to the source diagram, page, symbol, line number and finally a position within a line of text where the error was found. All references produced by the Analyzer adhere to this format in its whole or partially; the reference may in some circumstances be less precise than in the example above, depending on the Analyzer's ability to locate the exact source of error.
- The second part (ERROR 312...) contains the error number and an explanatory text, telling you, in this case that a comma, a semicolon or a comment was expected.
- The last part (Result Endgame) along with the `?' character shows more specifically where the error occurred, in this case the comma should be inserted between the signals Result and Endgame.
To display the diagram and symbol where the error was found, you may use a handy facility:
- Select the command Show Error form the Tools menu.
- The symbol where the error was found is immediately selected in the SDL Editor. The more information the reference holds, the more precise the selection. Correct the error (insert the comma).
- To correct the next error, simply click the Show error button again.
- Save the diagram and repeat the analysis until the Analyzer does not report any errors. If you feel uncertain about how to interpret and correct the errors, look at the printout for the system diagram for a reference (see Figure 27 on page 58).
You may clear the Organizer Log window at any time, for instance between subsequent passes to make it easier to read the contents of the log. Use the Clear Log command from the Edit menu for this, or the provided quick button.
For repeated analysis passes using the same options, you can use the Analyze quick button in the Organizer.
You have now designed your first SDL diagram using the SDL Suite. You have also verified that the diagram is syntactically correct according to the Z.100 recommendation. Congratulations!
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |