An introduction to the
π
-calculus
Model, Variations, Semantics
Vladimiro Sassone
The
π
calculus
The syntax
An infinite set of names: N = {x, y, z, . . .}. Action prefixes
π ::= x(y) | x¯hyi | τ
Processes
P ::= X
i∈I
Reductions
(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi) (νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi)
(νz)(0 | y¯hvi | x¯hzi) (νz)(x¯hyi+z(w).w¯hyi | z¯hvi | 0)
Reductions
(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi) (νz)(0 | y¯hvi | x¯hzi) (νz)(x¯hyi+z(w).w¯hyi | z¯hvi | 0)
Reductions
(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi)
(νz)(0 | y¯hvi | x¯hzi)
(νz)(0 | y¯hvi | x¯hzi) (νz)(x¯hyi+z(w).w¯hyi | z¯hvi | 0)
Reductions
(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi)
(νz)(0 | y¯hvi | x¯hzi) (νz)(x¯hyi+z(w).w¯hyi | z¯hvi | 0) (νz)(0 | y¯hvi | x¯hzi) (νz)(x¯hyi+z(w).w¯hyi | z¯hvi | 0)
Reductions
(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi)
Reductions
(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi)
Contexts and Congruences
Process Contexts
C ::= [ ] | π .C + P | (νa)C | C|P | P|C | !C
Conguences
A relation is a congruence if it is preserved by all contexts, that is P Q implies:
π .P + R π .Q + R (νa)P (νa)Q
P | R Q! | P R | P R | Q
Structural Congruence
P ≡ Q if they can be transformed into each other using
alpha-conversion: for z not free in P
x(y).P ≡ x(z).{z/y}P
(νa)P ≡ (νz){z/a}P; rearrangement of terms in summations;
commutative monoidal laws for | (with 0 as unit); (νz)(P | Q) ≡ (νz)P | Q, if z not free in Q; (νz)0 ≡ 0, (νx)(νy)P ≡ (νy)(νx)P.
Structural Congruence
P ≡ Q if they can be transformed into each other using
alpha-conversion: for z not free in P
x(y).P ≡ x(z).{z/y}P
(νa)P ≡ (νz){z/a}P;
rearrangement of terms in summations; commutative monoidal laws for | (with 0 as unit);
(νz)(P | Q) ≡ (νz)P | Q, if z not free in Q;
(νz)0 ≡ 0, (νx)(νy)P ≡ (νy)(νx)P.
Structural Congruence
P ≡ Q if they can be transformed into each other using
alpha-conversion: for z not free in P
x(y).P ≡ x(z).{z/y}P
(νa)P ≡ (νz){z/a}P;
rearrangement of terms in summations;
commutative monoidal laws for | (with 0 as unit); (νz)(P | Q) ≡ (νz)P | Q, if z not free in Q;
(νz)0 ≡ 0, (νx)(νy)P ≡ (νy)(νx)P.
Structural Congruence
P ≡ Q if they can be transformed into each other using
alpha-conversion: for z not free in P
x(y).P ≡ x(z).{z/y}P
(νa)P ≡ (νz){z/a}P;
rearrangement of terms in summations;
commutative monoidal laws for | (with 0 as unit); (νz)(P | Q) ≡ (νz)P | Q, if z not free in Q;
(νz)0 ≡ 0, (νx)(νy)P ≡ (νy)(νx)P.
Structural Congruence
P ≡ Q if they can be transformed into each other using
alpha-conversion: for z not free in P
x(y).P ≡ x(z).{z/y}P
(νa)P ≡ (νz){z/a}P;
rearrangement of terms in summations;
commutative monoidal laws for | (with 0 as unit); (νz)(P | Q) ≡ (νz)P | Q, if z not free in Q;
Standard Form
A process
(ν ~a)(M1 | · · · | Mm | !Q1 | · · · | !Qn)
is in standard form if
1. each Mi is a sum and
2. each Qi is itself in standard form.
Reaction Rules
REACTION RULES
TAU : (τ.P + M) → P
REACT : (M + x(y).P ) | (x¯hzi.Q + M0) → {z/y}P | Q
PAR : P → P
0
P | Q → P0 | Q RES : P
→ P0
(νa)P → (νa)P0
STRUCT : P ≡ P
0 P0 → Q0 Q0 ≡ Q
An example
Although it may appear not obvious, the term
x(z).y¯hzi | !(νy)x¯hyi.Q
has a redex. Let us use ≡ to uncover it.
Although it may appear not obvious, the term
x(z).y¯hzi | !(νy)x¯hyi.Q
An example
Although it may appear not obvious, the term
x(z).y¯hzi | !(νy)x¯hyi.Q
has a redex. Let us use ≡ to uncover it.
≡ x(z).y¯hzi | (νy)x¯hyi.Q | !(νy)x¯hyi.Q
Although it may appear not obvious, the term
x(z).y¯hzi | !(νy)x¯hyi.Q
An example
Although it may appear not obvious, the term
x(z).y¯hzi | !(νy)x¯hyi.Q
has a redex. Let us use ≡ to uncover it.
An example
Although it may appear not obvious, the term
x(z).y¯hzi | !(νy)x¯hyi.Q
has a redex. Let us use ≡ to uncover it.
An example
Although it may appear not obvious, the term
x(z).y¯hzi | !(νy)x¯hyi.Q
has a redex. Let us use ≡ to uncover it.
Mobility
P8?9>:=;<
x z ? ? ? ? ? ? ? ? ??
@GAFBECD
QR
@GAFBECD
Mobility
P8?9>:=;<
x z > > > > > > > > >>
@GAFBECD
QR
@GAFBECD
Mobility
P8?9>:=;<
x z > > > > > > > > >>
@GAFBECD
QR
@GAFBECD
(νz)(P | Q) | R
Mobility
P8?9>:=;<
x z > > > > > > > > >>
@GAFBECD
QR
@GAFBECD
(νz)(P | Q) | R
P
8?9>:=;<
x Q@GAFBECD
z R@GAFBECD
P0 | (νz)(Q0 | R)
Polyadic
π
The idea:
x(y1, . . . , yn).P | x¯hz1, . . . , zni.Q → {z/ ~~ y}P | Q
Is it a more expressive paradigm? Or can it be encoded? Encoding? ]x¯hz1, z2i.P^ = x¯hz1i.x¯hz2i.]P^.
Right idea:
[x¯hz1, z2i.P\ = (νz)x¯hzi.z¯hz1i.z¯hz2i.[P\ [x(z1, z2).P\ = x(y).y(y1).y(y2).[P\
Polyadic
π
The idea:
x(y1, . . . , yn).P | x¯hz1, . . . , zni.Q → {z/ ~~ y}P | Q
Is it a more expressive paradigm? Or can it be encoded? Encoding? ]x¯hz1, z2i.P^ = x¯hz1i.x¯hz2i.]P^.
Right idea:
[x¯hz1, z2i.P\ = (νz)x¯hzi.z¯hz1i.z¯hz2i.[P\ [x(z1, z2).P\ = x(y).y(y1).y(y2).[P\
Polyadic
π
The idea:
x(y1, . . . , yn).P | x¯hz1, . . . , zni.Q → {z/ ~~ y}P | Q
Is it a more expressive paradigm? Or can it be encoded? Encoding? ]x¯hz1, z2i.P^ = x¯hz1i.x¯hz2i.]P^.
Wrong idea:
]x¯hz1, z2i.P | x(y1, y2).Q1 | x(y1, y2).Q2^ -→∗
]P^ | x(y2).{z1/y1}]Q1^ | x(y2).{z2/y2}]Q2^
Right idea:
[x¯hz1, z2i.P\ = (νz)x¯hzi.z¯hz1i.z¯hz2i.[P\ [x(z1, z2).P\ = x(y).y(y1).y(y2).[P\
Polyadic
π
The idea:
x(y1, . . . , yn).P | x¯hz1, . . . , zni.Q → {z/ ~~ y}P | Q
Is it a more expressive paradigm? Or can it be encoded? Encoding? ]x¯hz1, z2i.P^ = x¯hz1i.x¯hz2i.]P^.
Right idea:
[x¯hz1, z2i.P\ = (νz)x¯hzi.z¯hz1i.z¯hz2i.[P\ [x(z1, z2).P\ = x(y).y(y1).y(y2).[P\
Summation
The original calculus has unguarded sums:
P ::= . . . | P + P
This makes the theory more complex while producing little gains in expressiveness.
Input guarded sum: Pi∈I xi(y).P
Rejects things like (x.P + y¯.Q) | (x¯.P0 + y.Q0). No choice:
Matching and Mismatching
The original calculus has
P ::= . . . | [x = y]P | [x ≠ y]P
[x = x]P → P [x ≠ y]P → P
Useful in programming, it somehow complicates the theory. A general encoding is not known, but in some interesting cases its effect can be recovered to a certain extent:
]a(x).(X
i
[x = ki]Pi)^ = a(x).(x¯hi | X
i
Recursive Definitions
It is useful to be able to write
A( ~x) def= QA, where QA = · · · Ahw~i · · ·Ahw~i · · ·
It can be obtained using replication as follows
1. Choose aA to stand for A;
2. Rb = replace Ahw~i with a¯Ahw~i in R;
3. Pbb = (νaA)(Pb | !aA( ~x).QdA).
Asynchronous
π
No continuation on output: x¯hyi.P
The closest you can simulate it: P ≡ τ.(P0 | x¯hyi).
How can P know when and if the output is received? Explicit continuations
sender: τ.(x¯hyi | x.P0) receiver: x(y).(Q0 | x¯).
But the synchronisation is now much looser... This is widely accepted to be a better base for distribution. No sums
Asynchronous
π
No continuation on output: x¯hyi.P
The closest you can simulate it: P ≡ τ.(P0 | x¯hyi).
How can P know when and if the output is received? Explicit continuations
sender: τ.(x¯hyi | x.P0) receiver: x(y).(Q0 | x¯).
But the synchronisation is now much looser... This is widely accepted to be a better base for distribution. No sums
Asynchronous
π
No continuation on output: x¯hyi.P
The closest you can simulate it: P ≡ τ.(P0 | x¯hyi).
How can P know when and if the output is received? Explicit continuations
sender: τ.(x¯hyi | x.P0) receiver: x(y).(Q0 | x¯).
But the synchronisation is now much looser... This is widely accepted to be a better base for distribution. No sums
Other variants
Local π: Disallow inputs on x in the body of a(x).P.
Internal π: Disallow external mobility (output of free names): Processes can only pass names their own private names.
Higher Order
π
The most natural suggestion for process mobility:
π ::= · · · | x(X) | x¯hPi
P ::= · · · | X
Higher Order
π
The most natural suggestion for process mobility:
π ::= · · · | x(X) | x¯hPi
P ::= · · · | X
x(X).P | x¯hRi.Q → {R/X}P | Q
¯
ahb¯huii.b(x) | a(X).(X | c¯hvi) → b(x) | b¯hui | c¯hvi.
Higher Order
π
The most natural suggestion for process mobility:
π ::= · · · | x(X) | x¯hPi
P ::= · · · | X
x(X).P | x¯hRi.Q → {R/X}P | Q
Thm. Encoding ‘fully abstract’. Assume a name an unused name x associated to each X.
[[a¯hPi.Q]] = (νp)a¯hpi.([[Q]] | !p.[[P ]]), p fresh
Observations and Bisimulation
Observations: P↓a if P can engage in action a
P ≡ (ν ~x)(α.P + · · ·) α ∈ {a¯hzi, a(y)}, a 6∈ x~
Barbed Bisimulation ∼· B: is the largest equivalence relation ó s.t. for all PóQ
1. P → P0 then Q → Q0 for some such that P0óQ0;
Observations and Contexts
Barbed equivalence is very weak:
¯
ahui ∼· B a¯hvi ∼· B (νu)a¯hui
But contexts are very powerful enquirers:
C = (νa)([ ] | a(x).x). Then
C[a¯hui] → (νa)u↓u C[a¯hvi] → (νa)v↓v C[(νu)a¯hui] → (νau)u6↓
Barbed Congruence ∼B: Is the largest congruence in ∼· B,
Observations and Contexts
Barbed equivalence is very weak:
¯
ahui ∼· B a¯hvi ∼· B (νu)a¯hui
But contexts are very powerful enquirers:
C = (νa)([ ] | a(x).x). Then
C[a¯hui] → (νa)u↓u C[a¯hvi] → (νa)v↓v C[(νu)a¯hui] → (νau)u6↓
Barbed Congruence ∼B: Is the largest congruence in ∼· B,
Observations and Contexts
Barbed equivalence is very weak:
¯
ahui ∼· B a¯hvi ∼· B (νu)a¯hui
But contexts are very powerful enquirers:
C = (νa)([ ] | a(x).x). Then
C[a¯hui] → (νa)u↓u C[a¯hvi] → (νa)v↓v C[(νu)a¯hui] → (νau)u6↓
Therefore Barbed Congruence ∼B: Is the largest congruence in ∼· B,
Observations and Contexts
Barbed equivalence is very weak:
¯
ahui ∼· B a¯hvi ∼· B (νu)a¯hui
But contexts are very powerful enquirers:
C = (νa)([ ] | a(x).x). Then
C[a¯hui] → (νa)u↓u C[a¯hvi] → (νa)v↓v C[(νu)a¯hui] → (νau)u6↓
Labelled Transitions
Barbed bisimulation derives naturally from the
reduction rules. Congruences are brought about by engineering,
mathematical and logical considerations.
But barbed congruence is hard to understand and work with.
Desiderata: Characterise it in terms of:
1. bisimulations (easy to reason with – coinduction)
Labelled Transitions
Barbed bisimulation derives naturally from the
reduction rules.
Congruences are brought about by engineering, mathematical and logical considerations.
But barbed congruence is hard to understand and work with.
Desiderata: Characterise it in terms of:
1. bisimulations (easy to reason with – coinduction)
Labelled Transitions
Barbed bisimulation derives naturally from the
reduction rules.
Congruences are brought about by engineering, mathematical and logical considerations.
But barbed congruence is hard to understand and work with.
Desiderata: Characterise it in terms of:
1. bisimulations (easy to reason with – coinduction)
Labelled Transitions
Barbed bisimulation derives naturally from the
reduction rules.
Congruences are brought about by engineering, mathematical and logical considerations.
But barbed congruence is hard to understand and work with.
Desiderata: Characterise it in terms of:
1. bisimulations (easy to reason with – coinduction)
Abstractions and Concretions
x(y).P has the shape xF, for F = (y).P ¯
xhzi.Q has the shape x.C¯ , for C = hzi.Q
For bound output: C = (νa)hzi.Q (a = z or ν absent).
(y).P • (νa)hzi.Q = (νa)({z/y}P | Q), a not free in P
(y).P | R = (y).(P | R), y not free in R
(νc)(y).P = (y).(νc)P , c ≠ y
(νa)hzi.Q | R = (νa)hzi.(Q | R), z not free in R
(νc)(νa)hzi.Q =
(
(νa)hzi.(νc)Q, c ≠ z
Commitment Relation
COMMITMENT RULES
SUM : M + αA -→α A
REACTL,R : P
x
-→ F Q -→x¯ C
P | Q -→τ F • C
P -→x¯ C Q -→x F
P | Q -→τ F • C
PARL,R : P
α
-→ A
P | Q -→α A | Q
Q -→α A
P | Q -→α A | P
RES : P
α
-→ A
(νa)P -→α (νa)Aα 6∈ {a, a¯} REP :
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P | (νa)x¯hai.Q -→?
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→?
x(y).P | (νa)x¯hai.Q -→?
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
x(y).P | (νa)x¯hai.Q -→?
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P (νa)x¯hai.Q -→?
x(y).P | (νa)x¯hai.Q -→?
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
¯
xhai.Q -→?
(νa)x¯hai.Q -→?
x(y).P | (νa)x¯hai.Q -→?
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→?
x(y).P | (νa)x¯hai.Q -→?
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→?
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (y).P • (νa)hai.Q
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
(y).P • hai.Q = ({a/y}P | Q)
An example
Let us show how to prove that
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
x(y).P -→x (y).P
¯
xhai.Q -→ hx¯ ai.Q
(νa)x¯hai.Q -→x¯ (νa)hai.Q
x(y).P | (νa)x¯hai.Q -→τ (νa)({a/y}P | Q)
The role of •:
Bisimulation
Strong (late) Bisimulation ∼· L: is the largest equivalence relation ó s.t. for all PóQ
1. P -→x (y).P0 then Q -→x (y0).Q0 for some (y0).Q0 such that {z/y}P0ó{z/y0}Q0, for all z ∈ N ;
2. P -→x¯ (νa)hzi.P0 then Q -→x¯ (νa)hzi.Q0 for some Q0
such that P0óQ0;
Congruence
·
∼L is not preserved by substitution:
¯
x | y ∼· L x.y¯ + y.x¯ ¯
x | x ∼· L x.x¯ + x.x¯ + τ 6∼· L x.x¯ + x.x¯
Similarly for matching.
[x = y]c ∼· L 0 but [x = x]c 6∼· L 0
Thm. Let ∼L be the largest congruence in ∼· L. Then,
Early bisimulation
Strong early Bisimulation ∼· E: is defined as ∼· L replacing
if P -→x (y).P0 then ∃Q -→x (y0).Q0.∀z.{z/y}P0ó{z/y0}Q0
if P -→x (y).P0 then ∃Q -→x (y0).Q0.∀z.{z/y}P0ó{z/y0}Q0
with the looser
if P -→x (y).P0 then ∀z.∃Q -→x (y0).Q0.{z/y}P0ó{z/y0}Q0
Thm. Let ∼L be the largest congruence in ∼· L. Then,
P ∼L Q iff σ P ∼· L σ Q for all substitutions σ.
In practice the difference is minimal, but in theory:
Early bisimulation
Strong early Bisimulation ∼· E: is defined as ∼· L replacing
if P -→x (y).P0 then ∃Q -→x (y0).Q0.∀z.{z/y}P0ó{z/y0}Q0
with the looser
if P -→x (y).P0 then ∀z.∃Q -→x (y0).Q0.{z/y}P0ó{z/y0}Q0
Thm. Let ∼L be the largest congruence in ∼· L. Then,
P ∼L Q iff σ P ∼· L σ Q for all substitutions σ.
In practice the difference is minimal, but in theory:
Early bisimulation
Strong early Bisimulation ∼· E: is defined as ∼· L replacing
if P -→x (y).P0 then ∃Q -→x (y0).Q0.∀z.{z/y}P0ó{z/y0}Q0
with the looser
if P -→x (y).P0 then ∀z.∃Q -→x (y0).Q0.{z/y}P0ó{z/y0}Q0
Thm. Let ∼L be the largest congruence in ∼· L. Then,
P ∼L Q iff σ P ∼· L σ Q for all substitutions σ.
Summary Strong Equivalences
·
∼B
·
∼? E
O
O
∼B = ∼) E
6 6 n n n n n n n n 1 B B ·
∼? L
O
O
∼L)
Weak bisimulations
Ignore internal steps (τ)
Weak Barbed ≈· B and ≈B: Replace
↓x with ⇓x def= →∗↓x, and → with ⇒ def= →∗
Weak Bisimulations ≈· L and ≈L: Replace
τ
-→ with =⇒ def= -→τ ∗,
x
Summary Weak Equivalence
The theory parallels that of the strong equivalences.
·
≈B
·
≈? E
O
O
≈B = ≈) E
7 7 n n n n n n n n 1 C C ·
≈? L
Axioms for Bisimulation
‘=’ contains ‘≡’.
‘=’ is preserved by all contexts except x(y).[ ].
{z/y}P = {z/y}Q, ∀ z ∈ fn(P , Q, y) x(y).P = x(y).Q
P + P = P
(νx) Pi πi.Pi = Pi πi.(νx)Pi, if no πi has name x
(νx) Pi πi.Pi = 0, if all πi have subject x or x¯.
P | Q = P{α.(P0|Q) | α.P0 a summand of P}
+ P{α.(P|Q0) | α.Q0 a summand of Q}
+ P{τ.(F • C) | xF , xC¯ summands of P , Q}
Axioms for Bisimulation
‘=’ contains ‘≡’.
‘=’ is preserved by all contexts except x(y).[ ]. {z/y}P = {z/y}Q, ∀ z ∈ fn(P , Q, y)
x(y).P = x(y).Q
P + P = P
(νx) Pi πi.Pi = Pi πi.(νx)Pi, if no πi has name x
(νx) Pi πi.Pi = 0, if all πi have subject x or x¯.
P | Q = P{α.(P0|Q) | α.P0 a summand of P}
+ P{α.(P|Q0) | α.Q0 a summand of Q}
+ P{τ.(F • C) | xF , xC¯ summands of P , Q}
Axioms for Bisimulation
‘=’ contains ‘≡’.
‘=’ is preserved by all contexts except x(y).[ ].
{z/y}P = {z/y}Q, ∀ z ∈ fn(P , Q, y) x(y).P = x(y).Q
P + P = P
(νx) Pi πi.Pi = Pi πi.(νx)Pi, if no πi has name x
(νx) Pi πi.Pi = 0, if all πi have subject x or x¯.
P | Q = P{α.(P0|Q) | α.P0 a summand of P}
+ P{α.(P|Q0) | α.Q0 a summand of Q}
+ P{τ.(F • C) | xF , xC¯ summands of P , Q}
Axioms for Bisimulation
‘=’ contains ‘≡’.
‘=’ is preserved by all contexts except x(y).[ ].
{z/y}P = {z/y}Q, ∀ z ∈ fn(P , Q, y) x(y).P = x(y).Q
P + P = P
(νx) Pi πi.Pi = Pi πi.(νx)Pi, if no πi has name x
(νx) Pi πi.Pi = 0, if all πi have subject x or x¯.
P | Q = P{α.(P0|Q) | α.P0 a summand of P}
+ P{α.(P|Q0) | α.Q0 a summand of Q}
+ P{τ.(F • C) | xF , xC¯ summands of P , Q}
Axioms for Bisimulation
‘=’ contains ‘≡’.
‘=’ is preserved by all contexts except x(y).[ ].
{z/y}P = {z/y}Q, ∀ z ∈ fn(P , Q, y) x(y).P = x(y).Q
P + P = P
(νx) Pi πi.Pi = Pi πi.(νx)Pi, if no πi has name x
(νx) Pi πi.Pi = 0, if all πi have subject x or x¯.
P | Q = P{α.(P0|Q) | α.P0 a summand of P}
+ P{α.(P|Q0) | α.Q0 a summand of Q}
+ P{τ.(F • C) | xF , xC¯ summands of P , Q}
Axioms for Bisimulation
‘=’ contains ‘≡’.
‘=’ is preserved by all contexts except x(y).[ ].
{z/y}P = {z/y}Q, ∀ z ∈ fn(P , Q, y) x(y).P = x(y).Q
P + P = P
(νx) Pi πi.Pi = Pi πi.(νx)Pi, if no πi has name x
(νx) Pi πi.Pi = 0, if all πi have subject x or x¯.
P | Q = P{α.(P0|Q) | α.P0 a summand of P}
+ P{α.(P|Q0) | α.Q0 a summand of Q}
+ P{τ.(F C) | xF , xC¯ summands of P , Q}
Axioms for Bisimulation
‘=’ contains ‘≡’.
‘=’ is preserved by all contexts except x(y).[ ].
{z/y}P = {z/y}Q, ∀ z ∈ fn(P , Q, y) x(y).P = x(y).Q
P + P = P
(νx) Pi πi.Pi = Pi πi.(νx)Pi, if no πi has name x
(νx) Pi πi.Pi = 0, if all πi have subject x or x¯.
P | Q = P{α.(P0|Q) | α.P0 a summand of P}
+ P{α.(P|Q0) | α.Q0 a summand of Q}
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
¯
xhzi | x(y).y¯hki
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
(νxz)(x¯hzi | x(y).y¯hki)
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
(νxz)(x¯hzi | x(y).y¯hki)
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
(νxz)(x¯hzi | x(y).y¯hki)
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
(νxz)(x¯hzi | x(y).y¯hki)
= (νxz) x¯hzi.x(y).y¯hki + x(y).(x¯hzi | y¯hki) + τ.z¯hki = (νxz)τ.z¯hki
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
(νxz)(x¯hzi | x(y).y¯hki)
= (νxz) x¯hzi.x(y).y¯hki + x(y).(x¯hzi | y¯hki) + τ.z¯hki = (νxz)τ.z¯hki
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
(νxz)(x¯hzi | x(y).y¯hki)
= (νxz) x¯hzi.x(y).y¯hki + x(y).(x¯hzi | y¯hki) + τ.z¯hki = (νxz)τ.z¯hki
Examples
Expansion law:
x(y).P | x¯hzi.Q = x¯hzi.(x(y).P | Q) + x(y).(P | x¯hzi.Q) + τ.({z/y}P | Q)
(νx) (νz)x¯hzi | x(y).y¯hki = τ
(νxz)(x¯hzi | x(y).y¯hki)
= (νxz) x¯hzi.x(y).y¯hki + x(y).(x¯hzi | y¯hki) + τ.z¯hki = (νxz)τ.z¯hki
Congruence and Weak Bisimulation
In order to extend ‘=’ to capture ∼L
replace the two congruence rule by ‘=’ is preserved by
all contexts.
the expansion law must include terms
[x = y]τ.(F • C)
for xF and yC¯ summands of P and Q. In order to capture ≈L add the three tau laws:
α.τ.P = α.P P + τ.P = τ.P
Congruence and Weak Bisimulation
In order to extend ‘=’ to capture ∼L
replace the two congruence rule by ‘=’ is preserved by
all contexts.
the expansion law must include terms
[x = y]τ.(F • C)
for xF and yC¯ summands of P and Q.
In order to capture ≈L add the three tau laws:
Modal Logics
ϕ ::= > | ϕ ∧ ϕ | ¬ϕ | x = y | hαiϕ | (Px)ϕ | (Q x)ϕ
A î > always
A î ϕ ∧ ψ iff A î ϕ and A î ψ
A î ¬ϕ iff not A î ϕ
A î x = y iff x and y are the same name
A î hαiϕ iff exists A -→α B and B î ϕ
A î (Px)ϕ iff A ≡ hzi.P or A ≡ (νz)hzi.P(z6∈fn(ϕ)\{x})
and P î ϕ{z/x}
A î (Qx)ϕ iff A ≡ (y).P and {z/y}P î ϕ{z/x} for all z
Modal Logics
ϕ ::= > | ϕ ∧ ϕ | ¬ϕ | x = y | hαiϕ | (Px)ϕ | (Q x)ϕ
A î > always
A î ϕ ∧ ψ iff A î ϕ and A î ψ
A î ¬ϕ iff not A î ϕ
A î x = y iff x and y are the same name
A î hαiϕ iff exists A -→α B and B î ϕ
A î (Px)ϕ iff A ≡ hzi.P or A ≡ (νz)hzi.P(z6∈fn(ϕ)\{x})
and P î ϕ{z/x}
A î (Qx)ϕ iff A ≡ (y).P and {z/y}P î ϕ{z/x} for all z
Modal Logics
ϕ ::= > | ϕ ∧ ϕ | ¬ϕ | x = y | hαiϕ | (Px)ϕ | (Q x)ϕ
A î > always
A î ϕ ∧ ψ iff A î ϕ and A î ψ
A î ¬ϕ iff not A î ϕ
A î x = y iff x and y are the same name
A î hαiϕ iff exists A -→α B and B î ϕ
A î (Px)ϕ iff A ≡ hzi.P or A ≡ (νz)hzi.P(z6∈fn(ϕ)\{x})
and P î ϕ{z/x}
An example
Let P = x¯hyi and ϕ = hx¯i(Pz)(z = y), and let us prove
that P î ϕ.
Since P -→ hx¯ yi, P î ϕ iff hyi î (Pz)(z = y).
And hyi î (P z)(z = y), since î y = y
On the other hand, Q = (νy)x¯hyi does not satisfy ϕ. In
fact:
since Q -→x¯ (νy)hyi ≡ (νk)hki, P can satisfy ϕ only
if (νk)hki î (Pz)(z = y).
And this does not happen, as î (k = y) is false.
An example
Let P = x¯hyi and ϕ = hx¯i(Pz)(z = y), and let us prove
that P î ϕ.
Since P -→ hx¯ yi, P î ϕ iff hyi î (Pz)(z = y).
And hyi î (P z)(z = y), since î y = y
On the other hand, Q = (νy)x¯hyi does not satisfy ϕ. In
fact:
since Q -→x¯ (νy)hyi ≡ (νk)hki, P can satisfy ϕ only
if (νk)hki î (Pz)(z = y).
And this does not happen, as î (k = y) is false.
An example
Let P = x¯hyi and ϕ = hx¯i(Pz)(z = y), and let us prove
that P î ϕ.
Since P -→ hx¯ yi, P î ϕ iff hyi î (Pz)(z = y).
And hyi î (P z)(z = y), since î y = y
On the other hand, Q = (νy)x¯hyi does not satisfy ϕ. In
fact: since Q -→x¯ (νy)hyi ≡ (νk)hki, P can satisfy ϕ only
if (νk)hki î (Pz)(z = y).
And this does not happen, as î (k = y) is false.
An example
Let P = x¯hyi and ϕ = hx¯i(Pz)(z = y), and let us prove
that P î ϕ.
Since P -→ hx¯ yi, P î ϕ iff hyi î (Pz)(z = y).
And hyi î (P