IBM
Contents Index Previous Next



GR to PR Conversion


It is possible to convert diagrams from SDL/GR to SDL/PR. In the conversion, SDL diagrams are translated from the binary files into PR files, possibly containing CIF information. All graphical symbols in that diagram will be replaced by their corresponding keywords and any text in the symbols will be copied to the output file. When possible, the definitions in the output file will appear in the same order as in the input.

The conversion is used by the SDL Analyzer as the first step in the analysis process, and also by the SDT2CIF Converter to convert to PR that preserve the graphical layout information. You can also convert to PR by the Generate PR command in the Tools menu, or by using the Public Interface (see GRPR).

The PR/CIF files produced by the SDL Suite fill various purposes:

Mapping between GR and PR

The following list defines the mapping between the GR and PR forms:

Note:

The order in which text symbols are converted may be of importance when it comes to code generation issues. This is, in particular, applicable when using the SDL to C Compiler. Therefore, you should use one text symbol only for type definitions.

Differences when generating CIF

In general the PR generated as input to the analyzer will be the same as generated for CIF but for some constructs there are differences due to language limitations or to get a better error detection.

Error and Warning Message

This section contains messages that may be produced during the GR to PR conversion.

When the Public Interface performs the conversion from GR to PR, the messages will be displayed in the Organizer log. The reply message on the service will indicate that the conversion has been done and it will also contain the number of errors produced.

If the conversion for some reason fails, the reply message will contain a text stating the kind of problem that has occurred. See further the GRPR service in the Public Interface.

ERROR 5001 Unexpected end of flow

This message indicates that a symbol has been found that has no following flowline and according to the SDL syntax there must be one. In addition to the error message the following line is generated in the PR:

***** Unexpected end of flow *****

WARNING 5002 More than one line entering macro outlet

This message indicates that inside a macro there are more than one line entering the macro outlet symbol. This situation should be avoided as this can lead to syntax errors (which are hard to track) if this macro is expanded inside decision branches.

The easiest way to avoid this situation is to add a no-action task symbol with the text `' and use this as the last symbol in the macro. Let all lines enter this task symbol and add a single line between this task and the macro outlet.


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