Presentation is loading. Please wait.

Presentation is loading. Please wait.

Equivalences on Labelled Transition Systems Ed Brinksma Course 2004.

Similar presentations


Presentation on theme: "Equivalences on Labelled Transition Systems Ed Brinksma Course 2004."— Presentation transcript:

1 Equivalences on Labelled Transition Systems Ed Brinksma Course 2004

2 © Ed Brinksma/Jan Tretmans Observable Behaviour a aa  a  a ?? ?? ?? “ Some transition systems are more equal than others “

3 © Ed Brinksma/Jan Tretmans a b a  b aa b b  a Observable Behaviour ?? ?? ?? ?? ??

4 © Ed Brinksma/Jan Tretmans Equivalences on Transition Systems Transition systems are studied w.r.t. equivalence classes of behaviour; and there many: S 1  S 2 isomorphism S 1  S 2 strong / weak / branching …… bisimulation S 1  t r S 2 trace equivalence S 1  te S 2 testing equivalence S 1  ready S 2 ready equivalence S 1  Q S 2 queue equivalence S 1  ft S 2 failure (trace) equivalence ………………

5 © Ed Brinksma/Jan Tretmans Isomorphism p  q  "p and q are exactly the same modulo state names" Isomorphism: aa  a    bijection  : S p  S q :  s 1, s 2  S p,    L  {  } : s 1 s 2   (s 1 )  (s 2 )  (s 0 p ) = s 0 q  a s0s0 s1s1 a v u  

6 © Ed Brinksma/Jan Tretmans a b a  b aa b b  a Isomorphism     

7 © Ed Brinksma/Jan Tretmans Comparing Transition Systems S1S2S1S2 environment lSuppose an environment interacts with the systems: nthe environment tests the system as black box by observing and actively controlling it; nthe environment acts as a tester; lTwo systems are equivalent if they pass the same tests.

8 © Ed Brinksma/Jan Tretmans Comparing Transition Systems S1S2 environment e  ? ? S1  S2   e  E. obs ( e, S1 ) = obs (e, S2 )

9 © Ed Brinksma/Jan Tretmans cb a aa c b Equivalence of Transition Systems cb a aa c b b ca a a b a c b ca a c a ab  tr

10 © Ed Brinksma/Jan Tretmans Trace Equivalence S1S2 environment s 1  tr s 2  traces ( s 1 ) = traces ( s 2 ) traces (s) = {   L* | s  }

11 © Ed Brinksma/Jan Tretmans cb a aa c b  c b a  tr Trace Equivalence traces = { ,a,a b,a c }

12 © Ed Brinksma/Jan Tretmans Completed Trace Equivalence p  tr q  traces(p) = traces (q) p  ctr q  Ctraces(p) = Ctraces (q) and traces(p) = traces (q) Reachable states: s after  = { s’ | s  s’ } traces (s) = {   L* | s  } Traces: s after  refuses A   s'  s after  : s' refuses A Refusals: a s refuses A   a  A : s Refusal: Ctraces (s) = {   L* | s after  refuses L } Completed traces: Completed trace equivalence: Trace equivalence:

13 © Ed Brinksma/Jan Tretmans Completed Trace Equivalence a aa  a  a  tr  ctr  tr  ctr  tr  ctr p q p after a refuses Lq after a refuses L q after  refuses L p after  refuses L

14 © Ed Brinksma/Jan Tretmans cb a aa c b  c b a  tr  ctr Completed Trace Equivalence

15 © Ed Brinksma/Jan Tretmans a b a  b aa b b  a  tr  ctr  tr  ctr  tr  ctr  tr  ctr Completed Trace Equivalence

16 © Ed Brinksma/Jan Tretmans cb a aa c b  c b a ?? (Completed) Trace Equivalence : Others ?

17 © Ed Brinksma/Jan Tretmans Equivalences on Transition Systems isomorphism bisimulation ( weak ) failure trace = refusal failures = testing completed trace trace weak strong

18 © Ed Brinksma/Jan Tretmans Bisimulation p  b q  "p and q simulate each other and go to states from where they can simulate each other again" Bisimulation:  a a    S p  S q :  s 0 p, s 0 q    and   s 1, s 2   ,    L* : whenever s p s' p then s q s' q and  s' p, s' q    whenever s q s' q then s p s' p and  s' p, s' q       bb

19 © Ed Brinksma/Jan Tretmans Bisimulation  aaa  a a bb bb bb

20 © Ed Brinksma/Jan Tretmans a b a  b aa b b  a Bisimulation bb bb bb bb bb

21 © Ed Brinksma/Jan Tretmans cb a aa c b  c b a bb Bisimulation

22 © Ed Brinksma/Jan Tretmans Comparing Systems : Testing Equivalence S1S2 environment  LTS(L) Ctraces (e||s) S1  te S2   e  E. obs ( e, S1 ) = obs (e, S2 )  ? ?

23 © Ed Brinksma/Jan Tretmans Testing Equivalence S1S2 environment S1  te S2   e  LTS(L).    L*. e ||S1 after  refuses L  e ||S2 after  refuses L

24 © Ed Brinksma/Jan Tretmans Testing Equivalence a aa  a  a  te p q obs(e,p) = { a  } a Environment e : obs(e,q) = { a ,  }

25 © Ed Brinksma/Jan Tretmans S1 S2 environment a b a b cb a aa c b  te a a b a S1 after a refuses {b}S2 after a refuses {b} Testing Equivalence a b  a a  a b 

26 © Ed Brinksma/Jan Tretmans Testing Equivalence P  te q  FP(p) = FP(q) Failure equivalence = testing equivalence : aa c b FP :  a, {c}   a b, L   ,   Not FP :  a, {b,c}   a a,    , L  Failure pairs of p : FP (p) = {  , A  | A  L,   traces(p), p afer  refuses A }

27 © Ed Brinksma/Jan Tretmans cb a aa c b  tr b ca a   b ca a    ctr p q traces (p) = traces (p) = { , a, a b, a c } Ctraces (p) = Ctraces (p) = { a b, a c } p after a b refuses Lq after a b refuses L q after a refuses {a,c} p after a refuses {a,c} p after a refuses Lq after a refuses L Testing Equivalence  te

28 © Ed Brinksma/Jan Tretmans Testing Equivalence cb a aa c b  c b a  te

29 © Ed Brinksma/Jan Tretmans Testing Equivalence tea coin bang coffee bang p coffee tea coin bang tea coffee bang q p  te q But: if you want coffee you will eventually always succeed in q but not p !?

30 © Ed Brinksma/Jan Tretmans Refusal Equivalence tea coin bang co ff ee bang p coffee tea coin bang tea coffee bang q coffee coin bang  Test t :  only possible if everything else is impossible coin  bang coffee   obs ( q || t ) coin  bang coffee   obs ( p || t ) p  rf q

31 © Ed Brinksma/Jan Tretmans Comparing Systems : Refusal Equivalence S1S2 environment  LTS ( L  {  } ) Ctraces (e||s) S1  rf S2   e  E. obs ( e, S1 ) = obs (e, S2 )  ? ?

32 © Ed Brinksma/Jan Tretmans Refusal Equivalence S1S2 environment S1  rf S2   e  LTS(L  {  }).    L*. e ||S1 after  refuses L  e ||S2 after  refuses L

33 © Ed Brinksma/Jan Tretmans Refusal Equivalence P  rf q  Ftraces(p) = Ftraces (q) Failure trace equivalence = refusal equivalence :   ( L  ( L ) )* : s  Failure trace  : Failure traces of p : Ftraces (p) = {   ( L  ( L ) )* | p }  Failure A :     A  {  } : s A s  aa c b Ftraces : {b,c} a {a,c} b L a {c} b {a} {b} {c}  a {b} {b} c Not Ftraces : {a,b,c} a {a,c} b L a {c} c L a a 

34 © Ed Brinksma/Jan Tretmans Refusal Equivalence tea coin bang co ff ee bang p coffee tea coin bang tea coffee bang q p  rf q Ftrace of p : coin {coffee} bang {coffee} tea Not an Ftrace of p : coin {coffee} bang coffee An Ftrace of q : coin {coffee} bang coffee Not an Ftrace of q : coin {coffee} bang {coffee} tea

35 © Ed Brinksma/Jan Tretmans Equivalences on Transition Systems isomorphism bisimulation ( weak ) failure trace = refusal failures = testing completed trace trace weak strong observing sequences of actions and their end observing sequences of actions test an LTS with another LTS test an LTS with another LTS, and try again (continue) after failure test an LTS with another LTS, and undo, copy, repeat as often as you like now you need to observe  's ……

36 © Ed Brinksma/Jan Tretmans Equivalences : Examples a aa  a  a  sb  b  t r  t e  sb  b  t r  te  sb  b  t r  te

37 © Ed Brinksma/Jan Tretmans cb a aa c b  c b a Equivalences : Examples

38 © Ed Brinksma/Jan Tretmans a b a  b aa b b  a Equivalences : Examples

39 © Ed Brinksma/Jan Tretmans bb d c a Equivalence of Transition Systems aa b b c d dc b a

40 © Ed Brinksma/Jan Tretmans d a b c p d c d a b bb c s aa b b d c r bb d c a q Equivalences : Examples

41 © Ed Brinksma/Jan Tretmans Equivalences : Examples tea coin bang coffee bang p coffee tea coin bang tea coffee bang q


Download ppt "Equivalences on Labelled Transition Systems Ed Brinksma Course 2004."

Similar presentations


Ads by Google