Textual Elements
The following textual element types can be created or modified in the Properties dialog box:
●
● The Action properties dialog box contains the following fields:
● Selected Implementation - A pull-down menu with the following options:
●
Definition - Specifies the action taken is defined in the Description text box.
●
Truth Table - Specifies the action taken is defined in a truth table. Actions defined in a truth table are considered compound actions and follow the same scoping rules as other textual elements in the model.
For more information on truth tables and for instructions on how to define a truth table in Rational Statemate, see Truth Tables.
●
Best Match - Directs Rational Statemate to select the implementation to use if more than one has been specified. The order in which the analysis tool selects the implementation is based on the ordering in this pull-down menu.
●
None - No implementation is specified.
● Definition - A text box for the definition, if Definition is chosen as the Selected Implementation.
● Truth Table Edit/Delete buttons - Used to set up or delete a truth table, if Truth Table is chosen as the Selected Implementation.
For more information on truth tables and for instructions on how to define a truth table in Rational Statemate, see Lookup Tables.The Data-Item properties dialog box contains the following items:
● Structure - A pull-down menu to select the type of structure associated with the element.
● Data Type - A pull-down menu to select a data type for the element: integer, real, string, bit, bit-array, user type, record, or union. For more information on sub-types, seeSub-Types.
Additional values can be set, depending on the data type selected. For example, for an integer variable, the following values can be set:
●
#Bits - Number of bits.
●
Min - Minimum value.
●
Max - Maximum value.
●
Default Value - Default value for variable.
● Usage - A pull-down menu to select the type of usage. A Rational Statemate information element may have one of four usages: variable, constant, alias, and compound. Certain usages are restricted based on how the element is referred to in the model and on the type of the element.
● Definition - A text box for a definition of the element logic.The User Defined Type properties dialog box contains the following items:
● Structure - A pull-down menu to select the type of structure associated with the element.
● Data Type - A pull-down menu to select a data type for the element: integer, real, string, bit, bit-array, user type, record, or union. For more information on sub-types, see Sub-Types.
● Usage - A pull-down menu to select the type of usage. A Rational Statemate information element may have one of four usages: variable, constant, alias, and compound. Certain usages are restricted based on how the element is referred to in the model and on the type of the element.
● Definition - A text box for a definition of the element logic.The Condition and Event properties dialog box contains the following items:
● Structure - A pull-down menu to select the type of structure associated with the element.
● Usage - A pull-down menu to select from one of four usages: variable, constant, alias, and compound. Certain usages are restricted based on how the element is referred to in the model and on the type of the element.
● Definition - A text box for the definition of the conditions applicable to this element.The Fields properties dialog box contains the following items:
● Structure - A pull-down menu to select the type of structure associated with the element: single or array.
● Data Type - A pull-down menu to select a data type for the element: integer, real, string, bit, bit-array, user type, record, or union. For more information on sub-types, see Sub-Types..
● The Field Name and Field Data Type columns contain the names of the fields and their associated data types.
● Insert button - inserts the selected field.
● Delete button - deletes the selected field.
● Properties button
● Info buttonThe Information-Flow properties dialog box contains one field: Consists of. It displays a matrix of elements that make up the information flow. Elements can be added or deleted by using the Insert and Delete buttons. A popup menu contains the cut, copy, and paste functions for adding or deleting information flow items from and into the list.
Double-click on an item in the "Consist of" list navigates to the properties of that item. The Properties preference “Open New Editor for References" determines whether this opens in a new properties dialog or the current one.The Subroutine properties dialog box contains the following items:
● Type - A pull-down menu to select from the following types:
●
Procedure - A subroutine that has no return value but can have multiple parameters. Each parameter can be INPUT, OUTPUT, or INPUT/OUTPUT.
●
Function - A subroutine that returns a value and can have multiple parameters. All function parameters are inputs.
●
Task - A special form of procedure connected to activities for C and Ada only. Task parameters can be INPUTs, OUTPUTs, or INPUT/OUTPUTs.
● Selected Implementation - A pull-down menu to select the implementation to be used for the subroutine. The following implementations are supported:
●
●
●
●
Procedural Statechart - A specialized derivative of a statechart and does the following:
* Is executed entirely in one step.
* Must contain a termination connector.
* When called, runs from the default to the termination connector (including any loops) within a single step.
●
Flowchart - A specialized derivative of a flowchart and does the following:
* Is executed entirely in one step.
* When called, runs from the start to the end (including any loops) within a single step.
* May return a value, if used with subroutine of type “Function.”
* Generic and offpage instances are allowed.
●
Rational Statemate Action Language - A subroutine written using the standard Rational Statemate action statements. Normally, action statements are executed within the context of Rational Statemate semantics (for multiple action statements within a single step, all of the assignments occur at the same time). Within an action language subroutine, all of the assignments occur in the order the statements were written.
●
Truth Table - Specifies that the action to be taken is to be defined in a truth table. Actions defined in a truth table are considered compound actions and follow the same scoping rules as other textual elements in the model.
For more information on truth tables and for instructions on how to define a truth table in Rational Statemate, see Truth Tables.
●
Lookup Table - Specifies that the action to be taken is to be defined in a lookup table. Actions defined in a lookup table are considered compound actions and follow the same scoping rules as other textual elements in the model.
For more information on lookup tables and for instructions on how to define a lookup table in Rational Statemate, see Truth Tables.
●
External Tool - Enables invoking formatting script on ANSI-C code.
●
Best Match - Used when more than one implementation/language has been specified for the subroutine. Best Match indicates that each analysis tool (Simulation or Code Generation) uses the first language (for which you have specified an implementation) that can be used.
For example, Ada code generation does not use a C code definition. The order in which the analysis tools selects a language implementation is the order in which the languages appear in the menu listing.
You can override the Best Match by explicitly selecting an implementation/language to be used. If the explicitly selected language has not been previously specified or is not appropriate, the analysis tool uses the Best Match selection.
●
None - No implementation is used.
●
External Code/None - Allows the user to define the interface of the subroutine. Complete implementation of the subroutine is not provided.
The Implementation tab in the Subroutine Properties dialog box lets you access and edit subroutine implementations. A subroutine can have more than one implementation. The implementation that is actually used is the one chosen by the Selected Implementation drop‑down menu. The possible implementations are listed in the figure:
●Clicking on the Generate Template icon, you get the query:
●
● Procedural Statechart - A specialized derivative of a statechart and does the following:
● When called, runs from the default to the termination connector (including any loops) within a single step
● Flowchart - A specialized derivative of a flowchart and does the following:
● Statement Action Language - A subroutine written using the standard Rational Statemate action statements. Normally, action statements are executed within the context of Rational Statemate semantics (for multiple action statements within a single step, all of the assignments occur at the same time). Within an action language subroutine, all of the assignments occur in the order the statements were written.
● Truth Table - Specifies that the action to be taken is to be defined in a truth table. Actions defined in a truth table are considered compound actions and follow the same scoping rules as other textual elements in the model.
For more information on truth tables and for instructions on how to define a truth table in Rational Statemate, see Truth Tables.
● Lookup Table - Specifies that the action to be taken is to be defined in a lookup table. Actions defined in a lookup table are considered compound actions and follow the same scoping rules as other textual elements in the model.
For more information on lookup tables and for instructions on how to define a lookup table in Rational Statemate, see Truth Tables.
● External Tool - Enables invoking formatting script on ANSI-C code.
The preference Generate Template for External Tool Implementation controls the generation of the template for the External Tool subroutine implementation. When the preference is set to “Yes”, the tool will create template before invoking the External Tool editor.