Download presentation
Presentation is loading. Please wait.
Published byBrittney Henderson Modified over 9 years ago
1
Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition Dr. Suzana Andova
2
1 Probabilistic LTS Process Algebra (2IF45) 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 s ts t s ts t a s ts t
3
2 Process Algebra (2IF45) 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)
4
3 Process Algebra (2IF45) 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
5
4 Process Algebra (2IF45) 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)
6
5 Probabilistic LTS Process Algebra (2IF45) 1 2/3 b 3 2 5 1/3 a 9 c 1 10 c c b 7 6 11 1/3 12 c c a 8 1 13 c b 1 c 2/3 4 1 b 1 a 1 c 1
7
6 SOS rules for PBPA(A) Process Algebra (2IF45) 1 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 a.0? 0?
8
7 SOS rules for PBPA(A) Process Algebra (2IF45) 1 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 0
9
8 Process Algebra (2IF45) 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 a.x a.x 1 a.x x a
10
9 SOS rules for PBPA(A) Process Algebra (2IF45) 1 a b 1 1/2 a b 1/2 = a.0b.0 a.0 1/2 b.0
11
10 Process Algebra (2IF45) SOS rules for PBPA(A) Deduction rules x x’ x y x’ a.x a.x 1 y y’ x y y’ (1- ) a.x x a 1 a b 1 1/2 a b 1/2 = a.0b.0 a.0 1/2 b.0
12
11 10 January 2008 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)
13
12 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) Deduction rules 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
14
13 SOS for action transitions Process Algebra (2IF45) Deduction rules for action transitions and termination 11 x x’ x + y x’ a.x x a a x (x + y) a y y’ x + y y’ a a y (x + y)
15
14 Process Algebra (2IF45) 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 _ | _
16
15 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 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
17
16 Deduction rules for action transitions and termination x x’ x || y x’ || y a a x y x || y y y’ x || y x || y’ a a x y x | y 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, )
18
17 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)
19
18 Exercises Process Algebra (2IF45) 1.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).
20
19 Unreliable communication – nondeterministic spec Process Algebra (2IF45) SR 2 S = s1(x).S x S x = i.s2(x).1 + i.s2(err).S x R = r2(x).r3(x).1 + r2(err).R Sys = H (S || R) Sys =s1(x). H (S x || R) H (S x || R) = i.c2(x).s3(x).1 + i. c2(err). H (S x || R) 13 Sys s1(x) c2(x) s3(x) i i c2(err)
21
20 Unreliable communication – probabilistic spec Process Algebra (2IF45) SR 2 Specification of components: PS = s1(x).PS x PS x = s2(x).1 9/10 s2(err).PS x R = r2(x).r3(x).1 + r2(err).R Specification of the whole system, derived from spec. above PSys = H (PS || R) PSys =s1(x). H (PS x || R) H (PS x || R) = c2(x).s3(x).1 9/10 c2(err). H (PS x || R) 13 PSys s1(x) c2(x) s3(x) 1/10 c2(err) 1 9/10 1
22
21 Unreliable communication – probabilistic spec Process Algebra (2IF45) 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 s1(x) c2(x) s3(x) 1/10 c2(err) 1 9/10 1
23
22 ABP with unreliable channels Process Algebra (2IF45) S K 2 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 1 3 R L 6 5 4
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.