300 likes | 459 Views
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.
E N D
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) !
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 = S1S2 • (s01 , s02 ) • Act = Act1Act2 • X = X1X2 • I(s1, s2) = I1(s1)I2(s2)
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, 12, Y1Y2, (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’))→.
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 TSTTSas 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.
The Reductions. Both the set of states and actions are infinite. TTS Semantics TSTTS Time abstraction Finite set of actions but infinite set of states. TATTS Quotient via stable equivalence relation of finite index. Regions RTS Both states and actions are finite sets.
The Reductions. Both the set of states and actions are infinite. TTS Semantics TSTTS RTS is computed directly from TTS (a finite object) s is reachable in TTS iff the corresponding state is reachable in RTS. Finite set of actions but infinite set of states. TATTS Regions RTS Both states and actions are finite sets.
The Reductions. Both the set of states and actions are infinite. TTS Semantics TSTTS Finite set of actions but infinite set of states. TATTS Regions RTS Both states and actions are finite sets.
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 • SAct RS • TSTTS is an infinite transition system!
The Reductions. Both the set of states and actions are infinite. TTS Semantics TSTTS Finite set of actions but infinite set of states. TATTS Regions RTS Both states and actions are finite sets.
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
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.
The Reductions. Both the set of states and actions are infinite. TTS Semantics TSTTS Finite set of actions but infinite set of states. TATTS Regions RTS Both states and actions are finite sets.
Bisimulation • Finite index bisimulation relation • Used to quotient a big transition system into small one. • big --- infinite • small ---- finite.
Bisimulation • 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’. a a a a
s t a Stable Equivalence Relation s t a a Implies s’ s’ t’
s t s t a a a s’ t’ t’ Stable Equivalence Relation Implies
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.
An Example a b a b a b 1 2 3 4 5 6 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]
The Quotient Transition System • 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. a a
An Example a b a b a b 1 2 3 4 5 6 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] a [5] [8] b
The Reductions. Both the set of states and actions are infinite. TTS Semantics TSTTS Finite set of actions but infinite set of states. TATTS Regions RTS Both states and actions are finite sets.
Equivalence based on Regions. • TA = (S, S0, Act, ) • SxS , a bisimulation of finite index. • (s, V) (s’, V’) iff • s = s’ • V Reg V’ • V and V’ belong to the same clock region.