Simple Table Specification

back to Table Specification

Create a Simple Table Specification

For a basic component, we can add a simple table to it just drag and drop the corresponding item from the Model Elements view:



When adding a simple table specification to a component, a State Transition Table is created:



This table contains has two sorts of columns: the ''input'' columns and the ''output'' columns. As shows the above figure, there is one input column per input port and one output column per output port.

Operations on Transition Table

State Transition Table and Mode Transition Table not only have the similar structure, but also have similar operations on tables.Each state transition table can change its table structure by table structure configuration. However, the mode transition table has no such feature. Each mode transition table is designed to own "Source" column (source mode) and "Target" column (target mode). To define the transition rules of the State (Mode) Transition Table, the correct type of the input is required. All of cells of table in the Transition Rule Editor should be the right data type required. Some operations on tables has been introduced in simple table specification.

Changing table structure

The structure of a table is flexible: one can delete a column by clicking on the "-" to the right of its header. This simply means that the corresponding column has no impact on the result. One can also modify a column header simply by clicking on it, and add a column by clicking on the rightmost "+" in the inputs column. One new condition column will be created after the type of the expression. Only the expression with supported date type will be accepted, such as a boolean, an integer or a double-valued expression.




We can add rows to the table by clicking the left "+" next to "Click to add a new rule...":



The default row contains NoVal everywhere, but we can modify this value by clicking on the corresponding cells:



The cell value must have the same type as the corresponding port. If the port has an enumerated type, the cell allows to select a value among the values of the list. For instance in the following figure, we assume that Input1 has the type int and Output has the type boolean:



This row means that if Input1 receives the value 0 and Input2 receives no value, then Output is set to true. A table row can be removed by clicking the "-" left to it. In addition to the usual values, we can also use a star "*" in a condition column, to denote "any value":



The second row specifies that the result should be false if Input1 does not receive any message, whatever is the value of Input2. As many rows as required can be added, for instance:



As this figure shows, the output column can contain complex expressions instead of constants: here the fifth row sets the output to Input1-Input2. If many rows can apply, only the first one will be executed, and if some situation corresponds to no row then nothing happens. Checking whether a table is deterministic or complete can be achieved automatically using the dedicated analysis tools.

Table State Editor



Simulation a Transition Table

The table specification can be simulated in the AF3 Simulator. If a row is picked for execution, the row will be highlighted.



Nondeterminism Analysis of a Transition Table

Completeness Analysis of a Transition Table