parallel composition, reduction
DESCRIPTION
Parallel composition, reduction. CS5270. Parallel Composition. TTS = TTS 1 || TTS 2 || …… || TTS n Same principle as before: Do common actions together Take union of clock variables. Take conjunction of the guards (state invariants) !. An Example. The Product Construction. - PowerPoint PPT PresentationTRANSCRIPT
1
Parallel composition, reduction
CS5270
2
Parallel Composition
• TTS = TTS1 || TTS2 || …… || TTSn
• Same principle as before:– Do common actions together– Take union of clock variables.– Take conjunction of the guards (state
invariants) !
3
An Example.
4
The Product Construction
• TTS1 = (S1, s01, Act1, X1, I1, →1)• TTS2 = (S2, s02, Act2, X2, I2, →2)• Assume X1 and X2 are disjoint (rename if
necessary).• TTS = TTS1 || TTS2 = (S, S0, Act, X, I, →)
– S = S1 S2
– (s01 , s02 )
– Act = Act1 Act2
– X = X1 X2
– I(s1, s2) = I1(s1) I2(s2)
5
The Product Construction
• TTSi = (Si, S0i, Acti, Xi, II, →i) i = 1, 2• TTS = TTS1 || TTS2 = (S, S0, Act, X, I, →)• → is the least subset of S Act (X) 2X S
satisfying:– Suppose (s1, a, 1, Y1, s1’) →1 and (s2, b, 2, Y2, s2’) →2. – Case1: a = b Act1 Act2
• Then ((s1, s2), a, 1 2, Y1 Y2, (s1’, s2’)) →.– Case2: a Act1 - Act2
• Then ((s1, s2), a, 1, Y1, (s1’, s2)) → .– Case3: b Act2 - Act1
• Then ((s1, s2), b, 2, Y2, (s1, s2’)) →.
6
The Gate-Train Example
7
What We Need to Do
• Problem: – We need to analyze the timed behavior of a TTS.– The timed behavior of TTS is given by TSTTS – But TSTTS is an infinite transition system!
• Solution:– Represent TSTTS as a finite transition system.– How?– By using the notion of regions, quotient TSTTS into a
finite transition system RTS.– Using regions we can compute RTS from TTS.– UPPAAL computes a refined version of RTS from
TTS.
8
The Reductions.
TSTTS
TATTS
RTS
Both the set of states and actions are infinite.
Time abstraction
Finite set of actions but infinite set of states.
Quotient via stable equivalence relation of finite index.
Both states and actions are finite sets.
TTSSemantics
Regions
9
The Reductions.
TSTTS
TATTS
RTS
Both the set of states and actions are infinite.
Finite set of actions but infinite set of states.
Both states and actions are finite sets.
RTS is computed directly from TTS (a finite object)
s is reachable in TTS iff the corresponding state is reachable in RTS.
TTSSemantics
Regions
10
The Reductions.
TSTTS
TATTS
RTS
Both the set of states and actions are infinite.
Finite set of actions but infinite set of states.
Both states and actions are finite sets.
TTSSemantics
Regions
11
Behaviors
• TTS = (S, sin, Act, X, I, )
• We associate a “normal” transition system with TTS while taking time into account:– TSTTS = (S, sin, Act R, )
– R, non-negative reals• S Act R S
• TSTTS is an infinite transition system!
12
The Reductions.
TSTTS
TATTS
RTS
Both the set of states and actions are infinite.
Finite set of actions but infinite set of states.
Both states and actions are finite sets.
TTSSemantics
Regions
13
Time Abstraction
• TTS = (S, S0, Act, X, I, ) s S
• TSTTS = (S, S0, Act R, ))
• TATTS = (S, S0, Act, ) where :
– (s, V) (s’, V’) iff there exists such that
– (s, V) (s, V+) in TS and
– (s, V+) (s’, V’) in TS.
a
a
14
Time Abstraction
• TTS = (S, S0, Act, X, I, ) s S
• TSTTS = (S, sin, Act R, ))
• TATTS = (S, sin, Act, )
• FACT: s is reachable in TTS (TS) iff s is reachable in TA.
• Infinite number of states but only a finite number of actions.
15
The Reductions.
TSTTS
TATTS
RTS
Both the set of states and actions are infinite.
Finite set of actions but infinite set of states.
Both states and actions are finite sets.
TTSSemantics
Regions
16
Quotienting
17
Quotienting
18
Quotienting
19
Quotienting
20
Quotienting …. ?
21
Bisimulation
• Finite index bisimulation relation – Used to quotient a big transition system into
small one.• big --- infinite• small ---- finite.
22
• TS = (S, sin, Act, )• S x S, an equivalence relation
– s s for every s in S (reflexive)– s s’ implies s’ s (symmetric)– s s’ and s’ s’’ implies s s’’ (transitive) – s t and s s’ implies there exists t’
such that t t’ and s’ t’.– s t and t t’ implies there exists s’
such that s s’ and s’ t’.
Bisimulation
a
a
a
a
23
Stable Equivalence Relation
s’
s t
a
s’
s t
a
t’
aImplies
24
Stable Equivalence Relation
s t
t’
a
s’
s t
a
t’
aImplies
25
Finite Index Bisimulation
• TS = (S, sin, Act, )
a bisimulation.
• s S
• [s]t – the equivalence class containing s.
– {s’ | s s’}
• is of finite index if {[s] | s S} is a finite set.
26
An Example
1 2 3 4 5 6a b a b a b
i j iff (i is odd and j is odd) OR (i is even and j is even).
is a bisimulation of finite index.
{1, 3, 5,….} = [5] {2, 4, 6, ..} = [8]
27
• TS = (S, sin, Act, )
• a bisimulation.
• QTS = (QS, qsin, Act, )
– The - quotient of TS.
– QS = { [s] | s S}
– qsin = [sin]
– [s] [s’] iff there exists s1 [s] and s1’ [s’] such that s1 s1’ in TS.
The Quotient Transition System
a
a
28
An Example
1 2 3 4 5 6a b a b a b
i j iff (i is odd and j is odd) OR (i is even and j is even).
is a stable equivalence relation of finite index.
{1, 3, 5,….} = [5] {2, 4, 6, ..} = [8]
[5] [8]
a
b
29
The Reductions.
TSTTS
TATTS
RTS
Both the set of states and actions are infinite.
Finite set of actions but infinite set of states.
Both states and actions are finite sets.
TTSSemantics
Regions
30
Equivalence based on Regions.
• TA = (S, S0, Act, )
• S x S , a bisimulation of finite index.
• (s, V) (s’, V’) iff– s = s’– V Reg V’
• V and V’ belong to the same clock region.