process algebra (2if45) working with probabilistic systems

13
Process Algebra (2IF45) Working with Probabilistic systems Dr. Suzana Andova

Upload: hume

Post on 11-Jan-2016

31 views

Category:

Documents


2 download

DESCRIPTION

Process Algebra (2IF45) Working with Probabilistic systems. Dr. Suzana Andova. 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) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Process Algebra (2IF45) Working with Probabilistic systems

Process Algebra (2IF45)

Working with Probabilistic systems

Dr. Suzana Andova

Page 2: Process Algebra (2IF45) Working with Probabilistic systems

18 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)

Page 3: Process Algebra (2IF45) Working with Probabilistic systems

19 Process Algebra (2IF45)

1. A chatting philosopher is a person dedicated to two activities: thinking and chatting. A philosopher uses his phone for chatting. He can decide to pick up the phone with probability pi, or stay thinking with probability 1-pi. Once he starts chatting, he end the call with probability ro, or keep chatting with probability 1-ro.

2. There is a switch which allocates connection to a philosopher, and also deallocating a connection. Our switcher is capable of handling only one connection at time.

Chatting Philosophers example

Think

Chat

pi

1-pi

1-ro

ro

all

deall

Philosopher

S1

all1

deall2

Switcher (2)

deall1

2

all2

Page 4: Process Algebra (2IF45) Working with Probabilistic systems

20 Process Algebra (2IF45)

1. A chatting philosopher is a person dedicated to two activities: thinking and chatting. A philosopher uses his phone for chatting. He can decide to pick up the phone with probability pi, or stay thinking with probability 1-pi. Once he starts chatting, he end the call with probability ro, or keep chatting with probability 1-ro.

2. There is a switch which allocates connection to a philosopher, and also deallocating a connection. Our switcher is capable of handling only one connection at time.

3. We consider a system of two philosophers and one switcher

4. First, we compute Phil1 || Phil2, where Phili = Thinki

Chatting Philosophers example

Page 5: Process Algebra (2IF45) Working with Probabilistic systems

21 Process Algebra (2IF45)

Chatting Philosophers example

S,T1,T2

S1,C1,T2

deall2

all1

tick

S2,T1,C2all2

(1-)(1-)

(1-)(1-)

1-

1-

deall1

tick

tick

ticktick

all1 all2

Page 6: Process Algebra (2IF45) Working with Probabilistic systems

22 Process Algebra (2IF45)

Chatting Philosophers example

S,T1,T2

S1,C1,T2

deall2

all1

tick

S2,T1,C2all2

(1-)(1-)

(1-)(1-)

1-

1-

deall1

tick

tick

ticktick

all1 all2

max\min

Page 7: Process Algebra (2IF45) Working with Probabilistic systems

23 Process Algebra (2IF45)

Chatting Philosophers example

tick tick

all1 all2

all1 all2

tick

tick tick

all1 all2

all1 all2

tick

Page 8: Process Algebra (2IF45) Working with Probabilistic systems

24 Process Algebra (2IF45)

Chatting Philosophers example

tick tick

all1 all2

all1 all2

tick

ticktick

all1 all2

all1

all2

tick

Page 9: Process Algebra (2IF45) Working with Probabilistic systems

25 Process Algebra (2IF45)

Chatting Philosophers example (small change)

S,T1,T2

S1,C1,T2

deall2

all1

tick

S2,T1,C2all2

(1-)(1-)

(1-)(1-)

1-

1-

deall1

tick

tick

ticktick

all1 all2

max\min

Page 10: Process Algebra (2IF45) Working with Probabilistic systems

26 Process Algebra (2IF45)

1. Resolves nondeterminism

2. Allows for analysis (min/max)3. Needed to define equivalence relations (with silent transitions)

Schedulers

Page 11: Process Algebra (2IF45) Working with Probabilistic systems

27 Process Algebra (2IF45)

Chatting Philosophers example (cont.)

S,T1,T2

S1,C1,T2

deall2

all1

tick

S2,T1,C2all2

(1-)(1-)

(1-)(1-)

1-

1-

deall1

tick

tick

ticktick

all1 all2

Page 12: Process Algebra (2IF45) Working with Probabilistic systems

28

Chatting Philosophers example (cont)

Process Algebra (2IF45)

S R2

S = s1(x).Sx

Sx = i.s2(x).1 + i.s2(err).Sx

R = r2(x).r3(x).1 + r2(err).R

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)

1 3

Sys

s1(x)

c2(x)

s3(x)

i i

c2(err)

Page 13: Process Algebra (2IF45) Working with Probabilistic systems

32

ABP with unreliable channels

Process Algebra (2IF45)

SK2

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 3R

L6 5

4