Element Properties : Understanding Elements : Textual Elements

Textual Elements

Rational Statemate supports the textual elements (types, sub-types, and structures) described in the following table.

 
A data-type that consists of several fields of possibly different types. A user-defined type is analogous to the typedef statement in C or the type is statement in Ada.
A persistent signal whose value is either TRUE or FALSE. Something occurring over a span of time, for example, the light is on. All conditions are enclosed in square brackets (for example, [C]).
In general, the action tr! (C) has the effect of setting the truth value of condition C to true, and the corresponding action make_false (C) (abbreviated fs! (C) sets it to false. (Contrast with Event.)
Events occur at a precise instant in time, and if not immediately sensed they are lost. Events “live” only for the duration of the step immediately following their occurrence. (Contrast with Condition.)
A single action can consist of making an assignment, generating an event, invoking a defined (named) action, or several special types of expressions (starting/stopping/ suspending activities, clearing history, etc.).
Information flows are containers for other elements (such as conditions, events, data items, and other information flows). They reduce the number of flow lines, which makes the chart more readable and helps the viewer to better comprehend the specification.
In addition to basic types, a data item can be a composite of named components, referred to as fields, each of which can be a data item of any type or a condition.
Rational Statemate supports two kinds of composites: records and unions. The entire construct is referenced by its name (e.g., on a flow line), while a particular field is referenced using the dot notation:
Subroutines have textual information like any other Rational Statemate element (for example, short description, long description, and attributes).
The maximum value of integers allowed depends on the architecture of the machine on which Rational Statemate is running. On a 32-bit machine, it is (2**32)-1.
A real is also sometimes called a floating point number. In Rational Statemate, values can be referred to in either ‘nnn.mmm’ form or ‘n.mmm E+ee’ form. The values allowed depend on the architecture of the machine on which Rational Statemate is running. This is usually in the range -1.0 E+38 to 1.0E +38.
A bit array is an array of bits. The length and indices are specified when the element is defined. The defaults values are: length - 32 bits, right index (most significant bit) - 31, and left index (least significant bit - 0.
Bit arrays are treated as unsigned numbers by Rational Statemate. The software supports both implicit and explicit conversion to other Rational Statemate types.
A string can hold any number of characters up to its defined length. The default length for a string is the maximum integer size of the machine on which Rational Statemate is running. On a 32-bit machine this is (2**32)-1.
A data type that consists of several fields of possibly different predefined types or user-defined types. When a data item is declared to be a record, it is defined to contain all of its fields. A record is analogous to a structure in C and a record in Ada.
A data type that consists of several fields of possibly different predefined types or user-defined types. When a data item is declared to be a union, it is not defined to contain all of its fields. Rather, it is defined to contain one of its possible fields at any point in time. A union is analogous to a union in C and a variant record in Ada.
A data type that consists of several fields of possibly different types. A user-defined type is analogous to the typedef statement in C or the type is statement in Ada.
Enumerated values are constants. In Rational Statemate you can define a User-Defined Type (UDT) to be an enumerated type, and then define enumerated values for this type.
For example, you can define a UDT as enumerated type COLOR, and then define COLOR as {RED, GREEN, BLUE, YELLOW}. These colors are enumerated values that you can use in expressions (such as /X:=RED;).
A one-dimensional (vector) grouping of data items, events, and conditions under a single name whose individual elements are addressed through a reference index.
An ordered, unlimited collection of data items, all of the same data type. This data type can be any predefined or user-defined type. A queue is essentially a single structure that holds many elements. These elements can be put in at either the front or the back, but can only be retrieved at the front.
put! adds the value of the expression to the queue’s tail.
uput! adds the value of the expression to the queue’s head.
Note: Put actions are accumulated and performed at the end of the step. This scheme reduces the chances of race conditions.
get! actions are performed when they are encountered.
peek! copies the queue’s head element without removing it.
fl! totally clears the queue.
q_length returns the length of the queue.