Transcript Document
CS 367: Model-Based Reasoning
Lecture 3 (01/17/2002)
Gautam Biswas
Today’s Lecture
Lecture 2 (01/15): Modeling Paradigms;
Discrete Time versus Discrete Event
Systems
Topic 1(2-3 weeks): Discrete Event
Modeling of Systems (ref: S. Lafortune, et
al. – Automata based models)
Discrete Event Languages
Automata
State Evolution in DES
Sequence of states visited
Associated events cause the state transitions
Formal ways for describing DES behavior,
i.e., what is a language for describing DES
behavior?
Automata
Petri Nets
Languages for DES behavior
Simplest: a timed language where timing
information has been deleted
untimed modeling formalism defined by event
sequence: e1 e2 …… en
Timed Language: set of all timed sequences of
events that the DES can generate/execute
(e1,t1) (e2,t2) …… (en,tn)
Stochastic Timed Language: a timed langauge
with a probability distribution function defined
over it
Discrete Event Modeling Formalisms
State-based: define a state space and specify a
state-transition structure:
(out_state, event, in_state) triples
e.g., Automata and Petri Nets
Trace-based: based on (recursive) algebraic
expressions
e.g., Communicating Sequential Processes (CSPs)
We will study modeling, analysis, and supervisory
control with untimed and timed automata
Automaton Model for two philosophers
Notion of parallel composition
Recursive Equation Model: Two
philosopher problem
Language defined on event set
Starting point of DES: event set, E : alphabet of
language
E = {e1, e2, …., en}
s: finite sequence of events from E: word or string
s1 = e2e3e1e1e10
(includes repititions)
= empty strings length of s
Operations:
Concatenation: s2 = e5e3 then s1 s2 = e2e3e1e1e10 e5e3
s=tuv
t is prefix; u is substring; v is suffix
Kleene-closure; Prefix-closure
Automata
Device for representing language as a set of
well-defined rules
Represented as directed graph: nodes are
states and labeled arcs represent transitions
f : X E X
X {x, y, z} E {a, b, g}
f ( x, a ) x
f ( y, a) x
f ( x, g ) z
f ( y , b) y
f ( z , b) z
f ( z, a) f ( z, g ) y
Initialstate : x Marked states : x, z
Deterministic Automata
G ( X , E , f , , x0 , X m )
X : set of states
E : finite set of events associated with transitions
f : X E X transition function f ( x, e) y
: X 2 E feasible(active) event function
x0 : initial state
X m X : set of m arkedstates
-- Which states to mark: modeling issue
Deterministic versus non deterministic
Note: f is a partially defined function
is derived from f
Operation of Automata
Start at x0.
Occurrence of event e (x0) E causes
transition to state f(x0,e) X
Process continues based on transitions for
which f is defined
Language generated by Automata
L(G) {s E : f ( x0 , s) is defined}
*
Lm (G) {s L(G) : f ( x0 , s) X m }
Automata G1 and G2 are equivalent if
L(G1 ) L(G2 )
and
Lm (G1 ) Lm (G2 )
Examples of Equivalent Automata
Blocking Automata
Automata G can reach state x, but (x) = but x
xm
This is called deadlock because no further events
can be executed
System blocks when it enters deadlock state
When we have set of unmarked states that form
strongly connected component – Livelock
States are reachable from one another but there is
no transition out of them
Example of Deadlock and
Livelock