• No results found

An Introduction to the π Calculus Model, Variations, Semantics (talk)

N/A
N/A
Protected

Academic year: 2020

Share "An Introduction to the π Calculus Model, Variations, Semantics (talk)"

Copied!
97
0
0

Loading.... (view fulltext now)

Full text

(1)

An introduction to the

π

-calculus

Model, Variations, Semantics

Vladimiro Sassone

(2)

The

π

calculus

The syntax

An infinite set of names: N = {x, y, z, . . .}. Action prefixes

π ::= x(y) | x¯hyi | τ

Processes

P ::= X

iI

(3)

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)

(4)

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)

(5)

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)

(6)

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)

(7)

Reductions

(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi)

(8)

Reductions

(νz)(x¯hyi + z(w).w¯hyi | x(u).u¯hvi | x¯hzi)

(9)

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

(10)

Structural Congruence

PQ if they can be transformed into each other using

alpha-conversion: for z not free in P

x(y).Px(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)00, (νx)(νy)P(νy)(νx)P.

(11)

Structural Congruence

PQ if they can be transformed into each other using

alpha-conversion: for z not free in P

x(y).Px(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.

(12)

Structural Congruence

PQ if they can be transformed into each other using

alpha-conversion: for z not free in P

x(y).Px(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.

(13)

Structural Congruence

PQ if they can be transformed into each other using

alpha-conversion: for z not free in P

x(y).Px(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.

(14)

Structural Congruence

PQ if they can be transformed into each other using

alpha-conversion: for z not free in P

x(y).Px(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;

(15)

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.

(16)

Reaction Rules

REACTION RULES

TAU : (τ.P + M)P

REACT : (M + x(y).P ) | (x¯hzi.Q + M0) → {z/y}P | Q

PAR : PP

0

P | QP0 | Q RES : P

P0

(νa)P(νa)P0

STRUCT : PP

0 P0 Q0 Q0 Q

(17)

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

(18)

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

(19)

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.

(20)

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.

(21)

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.

(22)

Mobility

P

8?9>:=;<

x z ? ? ? ? ? ? ? ? ?

?

@GAFBECD

Q

R

@GAFBECD

(23)

Mobility

P

8?9>:=;<

x z > > > > > > > > >

>

@GAFBECD

Q

R

@GAFBECD

(24)

Mobility

P

8?9>:=;<

x z > > > > > > > > >

>

@GAFBECD

Q

R

@GAFBECD

(νz)(P | Q) | R

(25)

Mobility

P

8?9>:=;<

x z > > > > > > > > >

>

@GAFBECD

Q

R

@GAFBECD

(νz)(P | Q) | R

P

8?9>:=;<

x Q

@GAFBECD

z    R

@GAFBECD

P0 | (νz)(Q0 | R)

(26)

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\

(27)

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\

(28)

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\

(29)

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\

(30)

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: PiI xi(y).P

Rejects things like (x.P + y¯.Q) | (x¯.P0 + y.Q0). No choice:

(31)

Matching and Mismatching

The original calculus has

P ::= . . . | [x = y]P | [xy]P

[x = x]PP [xy]PP

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

(32)

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

(33)

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

(34)

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

(35)

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

(36)

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.

(37)

Higher Order

π

The most natural suggestion for process mobility:

π ::= · · · | x(X) | x¯hPi

P ::= · · · | X

(38)

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.

(39)

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

(40)

Observations and Bisimulation

Observations: Pa 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. PP0 then QQ0 for some such that P0óQ0;

(41)

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)uu C[a¯hvi](νa)vv C[(νu)a¯hui](νau)u6↓

Barbed Congruence ∼B: Is the largest congruence in ∼· B,

(42)

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)uu C[a¯hvi](νa)vv C[(νu)a¯hui](νau)u6↓

Barbed Congruence ∼B: Is the largest congruence in ∼· B,

(43)

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)uu C[a¯hvi](νa)vv C[(νu)a¯hui](νau)u6↓

Therefore Barbed Congruence ∼B: Is the largest congruence in ∼· B,

(44)

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)uu C[a¯hvi](νa)vv C[(νu)a¯hui](νau)u6↓

(45)

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)

(46)

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)

(47)

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)

(48)

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)

(49)

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 , cy

(νa)hzi.Q | R = (νa)hzi.(Q | R), z not free in R

(νc)(νa)hzi.Q =

(

(νa)hzi.(νc)Q, cz

(50)

Commitment Relation

COMMITMENT RULES

SUM : M + αA -→α A

REACTL,R : P

x

-→ F Q -→x¯ C

P | Q -→τ FC

P -→x¯ C Q -→x F

P | Q -→τ FC

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 :

(51)

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)

(52)

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)

(53)

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)

(54)

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)

(55)

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)

(56)

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)

(57)

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)

(58)

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)

(59)

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)

(60)

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)

(61)

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 •:

(62)

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;

(63)

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,

(64)

Early bisimulation

Strong early Bisimulation ∼· E: is defined as ∼· L replacing

if P -→x (y).P0 thenQ -→x (y0).Q0.z.{z/y}P0ó{z/y0}Q0

if P -→x (y).P0 thenQ -→x (y0).Q0.z.{z/y}P0ó{z/y0}Q0

with the looser

if P -→x (y).P0 thenz.Q -→x (y0).Q0.{z/y}P0ó{z/y0}Q0

Thm. Let ∼L be the largest congruence in ∼· L. Then,

PL Q iff σ P ∼· L σ Q for all substitutions σ.

In practice the difference is minimal, but in theory:

(65)

Early bisimulation

Strong early Bisimulation ∼· E: is defined as ∼· L replacing

if P -→x (y).P0 thenQ -→x (y0).Q0.z.{z/y}P0ó{z/y0}Q0

with the looser

if P -→x (y).P0 thenz.Q -→x (y0).Q0.{z/y}P0ó{z/y0}Q0

Thm. Let ∼L be the largest congruence in ∼· L. Then,

PL Q iff σ P ∼· L σ Q for all substitutions σ.

In practice the difference is minimal, but in theory:

(66)

Early bisimulation

Strong early Bisimulation ∼· E: is defined as ∼· L replacing

if P -→x (y).P0 thenQ -→x (y0).Q0.z.{z/y}P0ó{z/y0}Q0

with the looser

if P -→x (y).P0 thenz.Q -→x (y0).Q0.{z/y}P0ó{z/y0}Q0

Thm. Let ∼L be the largest congruence in ∼· L. Then,

PL Q iff σ P ∼· L σ Q for all substitutions σ.

(67)

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)

(68)

Weak bisimulations

Ignore internal steps (τ)

Weak Barbed ≈· B andB: Replace

x withx def= →∗↓x, and → with ⇒ def= →∗

Weak Bisimulations ≈· L andL: Replace

τ

-→ with =⇒ def= -→τ,

x

(69)

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

(70)

Axioms for Bisimulation

‘=’ contains ‘’.

‘=’ is preserved by all contexts except x(y).[ ].

{z/y}P = {z/y}Q,zfn(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{τ.(FC) | xF , xC¯ summands of P , Q}

(71)

Axioms for Bisimulation

‘=’ contains ‘’.

‘=’ is preserved by all contexts except x(y).[ ]. {z/y}P = {z/y}Q,zfn(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{τ.(FC) | xF , xC¯ summands of P , Q}

(72)

Axioms for Bisimulation

‘=’ contains ‘’.

‘=’ is preserved by all contexts except x(y).[ ].

{z/y}P = {z/y}Q,zfn(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{τ.(FC) | xF , xC¯ summands of P , Q}

(73)

Axioms for Bisimulation

‘=’ contains ‘’.

‘=’ is preserved by all contexts except x(y).[ ].

{z/y}P = {z/y}Q,zfn(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{τ.(FC) | xF , xC¯ summands of P , Q}

(74)

Axioms for Bisimulation

‘=’ contains ‘’.

‘=’ is preserved by all contexts except x(y).[ ].

{z/y}P = {z/y}Q,zfn(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{τ.(FC) | xF , xC¯ summands of P , Q}

(75)

Axioms for Bisimulation

‘=’ contains ‘’.

‘=’ is preserved by all contexts except x(y).[ ].

{z/y}P = {z/y}Q,zfn(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}

(76)

Axioms for Bisimulation

‘=’ contains ‘’.

‘=’ is preserved by all contexts except x(y).[ ].

{z/y}P = {z/y}Q,zfn(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}

(77)

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)

(78)

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)

(79)

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

(80)

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)

(81)

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)

(82)

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)

(83)

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

(84)

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

(85)

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

(86)

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

(87)

Congruence and Weak Bisimulation

In order to extend ‘=’ to captureL

replace the two congruence rule by ‘=’ is preserved by

all contexts.

the expansion law must include terms

[x = y]τ.(FC)

for xF and yC¯ summands of P and Q. In order to capture ≈L add the three tau laws:

α.τ.P = α.P P + τ.P = τ.P

(88)

Congruence and Weak Bisimulation

In order to extend ‘=’ to captureL

replace the two congruence rule by ‘=’ is preserved by

all contexts.

the expansion law must include terms

[x = y]τ.(FC)

for xF and yC¯ summands of P and Q.

In order to capture ≈L add the three tau laws:

(89)

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

(90)

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

(91)

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}

(92)

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.

(93)

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.

(94)

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.

(95)

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

References

Related documents