+ All Categories
Home > Documents > Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

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

Date post: 17-Dec-2015
Category:
Upload: beatrix-sparks
View: 219 times
Download: 1 times
Share this document with a friend
Popular Tags:
32
Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova
Transcript
Page 1: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

Process Algebra (2IF45)

Probabilistic Process Algebra

Suzana Andova

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

2

Outline of the lecture

• Semantics of non-determinism in probabilistic setting• Analysing probabilistic systems and schedulers

• Probabilistic branching bisimulation

Process Algebra (2IF45)

Page 3: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

3 Process Algebra (2IF45)

PBPA(A) Probabilistic Basic Process Algebra

Language: PBPA(A)

Signature: 0, (a._ )aA, +, ⊕, 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’

aa

1

x (x + y)

a.x x a

y y’ x + y y’

aa

y (x + y)

Strong Probabilistic Bisimilarity on PLTSs

Equality of termsSoundness

Completeness

Deduction rules for PBPA(A):

x x’ x y x’

a.x a.x1

y y’ x y y’ (1-)

x x’, y y’ x +y x’ + y’

a.x xa x x’ x + y x’

y y’ x + y y’

a

a

a

a

Page 4: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

4

1/2

a b

1/2+ =

1/3

c d

2/3 1/3

a b

1/61/6

a

1/3

dc cdb

SOS rules for PBPA(A): non-deterministic choice

x x’, y y’

x +y x’ + y’

Deduction rule

Page 5: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

5

1/3

a b

2/3+ =

1/3

a b

2/3 2/9

a b

2/91/9

a

4/9

ba abb

Non-deterministic choice: idempotence?

?

p

1/3

a b

2/3 4/9

a

1/9

a

4/9

ba bb

Page 6: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

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

Page 7: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

7 Process Algebra (2IF45)

PBPA(A) Probabilistic Basic Process Algebra

Language: PBPA(A)

Signature: 0, (a._ )aA, +, ⊕, where (0,1) Language terms T(PBPA(A))

x x’ x + y x’

aa

1

x (x + y)

a.x x a

y y’ x + y y’

aa

y (x + y)

Strong Probabilistic Bisimilarity on PLTSs

Equality of termsSoundness

Completeness

Deduction rules for PBPA(A):

x x’ x y x’

a.x a.x1

y y’ x y y’ (1-)

x x’, y y’ x +y x’ + y’

a.x xa 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)

Page 8: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

Process Algebra (2IF45)

Analysing Probabilistic systems

Dr. Suzana Andova

Page 9: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

9

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

k s

0

x

Page 10: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

10

Analysing PLTSs – main ingredients

Process Algebra (2IF45)

n

p

k s

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?!

Page 11: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

11

Example 1 (cont.)

Process Algebra (2IF45)

Property1: After finitely many c’s, a is observed

n

p

k s

0

x p

k s s

0p

1/31/2 1/6

a b c

k s s

0p

1/2 1/6

a b c

1/3

.

.

.

Page 12: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

12

Example 1 (cont.)

Process Algebra (2IF45)

Property1: After finitely many c’s, a is observed

n

p

k s

0

x p

k s s

0p

1/31/2 1/6

a b c

k s s

0p

1/2 1/6

a b c

1/3

.

.

.

Page 13: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

13

Example 1 (cont.)

Process Algebra (2IF45)

Property1: After finitely many c’s, a is observed

n

p

k s

0

x p

k s s

0p

1/31/2 1/6

a b c

k s s

0p

1/2 1/6

a b c

1/3

.

.

.Prob(SetPaths1) = ?

Page 14: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

14

Example 1 (cont.)

Process Algebra (2IF45)

Property1: After finitely many c’s, a is observed

n

p

k s

0

x p

k s s

0p

1/31/2 1/6

a b c

k s s

0p

1/2 1/6

a b c

1/3

.

.

.Prob(SetPaths1) = 1/3 + 1/6x1/3 + (1/6)^2x1/3 + ….

= k0 1/3x(1/6)^k = (1/3)/ (1-1/6) = 2/5

Page 15: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

17

Example 1 (cont.)

Process Algebra (2IF45)

n

p

k s

0

x

p

k s s

0p

1/31/2 1/6

a b c

k s s

0p

1/2 1/6

a b c

1/3

.

.

.

k s s

0p

1/31/2 1/6

a b c

Prob(SetPaths3) = ?

Property3: After an even number

of c’s, action a

occurs

Page 16: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

18

Example 1 (cont.)

Process Algebra (2IF45)

n

p

k s

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 = ?)

Page 17: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

19

Example 2

Process Algebra (2IF45)

n

p

k s

0

y

k

p

k s s

0p

1/31/2 1/6

a

b

c

k s s

0p

1/2 1/6

ab c

1/3

.

.

.

b

b

What can we measure on y? The set of all paths in y starting in p?!

Page 18: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

20

Example 2

Process Algebra (2IF45)

n

p

k s

0

y

k

p

k s s

0p

1/31/2 1/6

a

b

c

k s s

0p

1/2 1/6

ab c

1/3

.

.

.

b

b

What can we measure on y? The set of all paths in y starting in p?!

Property1: After finitely many c’s, a is observed

Page 19: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

21

Example 2

Process Algebra (2IF45)

n

p

k s

0

y

k

p

k s s

0p

1/31/2 1/6

a

b

c

k s s

0p

1/2 1/6

ab c

1/3

.

.

.

b

b

What can we measure on y? The set of all paths in y starting in p?!

Property1: After finitely many c’s, a is observed

Page 20: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

22

Example 2

Process Algebra (2IF45)

n

p

k s

0

y

k

p

k s s

0p

1/31/2 1/6

a

b

c

k s s

0p

1/2 1/6

ab c

1/3

.

.

.

b

b

What can we measure on y?

Property1: After finitely many c’s, a is observed

Nothing, unless we resolve the non-determinism!

Page 21: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

23

Example 2

Process Algebra (2IF45)

n

p

k s

0

y

k

p

k s s

0p

1/31/2 1/6

a

b

c

k s s

0p

1/2 1/6

ab c

1/3

.

.

.

b

b

What can we measure on y?

Property1: After finitely many c’s, a is observed

Nothing, unless we resolve the non-determinism!

HOW? By schedulers!

Page 22: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

24 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

Page 23: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

25

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 .

Page 24: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

26

Example 2 (cont.) – scheduler

Process Algebra (2IF45)

Computation tree CTy(p, )

n

p

k s

0

y

k

p

k s n

0p

1/31/2 1/6

a c

k s n

0p

1/2 1/6

b

c

1/3

.

.

.

Page 25: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

27

Example 2 (cont.) – scheduler

Process Algebra (2IF45)

Prob(FPaths(y, trace = c*a)) = 12/35

How?

n

p

k s

0

y

k

Property1: After finitely many c’s, a is observed

p

k s n

0p

1/31/2 1/6

a c

k s n

0p

1/2 1/6

b

c

1/3

.

.

Page 26: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

28

Example 2 (cont.) – scheduler 1

Process Algebra (2IF45)

n

p

k s

0

y

k

p

k s s

0p

1/31/2 1/6

a c

k s s

0p

1/2 1/6

ab c

1/3

.

.

.

b

Computation tree CTy(p, 1)

Page 27: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

29

Example 2 (cont.) – scheduler 1

Process Algebra (2IF45)

n

p

k s

0

y

k

.

.

.

p

k s s

0p

1/31/2 1/6

a c

k s s

0p

1/2 1/6

ab c

1/3

b

Property1: After finitely many c’s, a is observed

Prob1(FPaths(y, trace = c*a) )= 2/5

How? Can we do better?

Page 28: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

30

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

Page 29: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

Process Algebra (2IF45)

Parallel composition of PLTSs

Page 30: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

32

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/2|| =

1/3

c b

1/31/6

a

1/6

ac

db de

1

a a dd b

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

b c

1 11 1

Page 31: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

33

• 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’ , aH

H(x) H(x’) a

a

SOS semantics of PTCP(A, )

Page 32: Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.

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


Recommended