![]() |
![]() |
![]() |
![]() |
![]() |
SDL Cross-References
The Analyzer has the ability to produce listings of SDL entities and references to these definitions. In one file, all definitions of entities in an SDL system will be gathered, along with cross references to these entities. Entities mainly used to indicate structure (such as system, block, substructure, process, procedure, and service), as well as entities defining objects (such as signals, variables and sorts) will be considered as definitions.
The file, which is described further below, is a plain text file.
The SDL Suite has support for graphical presentation of a cross-reference file, using an SDL-like graphical notation. To achieve this, you can use the Index Viewer. See The SDL Index Viewer.
Definitions and Cross References Files
The file name will be <unitname>.xrf for the cross references file, where <unitname> is the name of the SDL unit selected for analysis. Alternatively, the file name is to be supplied by the user when running the Analyzer from the Organizer.
If an SDL system is selected for analysis, all definitions and cross references are generated; while if case of a non-SDL system unit, definitions and cross references in the following units are generated:
- The unit itself
- All subunits to the selected unit
- All enclosing units (blocks and the system) of the selected unit
The following entities will be part of the files:
Syntax of Files
For each definition of any kind mentioned above the following information is generated:
ScopeLevel EntityType EntityName ReferenceExplanation
- The number first on the line is the scope level. The system has level 1, any definition at the system level has scope level 2, and so on.
- Next on the line the entity type and entity name are given.
- Last there is an SDT reference to the place where the entity is defined. For more information on the format, see Syntax.
For each entity used to indicate structure (system, block, substructure, process, procedure, service) there is a header consisting of three additional lines, which should be considered as a comment to increase the readability.
Example 348 : Reference in Analyzer Error
2 SIGNAL Bump \SDTREF(SDL,/usr/tom/demongame.ssy(1),122(40,30),3)Order of Definitions
The definitions are generated in pre-order (prefix walk in the tree formed by the definitions). This means that an entity is always followed by the entities defined within the entity. It also means that an entity at level N is defined in the first entity at level N-1 found when scanning upwards in the file.
Cross References
For each place where an entity is used, information about that cross reference is generated:
Example 349 : Cross References
4 DCL Count \#SDTREF(SDL,/usr/tom/game.spr(1),179(80,10),2)TASK \#SDTREF(SDL,/usr/tom/game.spr(1),137(30,40),1)OUTPUT \#SDTREF(SDL,/usr/tom/game.spr(1),128(80,55),2)Cross references consist of a keyword, describing where the reference was found, and the SDL reference. In Example 349, the variable Count is referenced in a task symbol and in an output. All cross references for an entity are placed immediately after the line for the definition.
Entities used to indicate structure can also have cross references (procedure call, process create).
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |