Slide 9 of 14
Notes:
All the behaviour in SDL is represented by process agents. A complete SDL system is a set of communicating process agents. Block agents provide structure. The processes and communication paths provide interfaces to/from the processes. Each process is a state machine. The simplest processes (with no data variables) are finite state machines.
The essence of a finite state machine is that it has states, and responds to a stimulus by changing states. For a simple finite state machine the only information stored by the machine is the current state. The behaviour of the machine is characterised by Outputs the machine generates when moving from one State to another (possibly the same) State. A transition to another state or the same state occurs whenever a stimulus (Input in SDL) is consumed. A transition is denoted by a directed graph from the Input symbol attached to (and part of) the State via actions (such as Outputs) to the next State.
In SDL process agents are extended finite state machines. The simple finite state machine is extended by adding data variables. This enables Decisions to be made in transitions based on the value associated with a variable so that the state which follows when a specific input is consumed is not only determined by the existing state and input. A decision may also use information passed in signals. The values of variables can be changed in a Task by assignments.
The consequence is that the machine can exhibit a much richer behaviour than a simple finite state with the same number of states. The simple finite state machine equivalent to an extended machine with only a few variables or signal parameters would be too large and complex to be understandable, whereas the behaviour of the extended machine can be easily followed.
An extended finite state machine can also represent behaviour that is impossible for a simple machine if one or more variables or parameters has one of an infinite number of values, for example, if a parameter is an integer. Although such machines can be specified, they cannot be implemented as a real machine cannot handle infinite numbers of states.
Another extension that SDL makes to simple finite state machines is that the signals received by the machine are queued. This resolves the question about what happens if a signal arrives while the machine is in a transition. All signals that can be received by a process agent are put into its input queue.