Finite-state machine - Wikipedia, the free encyclopedia ... - Ex-ch.com
Finite-state machine - Wikipedia, the free encyclopedia ... - Ex-ch.com
Finite-state machine - Wikipedia, the free encyclopedia ... - Ex-ch.com
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Finite</strong>-<strong>state</strong> <strong>ma<strong>ch</strong>ine</strong> 4<br />
More details about <strong>the</strong> differences and usage of Moore and Mealy models, including an executable example, can be<br />
found in <strong>the</strong> external te<strong>ch</strong>nical note "Moore or Mealy model?" [1]<br />
Determinism<br />
A fur<strong>the</strong>r distinction is between deterministic (DFA) and non-deterministic (NDFA, GNFA) automata. In<br />
deterministic automata, every <strong>state</strong> has exactly one transition for ea<strong>ch</strong> possible input. In non-deterministic automata,<br />
an input can lead to one, more than one or no transition for a given <strong>state</strong>. This distinction is relevant in practice, but<br />
not in <strong>the</strong>ory, as <strong>the</strong>re exists an algorithm whi<strong>ch</strong> can transform any NDFA into a more <strong>com</strong>plex DFA with identical<br />
functionality.<br />
The FSM with only one <strong>state</strong> is called a <strong>com</strong>binatorial FSM and uses only input actions. This concept is useful in<br />
cases where a number of FSM are required to work toge<strong>the</strong>r, and where it is convenient to consider a purely<br />
<strong>com</strong>binatorial part as a form of FSM to suit <strong>the</strong> design tools.<br />
UML <strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s<br />
The Unified Modeling Language has a very ri<strong>ch</strong><br />
semantics and notation for describing <strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s.<br />
UML <strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s over<strong>com</strong>e <strong>the</strong> limitations of<br />
traditional finite <strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s while retaining <strong>the</strong>ir<br />
main benefits. UML <strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s introduce <strong>the</strong> new<br />
concepts of hierar<strong>ch</strong>ically nested <strong>state</strong>s and orthogonal<br />
regions, while extending <strong>the</strong> notion of actions. UML<br />
<strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s have <strong>the</strong> <strong>ch</strong>aracteristics of both Mealy<br />
<strong>ma<strong>ch</strong>ine</strong>s and Moore <strong>ma<strong>ch</strong>ine</strong>s. They support actions<br />
Fig. 5 UML <strong>state</strong> <strong>ma<strong>ch</strong>ine</strong> example (a toaster oven)<br />
that depend on both <strong>the</strong> <strong>state</strong> of <strong>the</strong> system and <strong>the</strong> triggering event, as in Mealy <strong>ma<strong>ch</strong>ine</strong>s, as well as entry and exit<br />
actions, whi<strong>ch</strong> are associated with <strong>state</strong>s ra<strong>the</strong>r than transitions, as in Moore <strong>ma<strong>ch</strong>ine</strong>s.<br />
Alternative semantics<br />
There are o<strong>the</strong>r sets of semantics available to represent<br />
<strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s. For example, <strong>the</strong>re are tools for<br />
modeling and designing logic for embedded<br />
controllers [3]<br />
. They <strong>com</strong>bine hierar<strong>ch</strong>ical <strong>state</strong><br />
<strong>ma<strong>ch</strong>ine</strong>s, flow graphs, and truth tables into one<br />
language, resulting in a different formalism and set of<br />
semantics [4] . Figure 6 illustrates this mix of <strong>state</strong><br />
<strong>ma<strong>ch</strong>ine</strong>s and flow graphs with a set of <strong>state</strong>s to<br />
represent <strong>the</strong> <strong>state</strong> of a stopwat<strong>ch</strong> and a flow graph to<br />
Fig. 6 Model of a simple stopwat<strong>ch</strong> [2]<br />
control <strong>the</strong> ticks of <strong>the</strong> wat<strong>ch</strong>. These <strong>ch</strong>arts, like Harel's original <strong>state</strong> <strong>ma<strong>ch</strong>ine</strong>s [5] , support hierar<strong>ch</strong>ically nested<br />
<strong>state</strong>s, orthogonal regions, <strong>state</strong> actions, and transition actions [6] .