FSM

A Finite State Machine (FSM) is a device or model that allows certain behaviors at certain times called states. Designers often need to describe the temporal aspects of a system. It is called "finite" because there are usually a small fixed number of states. However, each state can be decomposed into another state machine. An FSM or just "state machine" can be represented as a diagram or a table.

STD

A State Transition Diagram illustrates the transition from state to state with lines representing transition events connecting rectangular blocks with rounded corners representing states.


Mower STD.gif

Each FSM has a minimum of two states named Initial and Final. This can go on to any depth necessary to describe the temporal aspects of a system. There are two general classes of FSM which have complimentary notations. Each can be derived from the other. We will limit our consideration to one of the types.

Machine States

A machine can be said to be in a state where certain behaviors or functions are performed. Then an event occurs and causes the machine to change to another state where other behaviors are possible. This goes on from the time the machine is caused to exist until it ceases to exist. A State Transition Table (STT) has only 4 columns but can describe almost any sequence of behaviors imaginable.

From State  Event  Action  To State 
Initial  Labor  Kicking(), Turning()  Birthing 
Birthing  Born  Educate(), Work(), Retire()  Living 
Living  Excitement  Enjoy(), Fear()  High 
Living  Disease  Fear(), Pain()  Illness 
Living  Tragedy  Fear(), Pain(), Remorse()  Dying 
Illness  Recovery  Relief()  Living 
Dying  Death  walktolight()  Final 

Either a table or a diagram completely describes the valid transitions of a state machine.

Alternatives

Use Cases, Sequence Diagrams and Scenarios are each individual paths through the state machine and do not comprehensively cover the behavior of a system. Not all systems can be completely described by a state machine. These are said to be stochastic, or indeterminate or nondeterministic. Even so, much of a systems behavior can be modeled in an FSM. The actual behavior of relatively simple state machines is not predictable if the events are rich enough.

Back | Next | Events | States



Copyright Spidel Tech Solutions, Inc. 2004 All Rights Reserved.  Updated: 7/11/2009 12:26:45 AM Idx: 1212 Site Design STS

This site is the home of Spidel School of Design
Please visit the Spidel Tech Blog.