© Jennifer M. Kohnke
Finite state automata are among the most useful abstractions in the software arsenal and are almost universally applicable. They provide a simple and elegant way to explore and define the behavior of a complex system. They also provide a powerful implementation strategy that is easy to understand and easy to modify. I use them in all levels of a system, from controlling the high-level GUI to the lowest-level communication protocols. We studied the notation and basic operation of FSMs in Chapter 15. Now let's look at the patterns for implementing them. Consider the subway turnstile in Figure 36-1 once again. Figure 36-1. Turnstile FSM that covers abnormal events
|