Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition
Process Algebra (2IF45) Abstraction in Process Algebra
description
Transcript of Process Algebra (2IF45) Abstraction in Process Algebra
![Page 1: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/1.jpg)
Process Algebra (2IF45)
Abstraction in Process Algebra
Suzana Andova
![Page 2: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/2.jpg)
2
Outline of the lecture
• Our way of dealing with internal behaviour: branching bisimulation
• How we capture Abstraction in Process Algebra• combining it with other concepts
Process Algebra (2IF45)
![Page 3: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/3.jpg)
3
Abstraction
Abstraction is used to • check the correctness of implementation against the system
specification
• reduce and simplify the model to enable better, fasted and cleaner model analysis
Process Algebra (2IF45)
Question: How do we chose to relate behaviours with internal steps?Branching bisimulation
![Page 4: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/4.jpg)
4 Process Algebra (2IF45)
Branching bisimulation – simple examples first
a
b
is branching bisim to a
a b
“ related states must have the same potential which does not change until an observable action is executed ”
![Page 5: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/5.jpg)
5 Process Algebra (2IF45)
Branching bisimulation – simple examples first
a b
is branching bisim to a
b
it is not branching bisim to a
b
![Page 6: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/6.jpg)
6
Branching bisimilar processes
t
t’
a
s a
s’
t’’
t
s
s’t’’
t s
s’
t
Branching Bisimulation relation: A binary relation R on the set of state S of an LTS is branching bisimulation relation iff the following transfer conditions hold:
1. for all states s, t, s’ S, whenever (s, t) R and s → s’ for some a A, then there are states t’, t’’ S such that t t’ and t’ → t’’ and (s, t’), (s’,t’’) R;2. vice versa, for all states s, t, s’ S, whenever (s, t) R and t → t’ for some a A, then there
are states s’,s’’ S such that s s’ and s’ → s’’ and (s’, t), (s’’,t’) R;3. if (s, t) R and s then there is a state t’ such that t t’ , t’ and (s, t’) R4. whenever (s, t) R and t then there is a state s’ such that s s’ , s’ and (s’, t) R
Two LTSs s and t are branching bisimilar, s b t, iff there is a branching bisimulation relation R such that (s, t) R
aa
a
a
![Page 7: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/7.jpg)
7
less
pow
er o
f the
obs
erve
rSpectrum of behavioural relations
![Page 8: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/8.jpg)
8
most powerful
![Page 9: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/9.jpg)
9
Weak bisimulation just a short comparison
Process Algebra (2IF45)
a b c d1 d2 d3 d4
a b c d1 d2 d3 d4
b
a b c d1 d2 d3 d4
b
![Page 10: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/10.jpg)
10
Branching bisimulation and composition
![Page 11: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/11.jpg)
11
Branching bisimulation and composition
a
a
a
a
b
b b
branching bisimilar!
branching bisimilar? NO!
+ +
![Page 12: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/12.jpg)
12
Branching bisimulation and composition
a
a
a
a
b
b b
branching bisimilar!
branching bisimilar? NO!
+ +
Painful conclusion: branching bisimilation is not compositional.
![Page 13: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/13.jpg)
13
Branching bisimulation and composition
a
a
a
a b b
branching bisimilar components!
+ +
What to do? Two choices:1. Make the relation weaker and relate the two compositions too!2. Make the relation stronger and do not relate the two components
from the beginning!
Not branching bisimilar compositions!
![Page 14: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/14.jpg)
14
Rooted Branching Bisimilar processes
t’
q
b
s’ b
p
r
t’
s’
pq
t s’
p
t’
t s a a
t s a a
t s a a
R is Rooted BB between state (s, t) R if R is Branching Bisimulation relation (as already defined) and the root condition:
1. if s → s’ for a A, then there is a state t’ S such that t → t’ and (s’, t’) R;2. if t → t’ for a A, then there is a state s’ S such that s → s’ and (s’, t’) R;3. s if and only if t
LTSs s and t are rooted branching bisimilar, s rb t, iff there is a rooted branching bisimulation relation R such that (s, t) R
a a
a
Rooted branching bisimulation is strengthened variant of branching bisimulation strict enough to obtain compositionality
a
(aA i.e. can be from A or can be )
![Page 15: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/15.jpg)
15 Process Algebra (2IF45)
Axiomatizing Rooted Branching Bisimulations
Language: BPA(A)
Signature: 0, 1, (a._ )aA, , +, • Language terms T(BPA(A,))
Closed terms C(BPA(A))
Equality of terms
x+ y = y+x (x+y) + z = x+ (y + z)
x + x = x x+ 0 = x
(x+ y) z = x z+y z(x y) z = x (y z)
0 x = 0 x 1 = x 1 x = x
a.x y = a.(x y)
Completeness
Soundness
Deduction rules for BPA(A) (a A): x x’ x + y x’
a
a
1 x (x + y)
a.x x a
y y’ x + y y’
aa
y (x + y) ⑥
x x’ x y x’
a
a
x y (x y)
x y y’ x y y’
a
a
Strong Bisimilarity on LTSs
![Page 16: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/16.jpg)
16 Process Algebra (2IF45)
Axiomatizing Rooted Branching Bisimulations
Language: BPA(A)
Signature: 0, 1, (a._ )aA, , +, • Language terms T(BPA(A,))
Closed terms C(BPA(A))
Strong Bisimilarity on LTSs Equality of terms
x+ y = y+x (x+y) + z = x+ (y + z)
x + x = x x+ 0 = x
(x+ y) z = x z+y z(x y) z = x (y z)
0 x = 0 x 1 = x 1 x = x
a.x y = a.(x y)
Completeness
Soundness
Deduction rules for BPA(A) (a A): x x’ x + y x’
a
a
1 x (x + y)
a.x x a
y y’ x + y y’
aa
y (x + y) ⑥
x x’ x y x’ y
a
a
x y (x y)
x y y’ x y y’
a
a
Rooted Branching
![Page 17: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/17.jpg)
17
x y
x+
+
x y+
.(x+y) + x = x+y
Turned into equation looks like:
Axiomazing Rooted branching bisimulation
bb
![Page 18: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/18.jpg)
18
a
x y
x+
+
…
a
x y+
…
rb
B axiom a.(.(x+y) + x) = a.(x+y)
Axiomazing Rooted branching bisimulation
bb
Turned into equation looks like:
![Page 19: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/19.jpg)
19 Process Algebra (2IF45)
Axiomatizing Rooted Branching Bisimulations
Language: BPA(A)
Signature: 0, 1, (a._ )aA, , +, • Language terms T(BPA(A,))
Closed terms C(BPA(A))
Strong Bisimilarity on LTSs Equality of terms
x+ y = y+x (x+y) + z = x+ (y + z)
x + x = x x+ 0 = x
(x+ y) z = x z+y z(x y) z = x (y z)
0 x = 0 x 1 = x 1 x = x
a.x y = a.(x y)
a.(.(x+y) + x) = a.(x+y)
Completeness
Soundness
Deduction rules for BPA(A) (a A): x x’ x + y x’
a
a
1 x (x + y)
a.x x a
y y’ x + y y’
aa
y (x + y) ⑥
x x’ x y x’ y
a
a
x y (x y)
x y y’ x y y’
a
a
Rooted Branching
![Page 20: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/20.jpg)
20
Home work
• Prove soundness of B axiom wrt rooted BB• Read the proof of ground completeness
Process Algebra (2IF45)
![Page 21: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/21.jpg)
21 Process Algebra (2IF45)
Combining internal step with other operators Language: BPA(A)
Signature: 0, 1, (a._ )aA, , +, • Language terms T(BPA(A,))
Closed terms C(BPA(A))
Axioms Deduction rules
![Page 22: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/22.jpg)
22 Process Algebra (2IF45)
Combining internal step with other operators:Hiding operator
Language: BPA(A)
Signature: 0, 1, (a._ )aA, , +, •, I (I A)
Language terms T(BPA(A,))
Closed terms C(BPA(A))
Axioms for I Deduction rules for I
turns external actions into internal steps
![Page 23: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/23.jpg)
23 Process Algebra (2IF45)
Combining internal step with other operators:Encapsulation operator
Language with
Signature: 0, 1, (a._ )aA, , +, H (H A) blocks actions
![Page 24: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/24.jpg)
24 Process Algebra (2IF45)
Combining internal step with other operators:Parallel composition and communication
Language: TCP(A)
Signature: 0, 1, (a._ )aA, , +, •, I (I A), ||, |, ╙, H,
Language terms T(BPA(A, ))
Closed terms C(BPA(A, )) Axioms for parallel composition with silent step:
x ╙ .y = x ╙ y
x |.y = 0
![Page 25: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/25.jpg)
25
Exercises
• see distributed copies
Process Algebra (2IF45)
![Page 26: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/26.jpg)
26
Abstraction, silent steps and Recursion
Guardedness and silent steps: cannot be a guard of a variable
X = .X has solutions ..a.1 but also ..b.1
Guardedness and hiding operator: I cannot appear in tX in X = tX
X = i.I(X), where i I has solutions i.i.a.1 but also i.i.b.1
Process Algebra (2IF45)
![Page 27: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/27.jpg)
27
Abstraction and Recursion and Fairness
Process Algebra (2IF45)
X
Y
a
0
Z
U
a
0
Observation:1. they are rooted bb bisimilar2. implicitly internal loop is left eventually
= fairness
![Page 28: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/28.jpg)
28
Abstraction and Recursion and Fairness
Process Algebra (2IF45)
X
Y
a
0
X = .YY = .Y + a.0
Z
U
a
0
Z = .UU = a.0
RSP+RDP? X = Z
Observation on LTSs:1. they are rooted bb bisimilar2. implicitly internal loop is left eventually
= fairness
As recursive specifications:
![Page 29: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/29.jpg)
29
Abstraction and Recursion and Fairness
Process Algebra (2IF45)
X
Y
a
0
X = .YY = .Y + a.0
Z
U
a
0
Z = .UU = a.0
RSP+RDP? X = Z
At least two problems: 1. Those are not guarder recursive specifications!2. Even if they are somehow made guarded, B axiom is not sufficient
to rewrite one spec into another
Observation on LTSs:1. they are rooted bb bisimilar2. implicitly internal loop is left eventually
= fairness
As recursive specifications:
![Page 30: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/30.jpg)
30 Process Algebra (2IF45)
X = .YY = .Y + a.0
X’ = i.Y’Y’ = i.Y’ + a.0
for some action i to be turned internal “soon”by applying I for I = {i}
represents
X
Y
a
0
X’
Y’
i
a
0
iapplying {i}
Abstraction and Recursion and Fairness: problem 1. dealing with guardedness
![Page 31: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/31.jpg)
31 Process Algebra (2IF45)
Z = .UU = a.0
Z’ = i.U’U’ = a.0
Z’
U’
i
a
0
Z
U
0
applying {i}
a
Abstraction and Recursion and Fairness: problem 1. dealing with guardedness
X = .YY = .Y + a.0
X’ = i.Y’Y’ = i.Y’ + a.0
for some action i to be turned internal “soon”by applying I for I = {i}
represents
X
Y
a
0
X’
Y’
i
a
0
iapplying {i}
represents
![Page 32: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/32.jpg)
32 Process Algebra (2IF45)
Z = .UU = a.0
Z’ = i.U’U’ = a.0
Z’
U’
i
a
0
applying {i} Z
U
0
a
Abstraction and Recursion and Fairness: problem 1. dealing with guardedness
X = .YY = .Y + a.0
X’ = i.Y’Y’ = i.Y’ + a.0
for some action i to be turned internal “soon”by applying I for I = {i}
represents
X
Y
a
0
X’
Y’
i
a
0
iapplying {i}
represents
OK! OK!
How to connect them
?
![Page 33: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/33.jpg)
33 Process Algebra (2IF45)
X’ = i.Y’Y’ = i.Y’ + a.0
Something like this shall help:
Y’ = i.Y’ + a.0 . I(Y’) = . I(a.0)
Abstraction and Recursion and Fairness: problem 2. derivation rulesWe want to derive that I(X’) = I(Z’)! We need new rules for this!
![Page 34: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/34.jpg)
34 Process Algebra (2IF45)
a bit more general rule:
x1 = i1.x1 + y1, i1 I
. I(x1) = . I(y1)
Abstraction and Recursion and Fairness: Fairness rule KFAR1
b
![Page 35: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/35.jpg)
35 Process Algebra (2IF45)
General KFAR rule is:
x1 = i1.x2 + y1,x2 = i2.x3 + y2,… xn = in.x1 + yn, i1, … in I , there is ik
. I(x1) = . (I(y1) + … + I(yn))
Abstraction and Recursion and Fairness: Fairness rule KFARn
b
![Page 36: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/36.jpg)
36 Process Algebra (2IF45)
Abstraction and Recursion and Fairness:Example of tossing a coin
![Page 37: Process Algebra (2IF45) Abstraction in Process Algebra](https://reader035.fdocuments.us/reader035/viewer/2022081422/56816520550346895dd79f84/html5/thumbnails/37.jpg)
37
Home Work (part2)
• Study the Coin tossing example• Study the complete proof for ABP, derivation up to abstraction
and derivation by means of fairness derivation rules.
Process Algebra (2IF45)