A Denotational Study of Mobility Jo el-Alexis Bialkiewicz and Fr - - PowerPoint PPT Presentation

a denotational study of mobility
SMART_READER_LITE
LIVE PREVIEW

A Denotational Study of Mobility Jo el-Alexis Bialkiewicz and Fr - - PowerPoint PPT Presentation

Basics: Locations Mobility Equivalence & Refinement A Denotational Study of Mobility Jo el-Alexis Bialkiewicz and Fr ed eric Peschanski November 2, 2009 J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 1 / 16


slide-1
SLIDE 1

Basics: Locations Mobility Equivalence & Refinement

A Denotational Study of Mobility

Jo¨ el-Alexis Bialkiewicz and Fr´ ed´ eric Peschanski November 2, 2009

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 1 / 16

slide-2
SLIDE 2

Basics: Locations Mobility Equivalence & Refinement

Introduction

Two Main Points of View on Modelling Processes Operational POV (π-calculus. . . )

Low level, double-edged: easy mobility but difficult to abstract unsettled theory so many variants issues with compositionality: bound prefixes and guards denotations exist but not practical

Denotational POV (CSP)

denotational (tr, fail, div) and compositional by design supports refinement but no easy way to account for mobility

Our Approach: Mobility in a Denotational Way Heavily inspired by CSP but integrated model (decorated traces) π-like mobility but compositional = ⇒ fully denotational model Support for refinement

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 2 / 16

slide-3
SLIDE 3

Basics: Locations Mobility Equivalence & Refinement

Introduction

Two Main Points of View on Modelling Processes Operational POV (π-calculus. . . )

Low level, double-edged: easy mobility but difficult to abstract unsettled theory so many variants issues with compositionality: bound prefixes and guards denotations exist but not practical

Denotational POV (CSP)

denotational (tr, fail, div) and compositional by design supports refinement but no easy way to account for mobility

Our Approach: Mobility in a Denotational Way Heavily inspired by CSP but integrated model (decorated traces) π-like mobility but compositional = ⇒ fully denotational model Support for refinement

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 2 / 16

slide-4
SLIDE 4

Basics: Locations Mobility Equivalence & Refinement

Outline

1 Basics: Locations 2 Mobility 3 Equivalence & Refinement

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 3 / 16

slide-5
SLIDE 5

Basics: Locations Mobility Equivalence & Refinement

Outline

1 Basics: Locations 2 Mobility 3 Equivalence & Refinement

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 4 / 16

slide-6
SLIDE 6

Basics: Locations Mobility Equivalence & Refinement

Representing Behaviours

The problem Full representation of behaviour? branching structure (LTS) Set of process traces: information lost Traces + failures,divergences: hard to introduce mobility What we wanted Traces but with as much information as the LTS How: link observations to where and when in LTS = ⇒ locations ! LTS can be rebuilt from decorated traces: no information lost

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 5 / 16

slide-7
SLIDE 7

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) What does this process do? Behaviour LTS Traces coin? button1?

  • ut!tea

coin? button2?

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-8
SLIDE 8

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) What does this process do? Behaviour LTS Traces coin? button1?

  • ut!tea

coin? button2?

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-9
SLIDE 9

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) What does this process do? Behaviour LTS Traces coin? button1?

  • ut!tea

coin? button2?

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-10
SLIDE 10

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) What does this process do? Behaviour LTS Traces coin? button1?

  • ut!tea

coin? button2?

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-11
SLIDE 11

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) What does this process do? Behaviour LTS Traces coin? button1?

  • ut!tea

coin? button2?

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-12
SLIDE 12

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) What does this process do? Behaviour LTS Traces coin? button1?

  • ut!tea

coin? button2?

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-13
SLIDE 13

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) What does this process do? Behaviour LTS Traces coin? button1?

  • ut!tea

coin? button2?

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-14
SLIDE 14

Basics: Locations Mobility Equivalence & Refinement

Basic Example

The basics Observation (::location): input channel? output channel!value, or Location: origin: ǫ, next: ⊲ and choice: ⋄number of branches

branch number

, weak variants ⊲ and ⋄j

i

Process (not mobile) coin?.(button1?.out!tea + coin?.button2?.out!coffee) Which locations why? What is an absolute location? Behaviour LTS Traces ǫ ⊲ coin? ⋄2

1

button1? ⊲

  • ut!tea

⋄2

2

coin? ⊲ button2? ⊲

  • ut!coffee

{ coin?::⊲, button1?::⋄2

1, out!tea::⊲,

coin?::⊲, coin?::⋄2

2, button2?::⊲, out!coffee::⊲

}

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 6 / 16

slide-15
SLIDE 15

Basics: Locations Mobility Equivalence & Refinement

Outline

1 Basics: Locations 2 Mobility 3 Equivalence & Refinement

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 7 / 16

slide-16
SLIDE 16

Basics: Locations Mobility Equivalence & Refinement

About Mobility

Physical vs Logical Mobility A process is mobile if it changes neighbours How Can a Process Change Neighbours? A c B c C νc νd d

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 8 / 16

slide-17
SLIDE 17

Basics: Locations Mobility Equivalence & Refinement

About Mobility

Physical vs Logical Mobility A process is mobile if it changes neighbours How Can a Process Change Neighbours? A c B c C νc νd d

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 8 / 16

slide-18
SLIDE 18

Basics: Locations Mobility Equivalence & Refinement

About Mobility

Physical vs Logical Mobility A process is mobile if it changes neighbours How Can a Process Change Neighbours? A c B c C νc νd

d

d

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 8 / 16

slide-19
SLIDE 19

Basics: Locations Mobility Equivalence & Refinement

About Mobility

Physical vs Logical Mobility A process is mobile if it changes neighbours How Can a Process Change Neighbours? A B c C νc νd d d

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 8 / 16

slide-20
SLIDE 20

Basics: Locations Mobility Equivalence & Refinement

About Mobility

Physical vs Logical Mobility A process is mobile if it changes neighbours How Can a Process Change Neighbours? A B c C νc νd d d

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 8 / 16

slide-21
SLIDE 21

Basics: Locations Mobility Equivalence & Refinement

The Modeling Problems

Two main problems Binders Guards Binders in mobile languages Binders: dynamic names (escaped names and inputs) π-calculus operational, mixes free and bound names Solution: binders are uniquely identified by when/where created advantage: fresh by construction, avoid α-conversion issues Guards Reminder: [ϕ]P means if ϕ then P Not observations, but necessary for compos. Where do they go? Solution: in locations

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 9 / 16

slide-22
SLIDE 22

Basics: Locations Mobility Equivalence & Refinement

Example 2

Process with guards and extrusion (ν in)request!in.in?out. ([out = stop]SKIP + [out = stop]Communicate(in, out)) What does this process do? Behaviour LTS Traces

request!ν• ν•? [ρ• = stop] . . . [ρ• = stop]α1

{ request!νǫ⊲::⊲, νǫ⊲?::⊲, ::(ρǫ⊲⊲ = stop, ⋄2

1),

request!νǫ⊲::⊲, νǫ⊲?::⊲, α1::(ρǫ⊲⊲ = stop, ⋄2

2), . . .,

. . . }

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 10 / 16

slide-23
SLIDE 23

Basics: Locations Mobility Equivalence & Refinement

Example 2

Process with guards and extrusion (ν in)request!in.in?out. ([out = stop]SKIP + [out = stop]Communicate(in, out)) Extruded names: νwhere Behaviour LTS Traces

request!ν• ν•? [ρ• = stop] . . . [ρ• = stop]α1

{ request!νǫ⊲::⊲, νǫ⊲?::⊲, ::(ρǫ⊲⊲ = stop, ⋄2

1),

request!νǫ⊲::⊲, νǫ⊲?::⊲, α1::(ρǫ⊲⊲ = stop, ⋄2

2), . . .,

. . . }

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 10 / 16

slide-24
SLIDE 24

Basics: Locations Mobility Equivalence & Refinement

Example 2

Process with guards and extrusion (ν in)request!in.in?out. ([out = stop]SKIP + [out = stop]Communicate(in, out)) Input observations have no object; received names: ρwhere Behaviour LTS Traces

request!ν• ν•? [ρ• = stop] . . . [ρ• = stop]α1

{ request!νǫ⊲::⊲, νǫ⊲?::⊲, ::(ρǫ⊲⊲ = stop, ⋄2

1),

request!νǫ⊲::⊲, νǫ⊲?::⊲, α1::(ρǫ⊲⊲ = stop, ⋄2

2), . . .,

. . . }

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 10 / 16

slide-25
SLIDE 25

Basics: Locations Mobility Equivalence & Refinement

Example 2

Process with guards and extrusion (ν in)request!in.in?out. ([out = stop]SKIP + [out = stop]Communicate(in, out)) In traces the guard of an observation prefixes its location Behaviour LTS Traces

request!ν• ν•? [ρ• = stop] . . . [ρ• = stop]α1

{ request!νǫ⊲::⊲, νǫ⊲?::⊲, ::(ρǫ⊲⊲ = stop, ⋄2

1),

request!νǫ⊲::⊲, νǫ⊲?::⊲, α1::(ρǫ⊲⊲ = stop, ⋄2

2), . . .,

. . . }

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 10 / 16

slide-26
SLIDE 26

Basics: Locations Mobility Equivalence & Refinement

Example 2

Process with guards and extrusion (ν in)request!in.in?out. ([out = stop]SKIP + [out = stop]Communicate(in, out)) In traces the guard of an observation prefixes its location Behaviour LTS Traces

request!ν• ν•? [ρ• = stop] . . . [ρ• = stop]α1

{ request!νǫ⊲::⊲, νǫ⊲?::⊲, ::(ρǫ⊲⊲ = stop, ⋄2

1),

request!νǫ⊲::⊲, νǫ⊲?::⊲, α1::(ρǫ⊲⊲ = stop, ⋄2

2), . . .,

. . . }

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 10 / 16

slide-27
SLIDE 27

Basics: Locations Mobility Equivalence & Refinement

Outline

1 Basics: Locations 2 Mobility 3 Equivalence & Refinement

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 11 / 16

slide-28
SLIDE 28

Basics: Locations Mobility Equivalence & Refinement

Equivalence and Normal Forms

Dealing with redundancy Problem: model very fine-grained Solution: rewrite rules to trim redundancy Theorem Let T be a trace set. Suppose T1 and T2 such that T →∗ T1 and T →∗ T2 . Then T1 = T2 = T. Interest Equivalence checking: normalise then test isomorphism Much simpler than existing equivalence checking for mobility Only possible because no binders in semantic

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 12 / 16

slide-29
SLIDE 29

Basics: Locations Mobility Equivalence & Refinement

Example

P = α.(β + β) traces(P) = {α::⊲, β::⋄2

1, α::⊲, β::⋄2 2}

α β β Q = α.β + [a = x ∧ a = x]γ traces(Q) = {α::⋄2

1, β::⊲, γ::(a = x ∧ a = x, ⋄2 2)}

α β [a = x ∧ a = x]γ

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 13 / 16

slide-30
SLIDE 30

Basics: Locations Mobility Equivalence & Refinement

Example

P = α.(β + β) traces(P) = {α::⊲, β::⋄2

1, α::⊲, β::⋄2 2}

α β β Q = α.β + [a = x ∧ a = x]γ traces(Q) = {α::⋄2

1, β::⊲, γ::(a = x ∧ a = x, ⋄2 2)}

α β [a = x ∧ a = x]γ

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 13 / 16

slide-31
SLIDE 31

Basics: Locations Mobility Equivalence & Refinement

Example

P = α.(β + β) traces(P) = {α::⊲, β::⋄2

1, α::⊲, β::⋄2 2}

traces(P)

merge

− − − → {α::⊲, β::⊲} α β Q = α.β + [a = x ∧ a = x]γ traces(Q) = {α::⋄2

1, β::⊲, γ::(a = x ∧ a = x, ⋄2 2)}

α β [a = x ∧ a = x]γ

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 13 / 16

slide-32
SLIDE 32

Basics: Locations Mobility Equivalence & Refinement

Example

P = α.(β + β) traces(P) = {α::⊲, β::⋄2

1, α::⊲, β::⋄2 2}

traces(P)

merge

− − − → {α::⊲, β::⊲} α β Q = α.β + [a = x ∧ a = x]γ traces(Q) = {α::⋄2

1, β::⊲, γ::(a = x ∧ a = x, ⋄2 2)}

traces(Q) false − − − → {α::⊲, β::⊲} α β [a = x ∧ a = x]γ

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 13 / 16

slide-33
SLIDE 33

Basics: Locations Mobility Equivalence & Refinement

Example

P = α.(β + β) traces(P) = {α::⊲, β::⋄2

1, α::⊲, β::⋄2 2}

traces(P)

merge

− − − → {α::⊲, β::⊲} α β Q = α.β + [a = x ∧ a = x]γ traces(Q) = {α::⋄2

1, β::⊲, γ::(a = x ∧ a = x, ⋄2 2)}

traces(Q) false − − − → {α::⊲, β::⊲} α β

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 13 / 16

slide-34
SLIDE 34

Basics: Locations Mobility Equivalence & Refinement

Delayed Sum

What is the delayed sum? The way to refinement Strict generalisation of process sum Grafting any behaviour anywhere in branching structure Two parameters: a location and a substitution from symbols to special names Delayed Sum Example P def = α.β + γ Q def = δ.α P +Id

ǫ⋄2

1 Q = α.(β + δ.α) + γ

α β γ δ α

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 14 / 16

slide-35
SLIDE 35

Basics: Locations Mobility Equivalence & Refinement

Delayed Sum

What is the delayed sum? The way to refinement Strict generalisation of process sum Grafting any behaviour anywhere in branching structure Two parameters: a location and a substitution from symbols to special names Delayed Sum Example P def = α.β + γ Q def = δ.α P +Id

ǫ⋄2

1 Q = α.(β + δ.α) + γ

ǫ ⋄2

1

α ⊲ β ⋄2

2

γ δ α

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 14 / 16

slide-36
SLIDE 36

Basics: Locations Mobility Equivalence & Refinement

Delayed Sum

What is the delayed sum? The way to refinement Strict generalisation of process sum Grafting any behaviour anywhere in branching structure Two parameters: a location and a substitution from symbols to special names Delayed Sum Example P def = α • β + γ Q def = δ.α P +Id

ǫ⋄2

1 Q = α.(β + δ.α) + γ

α β γ δ α

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 14 / 16

slide-37
SLIDE 37

Basics: Locations Mobility Equivalence & Refinement

Delayed Sum

What is the delayed sum? The way to refinement Strict generalisation of process sum Grafting any behaviour anywhere in branching structure Two parameters: a location and a substitution from symbols to special names Delayed Sum Example P def = α.β + γ Q def = δ.α P +Id

ǫ⋄2

1 Q = α.(β + δ.α) + γ

α β γ δ α α β γ α γ

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 14 / 16

slide-38
SLIDE 38

Basics: Locations Mobility Equivalence & Refinement

Refinement

Definition P ⊑ Q ⇐ ⇒ ∃RL = n

i=1{(Ri, li, σi)} s. t.

P =⋄ Q +σ1

l1 R1 . . . +σn ln Rn

Why? Refinement relation nearly for free The delayed sum cannot be compositional... is refinement?

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 15 / 16

slide-39
SLIDE 39

Basics: Locations Mobility Equivalence & Refinement

Conclusion

What we did CSP vs π-calculus: a step towards bridging the gap Denotational theory for mobility with intuitive refinement Operational semantics w/o π-calculus pitfalls Axiomatic semantics A Hoare-like logic [LAM09] What next? Finish writing the thesis... Proving that refinement is compositional Equivalence/refinement checking algorithm

J.-A. Bialkiewicz and F. Peschanski A Denotational Study of Mobility 16 / 16