Previous Contents

B   Semantics

The section informally describes the semantics of Sequential Function Charts (SFC's), as realized in the tool Slime. The semantics is defined for successfully checked SFC's (cf. Section 4); unchecked SFC's don't have a meaning. Especially, the simulator, which realizes the semantics, can assume checked syntax.

B.1   Sequential Function Charts

We explain the semantics with the help of the example from Figure 1.






Figure 1: SFC


The SFC's consist of nodes, called steps, to which actions are associated, and transitionen between steps, decorated with boolean guards. Always, one ore more of the steps are active and the actions associate with this active steps are executed within one cylcle. The transition from s1 to both s2 and s3 (with double horizontal line) is a parallel branching: if this transition is taken, s1 is deactivated and both s2 and s3 get activated.

The topmost step (marked specifically) is initial. The ''N'' on the left-hand side of the actions is a qualifier, stating that the action is to be executed in each cycle in which the step is active. There are other qualifiers, too, but we neglect them for the teme being, Qualifier, die wir aber erst einmal vernachlässigen.

The behavior of an SFC during one cycle is as follows.
  1. reading inputs from the environment
  2. executing the actions from the active steps
  3. evaluate the guards
  4. take transition(s) (if possible)
  5. write outputs
The cycle is executed repeatedly. The parts for reading inputs and writing outputs are irrelevant for us, as we consider closed systems ony, i.e., systems whose variables are changed only by the system itself, but not by the outside.

Each transition is equipped by a guard, i.e., a boolean expression. A transition can be taken only if the guard evaluates to true.

If more than one step is active in a parallel branch, the execution of the corresponding action is chosen non-deterministically. This means, they can be executed in an arbitrary order (interleaving semantics). Consequently, a program may have a number of different execution runs. The simulator could realize the different runs in that it asks the user, in which order the actions should be performed. An alternative is, to determie the order by a random generator.

The transition from s4 and s5 to s8 closes the parallel branch again. Such a transition can be taken only, if all source, steps are active. In other words, this transition can be taken if it's guard evaluates to true and furthermore both s4 und s5 are active.

B.2   States

The global state of a program is given by the assignment to all variables and the set of all active steps.



last generated April 22, 2002 (©Public License)
Previous Contents