Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

Similar presentations


Presentation on theme: "Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova."— Presentation transcript:

1 Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova

2 1 Outline of the lecture Semantics of non-determinism in probabilistic setting Analysing probabilistic systems and schedulers Probabilistic branching bisimulation Process Algebra (2IF45)

3 2 PBPA(A) Probabilistic Basic Process Algebra Language: PBPA(A) Signature: 0, (a._ ) a  A, +, ⊕ , where   (0,1) Language terms T(PBPA(A)) Axioms of PBPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x (A4) x+ 0 = x x  x’ x + y  x’ a a  11  x  (x + y)   a.x  x  a  y  y’ x + y  y’ a a y  (x + y)  ⑥ Strong Probabilistic Bisimilarity on PLTSs Equality of terms Deduction rules for PBPA(A): x  x’ x   y  x’ a.x  a.x  1 y  y’ x   y  y’ (1-  )  x  x’, y  y’ x +y  x’ + y’      a.x  x a x  x’ x + y  x’ y  y’ x + y  y’ a a a a

4 3 1/2 a b + = 1/3 c d 2/3 1/3 ab 1/6 a 1/3 d c c d b SOS rules for PBPA(A): non-deterministic choice x  x’, y  y’ x +y  x’ + y’    Deduction rule

5 4 1/3 a b 2/3 + = 1/3 a b 2/3 2/9 ab 1/9 a 4/9 b a a b b Non-deterministic choice: idempotence? ? p 1/3 a b 2/3 4/9 a 1/9 a 4/9 b a b b

6 5 Process Algebra (2IF45) Axioms of PBPA(A) (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (A3) x + x = x but (AA3) a.x+a.x = a.x (A4) x+ 0 = x (PA1) x   y = y  1-  x (PA2) x   (y   z) = (x   y)  z where  =  /(  +  -  ) and =  +  -  (PA3) x   x = x (PA4) (x   y) + z = (x + z)   (y + z)

7 6 Process Algebra (2IF45) PBPA(A) Probabilistic Basic Process Algebra Language: PBPA(A) Signature: 0, (a._ ) a  A, +, ⊕ , where   (0,1) Language terms T(PBPA(A)) x  x’ x + y  x’ a a  11  x  (x + y)   a.x  x  a  y  y’ x + y  y’ a a y  (x + y)  ⑥ Strong Probabilistic Bisimilarity on PLTSs Equality of terms Deduction rules for PBPA(A): x  x’ x   y  x’ a.x  a.x  1 y  y’ x   y  y’ (1-  )  x  x’, y  y’ x +y  x’ + y’      a.x  x a x  x’ x + y  x’ y  y’ x + y  y’ a a a a Axioms of PBPA(A): (A1) x+ y = y+x (A2) (x+y) + z = x+ (y + z) (AA3) a.x+a.x = a.x (A4) x+ 0 = x (PA1) x   y = y  1-  x (PA2) x   (y   z) = (x   y)  z where  =  /(  +  -  ) and =  +  -  (PA3) x   x = x (PA4) (x   y) + z = (x + z)   (y + z)

8 Process Algebra (2IF45) Analysing Probabilistic systems Dr. Suzana Andova

9 8 Analysing PLTSs – main ingredients Process Algebra (2IF45) What can we measure on x? The set of all paths in x starting in p?! n p ks 0 x

10 9 Analysing PLTSs – main ingredients Process Algebra (2IF45) n p ks 0 x Property1: After finitely many c’s, a is observed (Measured set = all paths with trace in c*a) Property2: After finitely many c’s, action b occurs (Measured set = all paths with trace in c*b) Property3: After an even number of c’s, action a occurs (Measured set = all paths with trace in (cc)*a) Property4: After an even number of c’s, action a or action b occurs Property5: Eventually deadlock is reached (state 0) (Measured set = all paths that have 0 as last state) What can we measure on x? The set of all paths in x starting in p?!

11 10 Example 1 (cont.) Process Algebra (2IF45) Property1: After finitely many c’s, a is observed n p ks 0 x p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3......

12 11 Example 1 (cont.) Process Algebra (2IF45) Property1: After finitely many c’s, a is observed n p ks 0 x p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3......

13 12 Example 1 (cont.) Process Algebra (2IF45) Property1: After finitely many c’s, a is observed n p ks 0 x p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... Prob(SetPaths1) = ?

14 13 Example 1 (cont.) Process Algebra (2IF45) Property1: After finitely many c’s, a is observed n p ks 0 x p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... Prob(SetPaths1) = 1/3 + 1/6x1/3 + (1/6)^2x1/3 + …. =  k  0 1/3x(1/6)^k = (1/3)/ (1-1/6) = 2/5

15 14 Example 1 (cont.) Process Algebra (2IF45) Property2: After finitely many c’s, b is observed n p ks 0 x p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... Prob(SetPaths2) = ?

16 15 Example 1 (cont.) Process Algebra (2IF45) Property3: After an even number of c’s, action a occurs n p ks 0 x p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... kss 0 p 1/2 1/6 a b c

17 16 Example 1 (cont.) Process Algebra (2IF45) n p ks 0 x p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... kss 0 p 1/2 1/6 a b c Prob(SetPaths3) = ? Property3: After an even number of c’s, action a occurs

18 17 Example 1 (cont.) Process Algebra (2IF45) n p ks 0 x Prob(SetPaths5) = ? Property1: After finitely many c’s, a is observed Property2: After finitely many c’s, action b occurs Property3: After even number of c’s, action a occurs Property4: After even number of c’s, action a or action b occurs Property5: Eventually deadlock is reached (state 0) (Measured set = ?)

19 18 Example 2 Process Algebra (2IF45) n p ks 0 y k p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... b b What can we measure on y? The set of all paths in y starting in p?!

20 19 Example 2 Process Algebra (2IF45) n p ks 0 y k p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... b b What can we measure on y? The set of all paths in y starting in p?! P roperty1: After finitely many c’s, a is observed

21 20 Example 2 Process Algebra (2IF45) n p ks 0 y k p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... b b What can we measure on y? The set of all paths in y starting in p?! P roperty1: After finitely many c’s, a is observed

22 21 Example 2 Process Algebra (2IF45) n p ks 0 y k p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... b b What can we measure on y? P roperty1: After finitely many c’s, a is observed Nothing, unless we resolve the non-determinism!

23 22 Example 2 Process Algebra (2IF45) n p ks 0 y k p kss 0 p 1/3 1/2 1/6 a b c kss 0 p 1/2 1/6 a b c 1/3...... b b What can we measure on y? P roperty1: After finitely many c’s, a is observed Nothing, unless we resolve the non-determinism! HOW? By schedulers!

24 23 Process Algebra (2IF45) Schedulers are used to resolve non-determinism A scheduler “decides” the next step to be performed from a given non- deterministic state It maps a finite path, ending in a non-deterministic state, to an action transition (many detail is missing in this sentence, read the lecture notes for the formal definition) Analysis of a system with non-determinism is relative to the chosen scheduler. Different types of schedulers: randomized vs. deterministic. Special kind of deterministic schedulers are simple schedulers. Schedulers

25 24 Example 2 (cont.) Process Algebra (2IF45) Property1: After finitely many c’s, a is observed? First select a scheduler, then compute this set, and its probability 1.Let us define a scheduler .

26 25 Example 2 (cont.) – scheduler  Process Algebra (2IF45) Computation tree CT y (p,  ) n p ks 0 y k p ksn 0 p 1/3 1/2 1/6 a c ksn 0 p 1/2 1/6 b c 1/3......

27 26 Example 2 (cont.) – scheduler  Process Algebra (2IF45) Prob  (FPaths(y, trace = c*a)) = 12/35 How? n p ks 0 y k Property1: After finitely many c’s, a is observed p ksn 0 p 1/3 1/2 1/6 a c ksn 0 p 1/2 1/6 b c 1/3....

28 27 Example 2 (cont.) – scheduler  1 Process Algebra (2IF45) n p ks 0 y k p kss 0 p 1/3 1/2 1/6 a c kss 0 p 1/2 1/6 a b c 1/3...... b Computation tree CT y (p,  1 )

29 28 Example 2 (cont.) – scheduler  1 Process Algebra (2IF45) n p ks 0 y k...... p kss 0 p 1/3 1/2 1/6 a c kss 0 p 1/2 1/6 a b c 1/3 b Property1: After finitely many c’s, a is observed Prob  1 (FPaths(y, trace = c*a) )= 2/5 How? Can we do better?

30 29 Example 2 (cont.) Process Algebra (2IF45) Property1: After finitely many c’s, a is observed? First select a scheduler, then compute this set, and its probability 1.1. Let us define a scheduler  1.2. Scheduler  1 is the maximal scheduler 1.3. Scheduler  2 is the minimal scheduler

31 Process Algebra (2IF45) Parallel composition of PLTSs

32 31 10 January 2008 SOS semantics of PTCP(A,  ) where a and c communicate in e, and no other communication is defined (in this examples) 1/3 a b 2/3 1/2 c d ||= 1/3 c b 1/6 a a c d bd e 1 a a ddb Deduction rules for probabilistic transitions  x  x’  H (x)   H (x’)   x  x’, y  y’ x || y  x’|| y’   x  x’, y  y’ x | y  x’ | y’    c 11 bc 111 1

33 32 Deduction rules for action transitions x  x’ x || y  x’ || y a a y  y’ x || y  x || y’ a a x  x’ y  y’,  (a,b) = c x || y  x’ || y’ a c b x  x’ y  y’,  (a,b) = c x | y  x’ || y’ a c b x  x’, a  H  H (x)   H (x’) a a SOS semantics of PTCP(A,  )

34 33 Process Algebra (2IF45) Axioms (not seen yet) of TCP(A,  ) x|| y = x ╙ y + y ╙ x + x | y, only if x=x+x and y=y+y x || (y   z) = (x || y)   (x || z) (x   y) || z = (x || z)   (y || z) x | (y   z) = (x | y)   (x | z) (x   y) | z = (x | z)   (y | z)  H (x   y) =  H (x)    H (y) x ╙ (y   z) = (x ╙ y)   (x ╙ z) (x   y) ╙ z = (x ╙ z)   (y ╙ z)


Download ppt "Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova."

Similar presentations


Ads by Google