1. Mealy and Moore models are the basic models of state machines.
A state machine which uses
only Entry Actions, so that its output depends on the state, is called a Moore model. A state
machine which uses only Input Actions, so that the output depends on the state and also on
inputs, is called a Mealy model.
2. What is Mealy and Moore model?
In the theory of computation, a Mealy machine is a finite-state machine whose output values
are determined both by its current state and the current inputs. (This is in contrast to
a Moore machine, whose output values are determined solely by its current state.)
3. State machine model State machine model- Assumed that there are states and state transition
functions, which produce the states. A state transition function is a function, which changes a
state to its next state.
4. Examples of States-
--Three states in a washing machine: ‘Washing, ‘Rinsing and Drying,
--A telephone process five states: Idle, Receiving a ring, Dialing, Connected and Exchanging
messages.
--States of a process (function or interrupt service routine (ISR) or task: Idle, Running, Blocked,
Finished
Common computation models:
Sequential program model:-Statements, rules for composing statements, semantics for executing
them.
Communicating process model-Multiple sequential programs running concurrently.
State machine model-For control dominated systems, monitors control inputs, and sets control
outputs.
Dataflow model-For data dominated systems, transforms input data streams into output streams.
Object-oriented model-For breaking complex software into simpler, well-defined pieces.
• Introductory example: An elevator controller-Simple elevator controller
– Request Resolver resolves various floor requests into single requested floor
– Unit Control moves elevator to this requested floor
– “Move the elevator either up or down to reach the requested floor. Once at the
requested floor, open the door for at least 10 seconds, and keep it open until the
requested floor changes. Ensure the door is never open while moving. Don’t change
directions unless there are no higher requests when moving up or no lower requests
when moving down…”
–
Finite-state machine (FSM) model