Parallel composition, reduction
description
Transcript of Parallel composition, reduction
![Page 1: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/1.jpg)
1
Parallel composition, reduction
CS5270
![Page 2: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/2.jpg)
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) !
![Page 3: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/3.jpg)
3
An Example.
![Page 4: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/4.jpg)
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)
![Page 5: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/5.jpg)
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’)) →.
![Page 6: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/6.jpg)
6
The Gate-Train Example
![Page 7: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/7.jpg)
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.
![Page 8: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/8.jpg)
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
![Page 9: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/9.jpg)
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
![Page 10: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/10.jpg)
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
![Page 11: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/11.jpg)
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!
![Page 12: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/12.jpg)
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
![Page 13: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/13.jpg)
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
![Page 14: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/14.jpg)
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.
![Page 15: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/15.jpg)
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
![Page 16: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/16.jpg)
16
Quotienting
![Page 17: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/17.jpg)
17
Quotienting
![Page 18: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/18.jpg)
18
Quotienting
![Page 19: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/19.jpg)
19
Quotienting
![Page 20: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/20.jpg)
20
Quotienting …. ?
![Page 21: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/21.jpg)
21
Bisimulation
• Finite index bisimulation relation – Used to quotient a big transition system into
small one.• big --- infinite• small ---- finite.
![Page 22: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/22.jpg)
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
![Page 23: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/23.jpg)
23
Stable Equivalence Relation
s’
s t
a
s’
s t
a
t’
aImplies
![Page 24: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/24.jpg)
24
Stable Equivalence Relation
s t
t’
a
s’
s t
a
t’
aImplies
![Page 25: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/25.jpg)
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.
![Page 26: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/26.jpg)
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]
![Page 27: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/27.jpg)
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
![Page 28: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/28.jpg)
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
![Page 29: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/29.jpg)
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
![Page 30: Parallel composition, reduction](https://reader035.fdocuments.in/reader035/viewer/2022070405/56813fe9550346895daadcc1/html5/thumbnails/30.jpg)
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.