Database Reference
In-Depth Information
Some of the general principles of statemate semantics are as follows:
1.
Reactions to external and internal events, and changes that occur in a step, can be
sensed only after completion of the step.
2.
Events are “live” for the duration of one step only, the one following that in which
they occur, and are not “remembered” in subsequent steps.
3.
Calculations in one step are based on the situation at the beginning of the step (e.g.,
the states the system was in, the activities that were active, and the values of conditions
and data-items at that time). Updates of data items only occur at the end of a step.
4.
A maximal subset of non-confl icting transitions is always executed.
Item 3 deserves more explanation. As an example, suppose there is an action:
“X := X + 1; Y := X * 5”, which is executed in a step. Further suppose that X is equal to
4 at the beginning of the step. Because of Item 3, after executing the step, X becomes 5 and
Y becomes 20. Note that every computation of the action does not infl uence any other com-
putation of the action. The semicolon separating the actions means, “do this too” rather
than “and then do” in statemate semantics.
Using activity diagrams to model workfl ows is discussed in Chapter 19 in Booch, Rum-
baugh, and Jacobson (1999). Note that activity diagrams are special statecharts in which all
Figure 2: Exponential growth of states
Search WWH ::




Custom Search