Supplementing Generated C : Referencing Model Elements : Element Names in the Output Code

Element Names in the Output Code

The element name in the object code is the same as in the Rational Statemate model. If a user-defined element name is not unique, or if it conflicts with a reserved word in the target language, it is changed in the code to contain a prefix that denotes its type and scope. Since the Rational Statemate scopes are different from the modules in the output code, the names are not identical. This avoids any ambiguities that might result from name duplications. The naming convention is shown below:

prefix<STATEMATE_NAME>
 

Where prefix is determined as follows:

1.
ev - event
co - condition
di - data-item
 

For activities the notation is:

acy_<ACTIVITY_NAME>.
2.
To resolve ambiguities:

If two elements have the same name in a module, a number is added to the prefix to resolve the ambiguity. If an ambiguity occurs, refer to the cross-reference table in the info-file to determine which is the correct element.

Example of two data-items with the same Rational Statemate name (Z):

di1Z, di2Z

In this case, you should look in the cross reference table to identify which one belongs to which Rational Statemate scope.