# Virtual finite automaton

VFSM execution in the virtual environment

A finite state machine , defined in a virtual environment , called virtual finite state machine ( English virtual finite state machine , VFSM). VFSM is a specification technique used to describe the behavior of logical systems using input control properties and output actions .

VFSM introduces a logic execution model and enables the realization of an executable specification. This technology is mainly used in complex machine controls, measurement technology and telecommunications applications.

## Control properties

A variable in the environment of a VFSM can have one or more values ​​that are relevant for the control - then it is an input variable . These values ​​are called the control properties of this variable. The control properties are not necessarily specific data values, but mostly specific states of the variable. For example, a digital variable can have the control property TRUE or FALSE, but also UNKNOWN, depending on the possible Boolean data values. A numeric analog variable has control properties such as LOW, GOOD, HIGH or UNKNOWN according to the specified value range. One timer will have OVERFLOW as the most important control property, others could be STANDING or RUNNING.

## Actions

A variable in the vicinity of a VFSM can be activated by actions - then it is an output variable. For example, a digital variable knows two actions: true and false. A numeric analog variable has one action: setting. A timer, which is an input and output variable at the same time, can be activated by actions such as start, stop or reset.

## Virtual environment

The virtual environment characterizes an environment in which the VFSM works and which is defined by three sets of names:

• Input names represent the control properties of all variables
• Output names represent all possible actions that can be taken on the variables
• State names as defined for the states of the FSM

The input names are used to build virtual conditions and to control state transitions and input actions. The virtual conditions are created with the help of Positive Logic Algebra. The output names are used to trigger actions (input actions, output actions, input actions and transition actions).

## Positive Logic Algebra

The Boolean operators AND and OR are used to build virtual conditions . The NOT operator is not allowed because the input names cannot be negated, even if they obviously describe Boolean variables. They just exist or they don't exist.

## VFSM execution model

VFSM execution: flowchart

A subset of all defined input names that can only exist in a certain situation is called a virtual input (virtual input, VI). For example, the temperature can be either too low , good, or too high . Although three input names are defined, only one of them can exist in any given situation. This name belongs to the VI.

A subset of all defined output names that can only exist in a certain situation is referred to as virtual output (virtual output, VO). VO consists of the current actions of the VFSM.

The specification of the behavior, which includes all states of the VFSM, is described by a state table.

VFSM execution is determined by VI and its current state. VO is set taking into account the specification of the behavior of the current state.

The graphic shows a possible implementation of the VFSM version. A typical behavior of the system results from the implementation.

## State table

A state table defines all the details of a state of a VFSM. It consists of three columns: in the first column state names are used, in the second column the virtual conditions are built from input names with the help of Positive Logic Algebra and in the third the output names appear.

State name Condition VI Action VO
Current state Entry promotion Issue action
Exit action Issue action
Virtual condition Issue action
... ...
Next state Virtual condition Issuing action (s)
Next state Virtual condition Issuing action (s)
... ... ...
State table

The table is read as follows: the first two lines define the input and output actions of the current status. The following lines for the same status represent the input actions. The lines for further states describe their state transitions and transition actions. All fields are optional.

A combinatorial VFSM is built using only the lines for the input actions. The transition actions can be replaced by using the other actions accordingly.

## Tools

• StateWORKS - An implementation of the VFSM concept