HOME

TheInfoList



OR:

A virtual finite-state machine (VFSM) is a
finite-state machine A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
(FSM) defined in a
Virtual Environment A virtual environment is a networked application that allows a user to interact with both the computing environment and the work of other users. Email, chat Chat or chats may refer to: Communication * Conversation, particularly casual * Onlin ...
. The VFSM concept provides a software
specification A specification often refers to a set of documented requirements to be satisfied by a material, design, product, or service. A specification is often a type of technical standard. There are different types of technical or engineering specificati ...
method to describe the behaviour of a control system using assigned names of input control properties and output actions. The VFSM method introduces an
execution model A programming language consists of a grammar/syntax plus an execution model. The execution model specifies the behavior of elements of the language. By applying the execution model, one can derive the behavior of a program that was written in term ...
and facilitates the idea of an executable specification. This technology is mainly used in complex
machine control In civil engineering, machine control is used to accurately position earthwork machinery based on 3D design models and GPS systems, and thus aid machine operators to e.g. control the position of a road grader's blade. Many machine control system ...
,
instrumentation Instrumentation a collective term for measuring instruments that are used for indicating, measuring and recording physical quantities. The term has its origins in the art and science of scientific instrument-making. Instrumentation can refer to ...
, and
telecommunication Telecommunication is the transmission of information by various types of technologies over wire, radio, optical, or other electromagnetic systems. It has its origin in the desire of humans for communication over a distance greater than that ...
applications.


Why

Implementing a state machine necessitates the generation of logical conditions (state transition conditions and action conditions). In the hardware environment, where state machines found their original use, this is trivial: all signals are Boolean. In contrast state machines specified and implemented in software require logical conditions that are per se multivalued: * Temperature could be Low, OK, High * Commands may have several values: Init, Start, Stop, Break, Continue * In a
hierarchical control system A hierarchical control system (HCS) is a form of control system in which a set of devices and governing software is arranged in a hierarchical tree. When the links in the tree are implemented by a computer network, then that hierarchical control ...
the subordinate state machines can have many states that are used as conditions of the superior state machine In addition input signals can be unknown due to errors or malfunctions, meaning even digital input signals (considered as classical Boolean values) are in fact 3 values: Low, High, Unknown. A Positive Logical Algebra solves this problem via
virtualization In computing, virtualization or virtualisation (sometimes abbreviated v12n, a numeronym) is the act of creating a virtual (rather than actual) version of something at the same abstraction level, including virtual computer hardware platforms, stor ...
, by creating a Virtual Environment which allows specification of state machines for software using multivalued variables.


Control Properties

A
state variable A state variable is one of the set of variables that are used to describe the mathematical "state" of a dynamical system. Intuitively, the state of a system describes enough about the system to determine its future behaviour in the absence of a ...
in the VFSM environment may have one or more values which are relevant for the
Control Control may refer to: Basic meanings Economics and business * Control (management), an element of management * Control, an element of management accounting * Comptroller (or controller), a senior financial officer in an organization * Controlli ...
—in such a case it is an input variable. Those values are the control properties of this variable. Control properties are not necessarily specific data values but are rather certain states of the variable. For instance, a digital variable could provide three control properties: TRUE, FALSE and UNKNOWN according to its possible boolean values. A numerical (analog) input variable has control properties such as: LOW, HIGH, OK, BAD, UNKNOWN according to its range of desired values. A timer can have its OVER state (time-out occurred) as its most significant control value; other values could be STOPPED or RUNNING.


Actions

Other
state variable A state variable is one of the set of variables that are used to describe the mathematical "state" of a dynamical system. Intuitively, the state of a system describes enough about the system to determine its future behaviour in the absence of a ...
s in the VFSM environment may be activated by actions—in such a case it is an output variable. For instance, a digital output has two actions: True and False. A numerical (analog) output variable has an action: Set. A timer which is both: an input and output variable can be triggered by actions like: Start, Stop or Reset.


Virtual Environment

The virtual environment characterises the
runtime environment In computer programming, a runtime system or runtime environment is a sub-system that exists both in the computer where a program is created, as well as in the computers where the program is intended to be run. The name comes from the compile ...
in which a
virtual machine In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized h ...
operates. It is defined by three sets of names: *input names represent the control properties of all available variables *output names represent the available actions on the variables *state names, as defined for each of the states of the FSM. The input names build virtual conditions to perform
state transition State may refer to: Arts, entertainment, and media Literature * ''State Magazine'', a monthly magazine published by the U.S. Department of State * ''The State'' (newspaper), a daily newspaper in Columbia, South Carolina, United States * ''Our S ...
s or input actions. The virtual conditions are built using the positive logic algebra. The output names trigger actions; entry actions, exit actions, input actions or transition actions.


Positive Logic Algebra

The rules to build a virtual condition are as follows:


Input Names and Virtual Input

A state of an input is described by Input Names which create a
Set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
: * input A: Anames = * input B: Bnames = * input C: Cnames = etc. Virtual Input VI is a set of
mutually exclusive In logic and probability theory, two events (or propositions) are mutually exclusive or disjoint if they cannot both occur at the same time. A clear example is the set of outcomes of a single coin toss, which can result in either heads or tails ...
elements of input names. A VI always contains the element ''always'': VI = VI = VI =


Logical operations on Input Names

& (AND) operation is a set of input names: ''A1'' & ''B3'' & ''C2'' => , (OR) operation is a table of sets of input names: ''A1'' , ''B3'' , ''C2'' => \begin \ \\ \ \\ \ \\ \end ~ (Complement) is a
complement A complement is something that completes something else. Complement may refer specifically to: The arts * Complement (music), an interval that, when added to another, spans an octave ** Aggregate complementation, the separation of pitch-clas ...
of a set of input names: ~''A2'' =


Logical expression

A logical expression is an OR-table of AND-sets (a
disjunctive normal form In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or (in philosophical logic) a ''cluster c ...
): ''A1'' & ''B3'' , ''A1'' & ''B2'' & ''C4'' , ''C2'' => \begin \ \\ \ \\ \ \\ \end
Logical expressions are used to express any logical function.


Evaluation of a logical expression

The logical value (true, false) of a logical expression is calculated by testing whether any of the AND-sets in the OR-table is a
subset In mathematics, set ''A'' is a subset of a set ''B'' if all elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are unequal, then ''A'' is a proper subset of ...
of VI.


Output Names and Virtual Output

A state of an output is described by Output Names which create a set: * output X: Xnames = * output Y: Ynames = Virtual output VO is a set of mutually exclusive elements of output names.


Virtual Environment

The Virtual Name and Virtual Output completed by State Names create the Virtual Environment VE where the behaviour is specified.


VFSM Execution Model

A subset of all defined input names, which can exist only in a certain situation, is called virtual input or VI. For instance temperature can be either "too low", "good" or "too high". Although there are three input names defined, only one of them can exist in a real situation. This one builds the VI. A subset of all defined output names, which can exist only in a certain situation is called virtual output or VO. This is built by the current action(s) of the VFSM. The behaviour specification is built by a state table which describes all details of all states of the VFSM. The VFSM executor is triggered by VI and the current state of the VFSM. In consideration of the behaviour specification of the current state, the VO is set. Figure 2 shows one possible implementation of a VFSM executor. Based on this implementation a typical behaviour characteristics must be considered.


State Table

A ''state table'' defines all details of the behaviour of a state of a VFSM. It consists of three columns; the first column names the state, the second lists virtual conditions built out of input names using the positive logic algebra, and the third column contains the output names: Read the table as following: the first two lines define the entry and exit actions of the current state. The following lines which do not provide the next state represent the input actions. Finally the lines providing the next state represent the state transition conditions and transition actions. All fields are optional. A pure
combinatorial Combinatorics is an area of mathematics primarily concerned with counting, both as a means and an end in obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many ap ...
VFSM is possible in cases only where input actions are used, but no state transitions are defined. The transition action can be replaced by the proper use of other actions.


Tools


StateWORKS
an implementation of the VFSM concept

implements the VFSM concept as a method of "visual scripting" the Unity game engine


References

*Wagner, F., "Modeling Software with Finite State Machines: A Practical Approach", Rosa Fischer-Löw Verlag 1994, *Wagner, F., "The Virtual Finite State Machines: Executable Control Flow Specification", Auerbach Publications, 2006, {{ISBN, 0-8493-8086-3
VFSM Executable Specification
CompEuro 1992 Proceedings
State machine misunderstandings
IEE journal "Computing and Control Engineering", 1997
A Modern Real-Time Software Design Tool: Applying Lessons from Leo
IEE journal "Computing and Control Engineering", 2003
Modelling and Building Reliable, Re-usable Software.
Engineering of Computer -Based Software 2003 (ECBS'03) Proceedings
Closing the Gap Between Software Modelling and Code
Engineering of Computer -Based Software 2004 (ECBS'04) Proceedings

Wagner, T., "VFSMML - XML standard for VFSM", 2004

"The virtual finite‐state machine design and implementation paradigm", Bell Labs Technical Journal / Volume 2, Issue1, 2002 Models of computation