Finite automata debugger
Page in progress. |
Creating models based on finite automata is an efficient way to describe complex discrete logic. To simplify the analysis of such automata and to provide control over their behaviour, Engee has a built-in debugger that allows you to trace the execution step by step and detect errors of the finite automaton.
The debugger is available inside the Chart block and is enabled by setting a Breakpoint for state and/or transition
:
Breakpoints appear as red markers (or grey
, if disabled).
Breakpoints is a key tool of the finite automaton debugger, which can be used to set conditions for stopping the execution of the model. This allows you to investigate the behaviour of the model at a particular step of the finite automaton execution. Thus, breakpoints can be used to:
-
Control the simulation of the finite automaton step by step;
-
View the values of variables at a particular step;
-
Analyse when and which states become active or terminate;
-
Check if Groups of state machine operators (for entry, during and exit groups) are executed;
-
Analyse the validity of transitions, including transitions with temporal logic, edge tracking and change indicators operators;
-
And diagnose hidden logic errors and unstable states that do not appear in the model output.
Working with breakpoints
Breakpoints can be set to:
-
States
- on entry, during execution, and on exit;
-
Transitions
- when checking a condition or before executing a transition.
To add a breakpoint to the state or transition
, left-click on the required element and then on the breakpoint icon that appears. The active breakpoint will be marked with a red marker:
You can set different types of breakpoints for states and transitions. To do this, click on the breakpoint with the left mouse button:
In states |
At transitions |
|
|
The selected types will be displayed when you move the cursor over the breakpoint:


Any combination of checkboxes can be enabled - depending on which state/transition operation point is to be monitored. If all check boxes are unchecked, the breakpoint will be deleted.
To temporarily disable a breakpoint (leaving it on the state/transition but without triggering), click the breakpoint icon again:
Breakpoint List
To switch to the breakpoint list, left-click on an already created breakpoint and select Breakpoint List:
This opens a list of all breakpoints of the finite automaton model:
Through the list of breakpoints you can:
-
Track which breakpoints were triggered during the simulation of the model and the number of times they were triggered. The number of actuations is shown in the column "Actuations". The triggered breakpoint will be highlighted in green:
-
Delete a breakpoint by left-clicking on it in the list and clicking on the Delete breakpoint icon
.
-
Add a breakpoint by clicking on it in the list with the left mouse button and clicking on the Add breakpoint icon
. In the window that opens, select the required parameters - trigger type and, if necessary, condition:
-
Enable/disable breakpoint - to do this, control the checkboxes
at the corresponding points.
-
Specify a condition for the breakpoint by entering an expression in the "Condition" column against the desired row. For example,
y > 5
or(y == 0) & (n > 5)
. Conditions can specify logical expressions supported by finite automata logic. The values of inputs, outputs, and all variables available in the Chart block are used for them.
Control of model execution
Step-by-step execution is only available within the Chart block and does not affect the global execution of the model in the workspace. When you exit the Chart block, the panel is hidden and Engee returns to normal simulation mode. |
After setting the first breakpoint inside the Chart block, a step-by-step simulation control panel will appear in the upper left corner of the canvas:
Three run control commands are available:
-
Step In
- moves to the next execution step within the current state or transition. The command executes the details of a finite automaton element in steps. It can be:
-
Entering the finite automaton diagram;
-
Checking the transition conditions;
-
Execution of transition actions;
-
Activating a state;
-
Executing groups of
entry
,during
orexit
operators; -
Transition to child states or nested Transition graphs.
-
-
Step Over
- Executes the current step in its entirety, without going to internal parts. The command is used to sequentially pass through the key execution steps of a finite automaton:
-
Activation of the finite automaton;
-
State transition;
-
Checking for available transitions;
-
Execution of transition actions;
-
Execution of state actions.
-
-
Step Out
- terminates the execution of the current state, transition, child state or nested transition graph and returns to the higher level of execution. The command allows you to exit the current level of nesting and continue execution of the automaton at the level from which the input was performed.
To visually track the current stage of execution of the automaton model, highlighting is used - the active element is highlighted in green colour during execution both in the model itself and in the list of breakpoints:
In addition to highlighting with colour, the system also provides hints in the form of icons, when you move the cursor over them, an auxiliary message pops up as to how exactly the model was executed at the current step:
-
Before entering a state
-
Inside the state
-
Before leaving a state
-
Before checking transition conditions
-
Before transition
For example:
Viewing and editing variables
During a step-by-step simulation of a finite automaton, you can not only observe which states and transitions are activated, but also monitor the values of the variables used inside the Chart block.
To do this, open settings window of the Chart block - it displays all available variables.
In this window you can:
-
View the current values of the variables at each step;
-
See the changes in values - they are highlighted in green, similar to the list of breakpoints;
-
Manually change the values of some variables directly while the model is stopped.
Editing variable values is only available during a simulation pause and when there is an active breakpoint.
*To change the value of a variable:
-
Move the cursor over the desired row in the "Value" column;
-
Click on the current value;
-
Enter the new value and press Enter.
The local variables and output signals can be changed. The values of the input signals are set from the external modelling environment (outside the Chart block). |