Presentation is loading. Please wait.

Presentation is loading. Please wait.

2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5.

Similar presentations


Presentation on theme: "2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5."— Presentation transcript:

1 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5

2 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 2 Finite State Automata Coffee machine A 1 : Coffee machine A 2 : Are the two machines ”the same”? 1kr tea coffee 1kr tea coffee 1kr

3 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 3 Little Language Refresher Automata recognize strings, e.g. 1kr tea 1kr 1kr coffee Language = set of strings A 1 ”=” language recognized by A 1  empty string ST: concatenation of S and T S + T: union of S and T S*: Iteration of S S* = SS...S Arden’s rule: The equation X = SX + T has solution X = S*T If   S the solution is unique } 0 or more times

4 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 4 Now compute... For A 1 : p 1 = 1kr p 2 +  p 2 = 1kr p 3 + tea p 1 p 3 = coffee p 1  p 2 = 1kr coffee p 1 + tea p 1  (etc, use Arden) p 1 = (1kr 1kr coffee + 1kr tea)* = q 1 BUT: p 1, q 1 should be different! SO: need new theory to talk about behaviour instead of acceptance 1kr tea coffee 1kr tea coffee 1kr A1:A1: A2:A2: p1p1 p2p2 p3p3 q1q1 q2q2 q3q3 q4q4

5 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 5 Process Algebra Calculus of concurrent processes Main issues: How to specify concurrent processes in an abstract way? Which are the basic relations between concurrency and non- determinism? Which basic methods of construction (= operators) are needed? When do two processes behave differently? When do they behave the same? Rules of calculation: –Replacing equals for equals –Substitutivity Specification and modelling issues

6 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 6 Process Equivalences Sameness of behaviour = equivalence of states Many process equivalences have been proposed (cf. Peled 8.5) For instance: q 1 » q 2 iff –q 1 and q 2 have the same paths, or –q 1 and q 2 may always refuse the same interactions, or –q 1 and q 2 pass the same tests, or –q 1 and q 2 have identical branching structure CCS: Focus on bisimulation equivalence

7 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 7 Bisimulation Equivalence Intuition: q 1 » q 2 iff q 1 and q 2 have same branching structure Idea: Find relation which will relate two states with the same transition structure, and make sure the relation is preserved Example: aaa b b bc c c q1q1 q2q2

8 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 8 Strong Bisimulation Equivalence Given: Labelled transition system T = (Q, ,R) Looking for a relation S  Q  Q on states S is a strong bisimulation relation if whenever q 1 S q 2 then: –q 1   q 1 ’ implies q 2   q 2 ’ for some q 2 ’ such that q 1 ’ S q 2 ’ –q 2   q 2 ’ implies q 1   q 1 ’ for some q 1 ’ such that q 1 ’ S q 2 ’ q 1 and q 2 are strongly bisimilar iff q 1 S q 2 for some strong bisimulation relation S q 1  q 2 : q 1 and q 2 are strongly bisimilar Peled uses ´ bis for »

9 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 9 Example q1q1 q0q0 q2q2 p0p0 p1p1 p2p2 a a a a a a a b b b Does q 0 » p 0 hold?

10 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 10 Example q1q1 q0q0 q2q2 p0p0 p1p1 p2p2 c aa a c b b Does q 0 » p 0 hold? q3q3 q4q4 p3p3

11 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 11 Weak Transitions What to do about internal activity?  : Transition label for activity which is not externally visible q )  q’ iff q = q 0   q 1  ...   q n = q’, n  0 q )  q’ iff q )  q’ q )  q’ iff q )  q 1   q 2 )  q’ (    ) Beware that )  = )  (non-standard notation) Observational equivalence, v.1.0: Bisimulation equivalence with  in place of  Let q 1 ¼’ q 2 iff q 1 » q 2 with )  in place of !  Cumbersome definition: Too many transitions q )  q’ to check

12 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 12 Observational Equivalence Let S µ Q  Q. The relation S is a weak bisimulation relation if whenever q 1 S q 2 then: –q 1   q 1 ’ implies q 2   q 2 ’ for some q 2 ’ such that q 1 ’ S q 2 ’ –q 2   q 2 ’ implies q 1   q 1 ’ for some q 1 ’ such that q 1 ’ S q 2 ’ q 1 and q 2 are observationally equivalent, or weakly bisimulation equivalent, if q 1 S q 2 for some weak bisimulation relation S q 1  q 2 : q 1 and q 2 are observationally equivalent/weakly bisimilar Exercise: Show that ¼’ = ¼

13 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 13 Examples a a a a a a a a b b c c c      ¼ ¼ ¼

14 2G1516 Formal Methods2005 Mads Dam IMIT, KTH 14 Examples b a  b a  a  b All three are inequivalent


Download ppt "2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5."

Similar presentations


Ads by Google