Modelling and Verifying Mobile Systems using -graphs Jol-Alexis - - PowerPoint PPT Presentation

modelling and verifying mobile systems using graphs jo l
SMART_READER_LITE
LIVE PREVIEW

Modelling and Verifying Mobile Systems using -graphs Jol-Alexis - - PowerPoint PPT Presentation

graphs Modelling and Verifying Mobile Systems using -graphs Jol-Alexis Bialkiewicz Joel-Alexis.Bialkiewicz@lip6.fr (joint work with Frdric Peschanski) UPMC Paris Universitas 1 / 26 Outline Introduction Introducing the


slide-1
SLIDE 1

π

  • graphs

Modelling and Verifying Mobile Systems using π-graphs

Joël-Alexis Bialkiewicz

Joel-Alexis.Bialkiewicz@lip6.fr

(joint work with Frédéric Peschanski)

UPMC Paris Universitas

1 / 26

slide-2
SLIDE 2

Outline

Introduction Introducing the pi-graphs Graph structures pi-box calculus Formal investigations Basic results Bisimulation framework Verification algorithm Conclusion and future works

2 / 26

slide-3
SLIDE 3

Outline

Introduction Introducing the pi-graphs Graph structures pi-box calculus Formal investigations Basic results Bisimulation framework Verification algorithm Conclusion and future works

3 / 26

slide-4
SLIDE 4

Concurrent and mobile systems

Concurrent systems

◮ Processor physical limits already brought parallel computing to end-users “The free lunch is over” [Sutter05] ◮ Sequential models no longer expressive enough = ⇒ concurrency unavoidable ◮ Concurrency not new, but harder to model and reason about

About Mobility

◮ Concurrency = ⇒ several entities at once = ⇒ they may move wrt. one another ◮ Mobility : physical but also logical neighbours dynamically changing ◮ Statical approaches lack expressivity, current dynamic ones are complex

Concurrent and Mobile Systems

◮ Programming approaches (CPU-level, programming-language constructs) ◮ Modeling approaches (formalisms, verification tools, abstraction techniques) ◮ Our approach : Modelling is programming (and vice versa, hopefully)

4 / 26

slide-5
SLIDE 5

Modeling

Two schools: diagrams and programs

◮ Place-transition nets: “Intuitive”, simulation/verification tools ◮ Process-algebra: Better expressivity, compositionality and more

implementations

Our goals

◮ Hybrid formalism (diagram + corresponding process algebra):

π-graphs

◮ Expressivity, intuitiveness ◮ Implementation and verification tools

5 / 26

slide-6
SLIDE 6

Outline

Introduction Introducing the pi-graphs Graph structures pi-box calculus Formal investigations Basic results Bisimulation framework Verification algorithm Conclusion and future works

6 / 26

slide-7
SLIDE 7

Introducing the π-graphs

π

  • graphs

http://www-poleia.lip6.fr/~pesch/pigraphs

A dual formalism

◮ A diagramatic language inspired by P/T nets ◮ A process algebra very close to the π-calculus

A dual characterization

◮ graph rewriting semantics ◮ labelled transition systems (LTS)

7 / 26

slide-8
SLIDE 8

The graphical language

Boxes (names) White box (public name) n Black box (private name) Gray box (dynamic name)

n

Empty box (binder) Places (labels and actions) Observation (unmarked)

  • (marked)

Silent (internal action) τ Choice

+

Links Output a b Input b Reference/match a b Guard Parallel composition implicit (“disjoint” graphs) Termination (inert) implicit (empty graph)

8 / 26

slide-9
SLIDE 9

The graphical language

Boxes (names) White box (public name) n Black box (private name) Gray box (dynamic name)

n

Empty box (binder) Places (labels and actions) Observation (unmarked)

  • (marked)

Silent (internal action) τ Choice

+

Links Output a b Input b Reference/match a b Guard Parallel composition implicit (“disjoint” graphs) Termination (inert) implicit (empty graph)

8 / 26

slide-10
SLIDE 10

The graphical language

Boxes (names) White box (public name) n Black box (private name) Gray box (dynamic name)

n

Empty box (binder) Places (labels and actions) Observation (unmarked)

  • (marked)

Silent (internal action) τ Choice

+

Links Output a b Input b Reference/match a b Guard Parallel composition implicit (“disjoint” graphs) Termination (inert) implicit (empty graph)

8 / 26

slide-11
SLIDE 11

The graphical language

Boxes (names) White box (public name) n Black box (private name) Gray box (dynamic name)

n

Empty box (binder) Places (labels and actions) Observation (unmarked)

  • (marked)

Silent (internal action) τ Choice

+

Links Output a b Input b Reference/match a b Guard Parallel composition implicit (“disjoint” graphs) Termination (inert) implicit (empty graph)

8 / 26

slide-12
SLIDE 12

Example

a b

+

1 : νca + νcb νc(x).xνc

9 / 26

slide-13
SLIDE 13

Example

a b

+

1 : νca + νcb νc(x).xνc

9 / 26

slide-14
SLIDE 14

Example

a b

+

1 : νca + νcb νc(x).xνc

9 / 26

slide-15
SLIDE 15

Example

a b

+

1 : νca + νcb νc(x).xνc

9 / 26

slide-16
SLIDE 16

Example

a b

+

1 : νca + νcb νc(x).xνc

9 / 26

slide-17
SLIDE 17

Example

a b

+

1 : νca + νcb νc(x).xνc

9 / 26

slide-18
SLIDE 18

Example

a b

+

1 : νca + νcb νc(x).xνc

9 / 26

slide-19
SLIDE 19

Example

a b

+

b 1 : νca + νcb νc(x).xνc

τ

− → 1 : bνc

9 / 26

slide-20
SLIDE 20

Example

a b

+

b

1

b

  • 1 : νca + νcb νc(x).xνc

τ

− → 1 : bνc

τ

− → 2 : b ⊳ 1

9 / 26

slide-21
SLIDE 21

Example

a b

+

b

1

b

  • 1 : νca + νcb νc(x).xνc

τ

− → 1 : bνc

τ

− → 2 : b ⊳ 1 ǫ − → 0

9 / 26

slide-22
SLIDE 22

Compositionality and Scope

Question

What happens when names enter or exit the local system through interaction?

10 / 26

slide-23
SLIDE 23

Compositionality and Scope

Question

What happens when names enter or exit the local system through interaction?

π-calculus

Depends on the chosen semantic ... (early, late, symbolic, etc.)

10 / 26

slide-24
SLIDE 24

Compositionality and Scope

Question

What happens when names enter or exit the local system through interaction?

π-calculus

Depends on the chosen semantic ... (early, late, symbolic, etc.)

π-graphs

logical clocks [Lamport78] and gray boxes (escaped names [Peschanski04])

10 / 26

slide-25
SLIDE 25

Open outputs

Question

What is the difference between

◮ Sending a public name over a public channel ◮ Sending a name over a private channel ◮ Sending a private name over a public channel

11 / 26

slide-26
SLIDE 26

Open outputs

Question

What is the difference between

◮ Sending a public name over a public channel

◮ The send is performed (simplest case)

◮ Sending a name over a private channel ◮ Sending a private name over a public channel

11 / 26

slide-27
SLIDE 27

Open outputs

Question

What is the difference between

◮ Sending a public name over a public channel

◮ The send is performed (simplest case)

◮ Sending a name over a private channel

◮ If no one can receive locally, then cannot send

◮ Sending a private name over a public channel

11 / 26

slide-28
SLIDE 28

Open outputs

Question

What is the difference between

◮ Sending a public name over a public channel

◮ The send is performed (simplest case)

◮ Sending a name over a private channel

◮ If no one can receive locally, then cannot send

◮ Sending a private name over a public channel

◮ The sent name escapes its scope ◮ [π-calculus] bound output (HD) ◮ [π-graph] escape label and gray box (not HD) 11 / 26

slide-29
SLIDE 29

Open outputs

Question

What is the difference between

◮ Sending a public name over a public channel

◮ The send is performed (simplest case)

◮ Sending a name over a private channel

◮ If no one can receive locally, then cannot send

◮ Sending a private name over a public channel

◮ The sent name escapes its scope ◮ [π-calculus] bound output (HD) ◮ [π-graph] escape label and gray box (not HD)

⇒ Same principle for receiving names from envir. (open inputs)

11 / 26

slide-30
SLIDE 30

Open outputs

Question

What is the difference between

◮ Sending a public name over a public channel

◮ The send is performed (simplest case)

◮ Sending a name over a private channel

◮ If no one can receive locally, then cannot send

◮ Sending a private name over a public channel

◮ The sent name escapes its scope ◮ [π-calculus] bound output (HD) ◮ [π-graph] escape label and gray box (not HD)

⇒ Same principle for receiving names from envir. (open inputs) Black box a private “name” only known locally White box a public name statically known everywhere Gray box an escaped name/clock value potentially known by external processes through interaction

11 / 26

slide-31
SLIDE 31

Open outputs and logical clocks: example

b 1 : bνc

12 / 26

slide-32
SLIDE 32

Open outputs and logical clocks: example

b

1

b

  • 1 : bνc

τ

− → 2 : b ⊳ 1

12 / 26

slide-33
SLIDE 33

Process-algebra view

π-box calculus

A process algebra similar to the π-calculus but:

◮ For each process term there exists a unique π-graph encoding

(up-to structural congruence)

◮ Graphs as normal forms of terms

Syntax Prefix: π ::= xy | x ⊳ y | x(z) | x ⊲ y | τ Process: P ::= 0 | π.P | P + P′ | P | P′ | [x = y](z) P′ provided x, y ∈ fn(P′) Term: k : P where k ≥ 1 is a logical clock

13 / 26

slide-34
SLIDE 34

Operational semantics

Principles

π-graphs semantics through graph rewrites π-box semantics through labelled transition systems (LTS)

14 / 26

slide-35
SLIDE 35

Operational semantics

Principles

π-graphs semantics through graph rewrites π-box semantics through labelled transition systems (LTS)

Example: open output

π-box x ∈ Priv y ∈ Priv k : xy.P

τ

− → k + 1 : x ⊳ k.P{k/y}

  • pen

π-graphs k: x

τ

− → k+1:

k

  • x

clr(x) = b

14 / 26

slide-36
SLIDE 36

Outline

Introduction Introducing the pi-graphs Graph structures pi-box calculus Formal investigations Basic results Bisimulation framework Verification algorithm Conclusion and future works

15 / 26

slide-37
SLIDE 37

Encoding/Decoding of π-graphs

Decoding

There exists a function D from π-graphs to π-box terms such that: ∀(G, H), D(G) = D(H) = ⇒ G =G H

Encoding

There exists a function E from π-box terms to π-graphs such that: ∀(P, Q), E(P) = E(Q) = ⇒ P ≡ Q

16 / 26

slide-38
SLIDE 38

Structural congruence vs. Graph isomorphism

Lemma (Consistency)

◮ ∀G, E(D(G)) =G G ◮ ∀P, D(E(P)) ≡ P

with

◮ =G π-graph isomorphism (up-to γ rules) ◮ ≡ π-box structural congruence (“trivial” equalities)

17 / 26

slide-39
SLIDE 39

Structural congruence vs. Graph isomorphism

Lemma (Consistency)

◮ ∀G, E(D(G)) =G G ◮ ∀P, D(E(P)) ≡ P

with

◮ =G π-graph isomorphism (up-to γ rules) ◮ ≡ π-box structural congruence (“trivial” equalities)

In practice

Verifying P ≡ Q in our tool:

◮ encode P and Q to π-graphs G and H (“true” normal forms) ◮ check G =G H

17 / 26

slide-40
SLIDE 40

Rewrite and marking vs. transition

Marking

The marking of a graph G is

◮ c ⊲ a if an input place is marked ◮ c ⊳ a if an output place is marked

Remark: there may be at most 1 place marked (> 1 = ⇒ true concurrency)

18 / 26

slide-41
SLIDE 41

Rewrite and marking vs. transition

Marking

The marking of a graph G is

◮ c ⊲ a if an input place is marked ◮ c ⊳ a if an output place is marked

Remark: there may be at most 1 place marked (> 1 = ⇒ true concurrency)

Transitions vs. graph rewrites

π-box if P

α

− → Q π-graph then E(P) ǫ − →

∗ τ

− → E(Q) and mark(E(Q)) = α

18 / 26

slide-42
SLIDE 42

Rewrite and marking vs. transition

Marking

The marking of a graph G is

◮ c ⊲ a if an input place is marked ◮ c ⊳ a if an output place is marked

Remark: there may be at most 1 place marked (> 1 = ⇒ true concurrency)

Transitions vs. graph rewrites

π-box if P

α

− → Q π-graph then E(P) ǫ − →

∗ τ

− → E(Q) and mark(E(Q)) = α

Graph rewrites vs. transitions

π-graph if G

ǫ

− →

∗ τ

− → H and mark(H) = α π-box then D(G) α − → D(H)

18 / 26

slide-43
SLIDE 43

Bisimilarities

π-box bisimilarity

∼b is the largest symmetric relation such that P ∼b Q iff: ∀α, P

α

− → P′, ∃Q′, Q

α

− → Q′ ∧ P′ ∼b Q′

19 / 26

slide-44
SLIDE 44

Bisimilarities

π-box bisimilarity

∼b is the largest symmetric relation such that P ∼b Q iff: ∀α, P

α

− → P′, ∃Q′, Q

α

− → Q′ ∧ P′ ∼b Q′

π-graph bisimilarity

∼g is the largest symmetric relation such that G ∼h H iff: ∀α, G

ǫ

− →

∗ τ

− → G ′ ∧ mark(G ′) = α, ∃H′, H

ǫ

− →

∗ τ

− → H′, mark(H′) = α ∧G ′ ∼g H′

19 / 26

slide-45
SLIDE 45

Verification algorithm

Theorem

◮ G ∼g H iff D(G) ∼b D(H) ◮ P ∼b Q iff E(P) ∼g E(Q)

20 / 26

slide-46
SLIDE 46

Verification algorithm

Theorem

◮ G ∼g H iff D(G) ∼b D(H) ◮ P ∼b Q iff E(P) ∼g E(Q)

Algorithm

Verifying P ∼b Q in our tool:

◮ Encode P and Q as G and H ◮ Compute the LTS through graph rewrites exploration ◮ Apply standard bisimulation checking algorithm

20 / 26

slide-47
SLIDE 47

Comparisons

Other verification environments for the π-calculus

Mobility workbench open bisimulation [Victor94] ⇒ state explosion (permutations of closed free names) HAL HD-automata [Montanari95] ⇒ state explosion (unfolding HD to plain automata)

21 / 26

slide-48
SLIDE 48

Comparisons

Other verification environments for the π-calculus

Mobility workbench open bisimulation [Victor94] ⇒ state explosion (permutations of closed free names) HAL HD-automata [Montanari95] ⇒ state explosion (unfolding HD to plain automata) Conjecture

◮ our tool is more efficient (standard bisimulation)

21 / 26

slide-49
SLIDE 49

Comparisons

Other verification environments for the π-calculus

Mobility workbench open bisimulation [Victor94] ⇒ state explosion (permutations of closed free names) HAL HD-automata [Montanari95] ⇒ state explosion (unfolding HD to plain automata) Conjecture

◮ our tool is more efficient (standard bisimulation)

Todo

◮ need to compare worst-case complexities ◮ need to compare in practice

21 / 26

slide-50
SLIDE 50

Outline

Introduction Introducing the pi-graphs Graph structures pi-box calculus Formal investigations Basic results Bisimulation framework Verification algorithm Conclusion and future works

22 / 26

slide-51
SLIDE 51

Things done

◮ Basic model ◮ A tool: π-graph eXplorer

⇒ http://www-poleia.lip6.fr/~pesch/pigraphs/

◮ Finitary π-graphs with recursion ◮ π-box Encoding/Decoding ◮ structural congruence ◮ interactive rewriting ◮ LTS generation/minimization ◮ Bisimulation (backtrack, Paige-Tarjan)

◮ This paper and its technical report companion

23 / 26

slide-52
SLIDE 52

Ongoing and future work

Theory variations on a thema (joint work)

◮ Non-finitary π-graphs ◮ Static π-graphs and iterators ◮ Computed clocks ◮ Compositional π-graphs

(b(x).xa cd

[b=c]τ

− − − − → da)

◮ True concurrency (polyadic marking)

Practice Our tool

◮ Iterators ◮ Bisimulation-based algorithms (weak*,weak,etc.) ◮ Temporal and Spatial logics (µ-calculus, etc.) ◮ Comparisons with other verifiers

24 / 26

slide-53
SLIDE 53

Any questions?

25 / 26

slide-54
SLIDE 54

Bibliography

[Sutter05] Herb Sutter. The free lunch is over: a fundamental turn toward concurrency in software. Dr. Dobbs Journal, March 2005. [Milner99] Robin Milner. Communicating and Mobile Systems: The π-Calculus. Cambridge University Press, 1999. [Peschanski04] Frederic Peschanski. On Linear Time and Congruence in Channel-Passing Calculi. Communicating Process Architectures (CPA’04). IOS Press, 2004. [Peschanski06] Frederic Peschanski and Samuel Hym. A Stackless Virtual Machine for a π-calculus. Virtual Execution Environments (VEE’06). ACM Press 2006. [Lamport78] Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM vol. 21 num. 7. ACM Press 1978. [Victor94] Björn Victor and Faron Moller. The Mobility Workbench — A Tool for the π-Calculus. CAV’94. LNCS 818. Springer 1994. [Montanari95] Ugo Montanari and Marco Pistore. Checking Bisimilarity for Finitary pi-Calculus. Concur’95. LNCS 962. Springer 1995. [Busi04] Nadia Busi et al. Comparing recursion, replication, and iteration in process calculi. ICALP’04. LNCS 3143. Springer 2004. [Devillers04] Raymond Devillers et al. Modelling mobility in high-level Petri nets. ACSD’07. IEEE 2007. [Gaducci07] Fabio Gadducci. Graph rewriting for the π-calculus. MSCS vol. 17. Cambridge University Press 2007.

26 / 26