This preview shows pages 1–3. Sign up to view the full content.
Finite State Machines
Statecharts
SyncCharts (Safe State Machines)
Modeling/Distributed RT Systems—Lecture 2
Prof. Dr. Reinhard von Hanxleden
ChristianAlbrechts Universit¨
at Kiel
Department of Computer Science and Applied Mathematics
RealTime Systems and Embedded Systems Group
12 April 2005
Last compiled: 12th April 2005, 12:27 hrs
Statecharts I
WS 2004/05
Modeling/Distributed RT Systems—Lecture 2
Slide 1
Finite State Machines
Statecharts
SyncCharts (Safe State Machines)
Overview
Finite State Machines
Finite Automata
Moore Machines
Mealy Machines
Statecharts
Hierarchy
Orthogonality
Broadcast
Compound Events
SyncCharts (Safe State Machines)
States
Transitions
Connectors
Esterel Studio
WS 2004/05
Modeling/Distributed RT Systems—Lecture 2
Slide 2
Finite State Machines
Statecharts
SyncCharts (Safe State Machines)
Finite Automata
Moore Machines
Mealy Machines
Finite Automata
Formally a
ﬁnite automaton
is deﬁned as a ﬁve tuple
(
Q
,
Σ
, δ,
q
0
,
F
) where
Q
is a ﬁnite set of
states
,
Σ
is the
input alphabet
,
q
0
∈
Q
is the
begin state
(
initial state
),
F
⊆
Q
is the set of
ﬁnal states
,
δ
:
Q
×
Σ
→
Q
is the
transition function
.
The transition function gives for every state
q
and every input
symbol
a
the new state
δ
(
q
,
a
) that arises as reaction on the
execution of
a
in state
q
.
WS 2004/05
Modeling/Distributed RT Systems—Lecture 2
Slide 3
These slides are based on material kindly provided by WillemPaul
de Roever and Kai Baukus.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentFinite State Machines
Statecharts
SyncCharts (Safe State Machines)
Finite Automata
Moore Machines
Mealy Machines
State Diagram
For each state, the possible reactions to input that arrives in that
state is speciﬁed by a transition to other states.
WS 2004/05
Modeling/Distributed RT Systems—Lecture 2
Slide 4
Finite State Machines
Statecharts
SyncCharts (Safe State Machines)
Finite Automata
Moore Machines
Mealy Machines
Extensions
±
Restriction of these kind of automata as deﬁned above: they
have an input alphabet but not an output alphabet.
±
There are two ways to extend the above model with output:
1.
Output can be associated with a state (a so called Moore
machine)
2.
or with a transition (a so called Mealy machine).
±
A
Moore machine
is a 6tuple (
Q
,
Σ
,
Δ
, δ, λ,
q
0
) where
Q
,
Σ
, δ,
q
0
are the same as in the deﬁnition of the ﬁnite
automaton,
Δ
is the
output alphabet
and
λ
:
Q
→
Δ
is the
output function
.
±
A
Mealy machine
is also a 6tuple (
Q
,
Σ
,
Δ
, δ, λ,
q
0
) but now
λ
is a function from
Q
×
Σ to Δ.
WS 2004/05
Modeling/Distributed RT Systems—Lecture 2
Slide 5
Finite State Machines
Statecharts
SyncCharts (Safe State Machines)
Finite Automata
Moore Machines
Mealy Machines
Example: Moore Machine
Ready
cup emitted
enter coin
Idle
enter coin
cup removed
action: initialize
Emitting cup
action: emit cup
Pouring coffee
action: pour coffee
±
Moore machine:
output
λ
is associated with every state
±
Mealy machine:
λ
(
q
,
a
) gives output associated with the
transition of state
q
on input
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '09
 PRF.P.BHADURI

Click to edit the document details