IBM
Contents Index Previous Next



Checking the System Diagram


What You Will Learn

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.

  1. Select the SDL system diagram icon in the Organizer diagram structure. Then, from the Organizer's Generate menu, select the Analyze command.
  2. 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.
  3. Once the Save dialog is closed, the Analyzer dialog is opened.

Figure 42 : The Analyzer Options dialog

  1. Adjust the options in accordance to Figure 42, i.e.
    • Macro expansion off
    • Syntactic analysis on
    • Semantic analysis off
    • Adjust, if required, the error limit slide bar to a reasonable value. This parameter defines how many errors and warnings the Analyzer will report before aborting the analysis.
  2. 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.
  3. 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).

  1. 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).
    • Such a syntactic error will be detected already in the SDL Editor and marked with a red underline, but we will show how the error is reported by the Analyzer.
  2. 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:
,  ;  comment  
Result Endgame;
      ?

How to Interpret the Error Message

Let us spend a few moments on explaining the contents of this error.

To display the diagram and symbol where the error was found, you may use a handy facility:

  1. Select, by dragging the mouse, the lines of text containing the error message.

Figure 43 : Selecting the error message

  1. Select the command Show Error form the Tools menu.
    • Alternatively, you may click the Show error quick button.
  2. 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).
  3. To correct the next error, simply click the Show error button again.
  4. 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
Contents Index Previous Next