# Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition - PowerPoint PPT Presentation  Download Presentation Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition

Download Presentation ## Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Process Algebra (2IF45)Probabilistic extension: semanticsParallel composition Dr. Suzana Andova

2. Probabilistic LTS • Basic ingredients of a PLTS: • states • non-detereministic states set N • probabilistic states set P • transitions • action transitions labelled with actions and t P • probabilistic transitions labelled with probabilities and t N • For a probabilistic state s, •   = 1 a s  t  s  t  s  t Process Algebra (2IF45)

3. Equational theory. Language • Specify processes that can execute certain actions from a given set A • The language of the Probabilistic Basic Process Algebra, namely, the operators in the signature • 0 deadlock constant (inaction) • 1 successful termination • a._ action prefix for a in A • + non-deterministic choice •  probabilistic choice for   (0,1) Process Algebra (2IF45)

4. Axioms of PBPA(A) PBPA(A) Signature: 0, 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 Process Algebra (2IF45)

5. Axioms of PBPA(A) PBPA(A) Signature: 0, a._ , _+_ ,  • (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) Process Algebra (2IF45)

6. Probabilistic LTS 1 2/3 1/3 1 2 3 a b a b a b b 4 5 6 7 8 1 1 1 1 2/3 1 1 1/3 9 10 12 11 13 c c c c c c c c Process Algebra (2IF45)

7. SOS rules for PBPA(A) • Process terms in the language of • the Probabilistic Basic Process Algebra, • 0 deadlock constant (inaction) • 1 successful termination • a._ action prefix for a in A • + non-deterministic choice •  probabilistic choice for   (0,1) a.0 1 a.0? a 0? Process Algebra (2IF45)

8. SOS rules for PBPA(A) • Process terms in the language of • the Probabilistic Basic Process Algebra, • 0 deadlock constant (inaction) • 1 successful termination • a._ action prefix for a in A • + non-deterministic choice •  probabilistic choice for   (0,1) a.0 1 a.0 a 0 Process Algebra (2IF45)

9. SOS rules for PBPA(A) • Signature: 0, a._ , _+_,  • Set of closed terms C(PBPA(A)) • Behaviour expressed by • action transitions _  _ for a in A • probabilistic transitions _ _ for  (0,1] • Behavioural equivalence is bisimilarity a  Deduction rules 1 a.x  a.x a a.x x Process Algebra (2IF45)

10. SOS rules for PBPA(A) a.0 b.0 a.0 1/2 b.0 1 1/2 1 1/2 1/2 = b b a a Process Algebra (2IF45)

11. SOS rules for PBPA(A) a.0 b.0 a.0 1/2 b.0 1 1/2 1 1/2 1/2 = b b a a  y  y’ x  y  y’ Deduction rules  x  x’ x  y  x’ (1-) 1  a.x  a.x a a.x x Process Algebra (2IF45)

12. SOS rules for PBPA(A) 1/6 1/3 1/3 1/2 1/3 1/2 2/3 1/6 + = d c b a b c d a b d a c

13. SOS rules for PBPA(A)  y  y’ x  y  y’ 1/6 1/3 Deduction rules 1/3  1/2 1/3 1/2 x  x’ x  y  x’ 2/3 1/6 (1-) 1  a.x  a.x + = x  x’, y  y’ x +y  x’ + y’ d c b a a.x x a b c d a   b d a c 

14. SOS for action transitions • Deduction rules for action transitions and termination a x  x’ x + y  x’ a y  y’ x + y  y’ a a.x x a a x (x + y)  y (x + y)  1 Process Algebra (2IF45)

15. Extending the language with parallel composition – Probabilistic TCP(A, ) • Specify processes that can execute certain actions from a given set A • The language of the Probabilistic Theory of Communicating Processes, namely, the operators in the signature • 0 deadlock constant (inaction) • 1 successful termination • a._ action prefix for a in A • + non-deterministic choice • probabilistic choice for   (0,1) • communication function (_,_) • parallel composition _ || _ • communication composition _ | _ Process Algebra (2IF45)

16. SOS semantics of PTCP(A, ) 1/6 1/6 1/3 1/3 1/3 1/2 2/3 1/2 || = c c b d a b d a e b d a c 1 1 1 1 1 1 1 c a b c d b d a where a and c communicate in e, and no other communication is defined (in this examples) Deduction rules     x  x’, y  y’ x | y  x’ | y’ x  x’ H(x)  H(x’)  x  x’, y  y’ x || y  x’|| y’   

17. SOS semantics of PTCP(A, ) • Deduction rules for action transitions and termination a a y  y’ x || y  x || y’ x  x’ x || y  x’ || y x y x | y x y x || y a a a b x  x’ y  y’, (a,b) = c x || y  x’ || y’ a b x  x’ y  y’, (a,b) = c x | y  x’ || y’ c c a x  x’ , aH H(x)  H(x’) a

18. 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) Process Algebra (2IF45)

19. Exercises • Consider process terms p = a.0 + a.0, q = a.0 1/3 b.0, r = c.(d.0 1/2 b.0). • Draw the PLTSs of p, q and r using the SOS semantic rules. Use the rules compute the PLTS of H(p || q || r) if (b,c) = e and H={b,c} • Using the axioms derive a PBPA(A) process term t such that • PTCP(A, )├ H(p || q || r) = t, if (b,c) = e and H={b,c}. • Draw the PLTS of t and establish a probabilistic bisimulation relation between PLTS of t and PLTS of H(p || q || r). Process Algebra (2IF45)

20. Unreliable communication – nondeterministic spec 2 1 3 S R S = s1(x).Sx Sx = i.s2(x).1 + i.s2(err).Sx R = r2(x).r3(x).1 + r2(err).R Sys Sys = H(S || R) Sys =s1(x). H(Sx || R) H(Sx || R) = i.c2(x).s3(x).1 +i. c2(err). H(Sx || R) s1(x) i i c2(err) c2(x) s3(x) Process Algebra (2IF45)

21. Unreliable communication – probabilistic spec 2 1 3 S R Specification of components: PS = s1(x).PSx PSx = s2(x).1 9/10 s2(err).PSx R = r2(x).r3(x).1 + r2(err).R PSys 1 s1(x) Specification of the whole system, derived from spec. above PSys = H(PS || R) PSys =s1(x). H(PSx || R) H(PSx || R) = c2(x).s3(x).1 9/10 c2(err). H(PSx || R) 1/10 9/10 c2(err) c2(x) 1 s3(x) Process Algebra (2IF45)

22. Unreliable communication – probabilistic spec • Benefits of probabilistic wrt nondeterministic specification: • - no fairness assumption needed • performance analysis is possible , for instance for this example we can compute the average number of the message x needs to be sent by S in order to be received by R; This number, of course, depends on the probability by which the message is correctly sent. Thus, for exaple, we compute, using probability theory techniques, that : • for 1/10 vs. 9/10 in average a message needs to be sent 1.2 times • for ½ vs. ½ in average a message needs to be sent 2 time PSys 1 s1(x) 1/10 9/10 c2(err) c2(x) 1 s3(x) Process Algebra (2IF45)

23. ABP with unreliable channels 2 3 1 K 4 S R 5 6 L S = S0  S1  S Sn = d r1(d).Snd Snd = s2(dn). Tnd Tnd = r6(1-n).Snd + s6(err).Snd + r6(n).1 R = R1  R0 R Rn = r3(err).s5(n).Rn + d,n r3(dn).s5(n).Rn + d,n r3(d(1-n)).s4(d).s5(1-n).1 K = d,n r2(dn).(i.s3(dn).K + i.s3(err).K) L = n r5(n).(i.s6(n).K + i.s6(err).L) Specify K and L with probabilistic choice operator. Derive the spec. of the whole system Process Algebra (2IF45)