Display all states and transitions in the current trace.
Display all states and transitions in the current trace.
Each state has an index, which can be passed to the `:goto` command to go to that state.
Each state has an index, which can be passed to the `:goto` command to go to that state.
The first state (index -1) is always the root state. All other states are reached from the root state by following (previously executed) transitions.
The first state (index -1) is always the root state. All other states are reached from the root state by following (previously executed) transitions.
:trace
:trace
Display all states and transitions in the current trace.
Display all states and transitions in the current trace.
Each state has an index, which can be passed to the `:goto` command to go to that state.
Each state has an index, which can be passed to the `:goto` command to go to that state.
The first state (index -1) is always the root state. All other states are reached from the root state by following (previously executed) transitions.
The first state (index -1) is always the root state. All other states are reached from the root state by following (previously executed) transitions.
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` prob
``` prob
:help :goto
:help :goto
```
```
%% Output
%% Output
```
```
:goto INDEX
:goto INDEX
```
```
Go to the state with the specified index in the current trace.
Go to the state with the specified index in the current trace.
Use the `:trace` command to view the current trace and the indices of its states. Index -1 refers to the root state and is always available.
Use the `:trace` command to view the current trace and the indices of its states. Index -1 refers to the root state and is always available.
Going backwards in the current trace does *not* discard any parts of the trace, so it is possible to go forward again afterwards. However, executing an operation in a state *will* discard any parts of the trace after that state (and replace them with the destination state of the executed transition).
Going backwards in the current trace does *not* discard any parts of the trace, so it is possible to go forward again afterwards. However, executing an operation in a state *will* discard any parts of the trace after that state (and replace them with the destination state of the executed transition).
:goto INDEX
:goto INDEX
Go to the state with the specified index in the current trace.
Go to the state with the specified index in the current trace.
Use the `:trace` command to view the current trace and the indices of its states. Index -1 refers to the root state and is always available.
Use the `:trace` command to view the current trace and the indices of its states. Index -1 refers to the root state and is always available.
Going backwards in the current trace does *not* discard any parts of the trace, so it is possible to go forward again afterwards. However, executing an operation in a state *will* discard any parts of the trace after that state (and replace them with the destination state of the executed transition).
Going backwards in the current trace does *not* discard any parts of the trace, so it is possible to go forward again afterwards. However, executing an operation in a state *will* discard any parts of the trace after that state (and replace them with the destination state of the executed transition).
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` prob
``` prob
:trace
:trace
```
```
%% Output
%% Output
* -1: Root state **(current)**
* -1: Root state **(current)**
-1: Root state (current)
-1: Root state (current)
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` prob
``` prob
:init
:init
```
```
%% Output
%% Output
Machine initialised using operation 0: $initialise_machine()
Machine initialised using operation 0: $initialise_machine()