CMU 15-671Models of Software SystemsFall 1995
Variations on State Machines
Garlan & Wing Handout 5 20 September 1995
The state machine model presented in the previous handout is not suitable, appropriate, or natural for modeling all systems. In this handout we look at different variations of the basic model I've presented so far.
Which model you choose to use depends on what you are trying to model. You certainly want to choose one that allows you to state as precisely and concisely those things you care about. Some models may make distinctions that you don't care about; some may make assumptions that don't fit your problem. But sometimes which you choose is just a matter of taste. When you decide what model to use you should understand why you are choosing one over another.
Given a state machine, , in the first three sections, I am going to refine some of M's components. First I'm going to give more structure to states in S (Section 1), then to actions in A (Section 2), and then generalize the functionality of (Section 3). In the fourth section I show how all these things can be used together.
Finally, in the last two sections I discuss other refinements of state machine models that are often seen in practice.