Chapter 51. State Machine

Model a system as a set of explicit states with transitions between them.

image

Many systems react to stimuli differently, depending on some internal property. Sometimes it’s useful to classify these different internal states and describe both the differences in response and what causes the system to move between these states. A State Machine can be used to describe and perhaps to control this behavior.

51.1 How It Works

State Machines are a common thing to find both in software and in discussions about software—which is why I used a State Machine in the opening example for this book. The degree to which a State Machine ...

Get Domain Specific Languages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.