Software

The number of software tools for defining and analysing state automata is huge, as is the number of domains of application of this modelling concept. As we are leaning towards the control systems domain, we first encounter the tools produced by The Mathworks company (Matlab and Simulink)

(Open)Modelica

A popular modelling language for physical systems is Modelica. Starting with version 3.3 (several years ago already), it has a support for state machines, see Chapter 17 in the language specification and the screenshot in Fig 2 below. A readable introduction to state machines in Modelica is in [1].

Figure 2: Screenshot of a state machine diagram in Modelica

Several implementations of Modelica language and compiler exist. On the FOSS side, OpenModelica is a popular choice. Slides from an introdutory presentation [2] about state machines in OpenModelica are available for free download.

UPPAAL

Dedicated software for timed automata. Not only modelling and simulation but also formal verification. Available at https://uppaal.org/. In our course we will only use it in this block/week. A tutorial is [3].

Python

SimPy – discrete-event simulation in Python. We are not going to use it in our course, but if you are a Python enthusiast, you may want to have a look at it.

Julia

Two major packages for discrete-event simulation in Julia are:

UML/SysML

If you have been exposed to software engineering, you have probably seen UML diagrams. Their extension (and restriction at the same time) toward systems that also contain hardware is called SysML. And SysML does have support for defining state machines (by drawing the state machine diagrams), see the screenshot in Fig 3 below.

Figure 3: Screenshot of a state machine diagram in SysML

SysML standard also augments the original concept of a state automaton with hierarchies, and some more. But we are not going to discuss it here. Should you need to follow this standard in your project, you may consider exploring some free&open-source (FOSS) tool for creating SysML diagrams such as Modelio or Eclipse Papyrus. But we are not going to use them in our course.

Drawing tools

Last but not least, you may want only to draw state automata (state machines). While there is no shortage of general WYSIWYG drawing and diagramming tools, you may want to consider Graphviz software that processes text description of automata in DOT language. This is what I used in this lecture. As an alternative, but still text-based, you may want to give a try to Mermaid, which can also draw what they call state diagrams.

If you still prefer WISYWIG tools, have a look at IPE, which I also used for some other figures in this lecture and in the rest of the course. Unlike most other tools, it also allows to enter LaTeX math.

Back to top

References

[1]
H. Elmqvist, F. Gaucher, S. E. Mattson, and F. Dupont, “State Machines in Modelica,” in Proceedings of 9th International MODELICA Conference, Munich, Germany, Sep. 2012, pp. 37–46. doi: 10.3384/ecp1207637.
[2]
B. Thiele, “State Machines in OpenModelica - Current Status and Further Development.” Feb. 2015. Available: https://openmodelica.org/images/docs/openmodelica2015/OpenModelica2015-talk14-OMStateMachines_Bernhard%20Thiele.pdf
[3]
G. Behrmann, A. David, and K. G. Larsen, “A Tutorial on Uppaal,” in Formal Methods for the Design of Real-Time Systems, M. Bernardo and F. Corradini, Eds., in Lecture Notes in Computer Science, no. 3185., Berlin, Heidelberg: Springer, 2004, pp. 200–236. doi: 10.1007/978-3-540-30080-9_7.