IBM
Contents Index Previous Next



General Description


The Analyzer's main task is to perform syntactic and semantic analysis of SDL-92 definitions and diagrams, and to serve as a front end to code generators. You may perform full syntactic and nearly full semantic analysis of complete system definitions.

Analysis of separate units (block, process, substructure, service, and procedure) is also supported. Syntactic analysis may be performed on a unit, while restricted semantic analysis of a unit may only be performed if the context of the unit is provided. The context is the enclosing units and their definitions (for a detailed description, see the section Separate Analysis).

The Analyzer works in a number of passes:

Figure 492 : Analyzer passes

  1. Conversion to PR. This pass is needed when input is not SDL/PR, i.e. for SDL/GR diagrams, ASN.1 files, C, and C++ header files. The result is a PR file with a "raw" layout, that is submitted as input to the next pass. This PR file is not intended to be read by the human. See Conversion to PR for a more thorough description.
  2. Macro expansion. This pass is needed when input contains references to macros (which need to be expanded). The result is a PR file where SDL macros are expanded. See The Macro Expander for a more complete description of the Macro Expander.
  3. Lexical and syntactic analysis. This pass checks that the input follows the SDL definition with respect to syntactic rules. During this pass, the Analyzer builds an abstract syntax tree that is used by the following passes. See The Lexical and Syntactic Analyzer for a more thorough description.
  4. Pretty-printing. This optional pass uses the pretty-printer to produce an SDL/PR file with a nice layout, easy to read and understand by the human. The pretty-printed PR file contains the original SDL specification formatted according to specific layout rules.
  5. PR to GR conversion. The input PR files are translated to SDL/GR diagrams, that you may open in the SDL Editor. This pass allows you to for instance import PR files from other tools supporting SDL. See also section The PR to GR Converter.
  6. Semantic analysis. During this pass, the Analyzer checks that your SDL diagrams obey the static semantic rules as defined in the Z.100 recommendation. During this pass, the Analyzer builds and uses a symbol table, which can also be used later by the Code Generators. The semantic analysis is likely to be the "bottleneck" when analyzing a system. See Optimizing a System to Reduce Analysis Time.
  7. After the semantic analysis pass, you may optionally generate:
    • cross-references listings of SDL entities; where they are defined in an SDL system, and where they are used (referred). The result from this pass is a file which contents may be displayed graphically in the Index Viewer. See The SDL Index Viewer for more information.
    • instance tree information about the SDL system. The result from this pass is an instance information file consisting of records that describe the SDL entities that are present in the system after instantiation of all types. The file is a plain text file with a simple format. See File Syntax for more information.
  8. If your configuration includes a Code Generator1 you may include:
    • A C Code Generation pass, in order to generate a C description of your SDL system. This C code is then compiled and linked to generate a simulator, an explorer or an application. The SDL to C Compiler is available as a Cbasic and as a Cadvanced code generator.
    • A Cmicro Code Generation pass. The generated C code is optimized with respect to memory requirements, making it suitable for generating applications for systems with limited resources.

Analyzer Input and Output

The input to the Analyzer consists of SDL-92 specifications, that is, SDL/GR diagrams that are stored using the storage format of the SDL Suite, or SDL/PR files, or a combination of both.

The output consists mainly of PR files, error and warning messages. These messages are presented on the screen in a log window and may be stored on file. See Error and Warning Messages for a description of these messages.

It is also possible to obtain a pretty printed SDL/PR file of the input and to transform SDL/PR files into SDL/GR diagrams.

The Analyzer User Interfaces

The Analyzer provides the following user interfaces.

Graphical UI

When started from the Organizer with the Analyze command, the Analyzer takes advantage of the graphical user interface and integration mechanism of the SDL Suite.

For instance:

Batch UI

Suitable for running the Analyzer non-interactively. See Batch Facilities.

Command-Line UI

Suitable for working on the file level with detailed control. See The Analyzer Command Line UI.

1

Although technically built into the Analyzer binary executable (sdtsan), the Code Generators are additional optional tools that are licensed separately.


http://www.ibm.com/rational
Contents Index Previous Next