On Congruence Property of Scope Equivalence for Concurrent Programs - - PowerPoint PPT Presentation

on congruence property of scope equivalence for
SMART_READER_LITE
LIVE PREVIEW

On Congruence Property of Scope Equivalence for Concurrent Programs - - PowerPoint PPT Presentation

On Congruence Property of Scope Equivalence for Concurrent Programs with Higher-Order Communication Masaki Murakami Okayama University JAPAN A Formal Model of Concurrent Systems the model presented here is a translation of asynchronous


slide-1
SLIDE 1

On Congruence Property

  • f Scope Equivalence for

Concurrent Programs with Higher-Order Communication

Masaki Murakami Okayama University JAPAN

slide-2
SLIDE 2

A Formal Model of Concurrent Systems

the model presented here is a translation of asynchronous local highr-order π- calculus (Sangiorge) into graph rewriting

slide-3
SLIDE 3

Motivation

To represent the scopes of channel names precisely

ν-operator

Not convenient to express scopes of names for some purpose..

νa(P |νb(Q | R))

slide-4
SLIDE 4

Scopes not nested

  • Impossible to represent with a ν-operator

P a b Q R

νa(P |νb(Q | R))

slide-5
SLIDE 5

We can not decide..

means......

νa(P |νb(Q | R))

P a b Q R P a b Q R

  • r

?

slide-6
SLIDE 6

Our approach..

Our model is based on graph rewriting. not based on process algebra. a translation of asynchronous higher-

  • rder π-calculus into graph rewriting
slide-7
SLIDE 7

Basic Idea

A system is a collection of processes sharing names

A system is represented as a bipartite graph Source nodes ==> processes Sink nodes ==> names There is an edge iff the source nodes is in the scope of the sink node

slide-8
SLIDE 8

Basic Idea

P a b

Q

R

Q

R

P

a b

bipartite graph

slide-9
SLIDE 9

Processes

A source node consists of labels for its prefix and its continuation Reduce a process by “peeling” the node.

a(x)

P

a(x).P

slide-10
SLIDE 10

Message node

a message node is a tuple of its subject and its object

a

c

a<c>

slide-11
SLIDE 11

Operational Semantics

a set of graph rewriting rules by translating the rules for the labeled transition system of asynchronous π-calculus into rules for graph rewriting

slide-12
SLIDE 12

Rules for graph rewriting

The rule for message receiving..

a

c

a(x)

c x

slide-13
SLIDE 13

Rules for graph

rewriting

  • If the imported name is new to the receiver, new edges

are created

a

c

a(x)

x

c c

slide-14
SLIDE 14

Higher-Order Communication

a(x)

c

a

slide-15
SLIDE 15

Scope Equivalence

We define a new equivalence relation to distinguish two processes which are equivalent on their behavior but not for their scopes of names

slide-16
SLIDE 16

Example

When x does not occur in Q

P1 and P2 are equivalent in their behavior

but not equivalent for scopes of names

P1 = m(x).τ.Q P2 = νn(m(u). (n<a> | n(x). Q))

slide-17
SLIDE 17

Example

Note that Q may be just a specification of the behavior. It does not represent the implementation.

“x does not occur in Q” does not mean “the imported

name no longer exists in Q”

P1 = m(x).τ.Q

If the name receive by m(x) is a secret data which should not be leaked to Q, this P1 is no good (but P2 is OK).

slide-18
SLIDE 18

Example

Behavior equivalences can not tell you the difference. The graph rewriting model can represent the difference.

m(x)

m o

  • Q

Q

slide-19
SLIDE 19

Example

P2 = νn(m(u). (n<a> | n (x). Q))

slide-20
SLIDE 20

Scope Equivalence

  • Define a new equivalence relation that is called

scope equivalence that can distinguish these two processes.

P1 = m(x).τ.Q P2 = νn(m(u). (n<a> | n(x). Q))

slide-21
SLIDE 21

Definitions

For a graph P and a name n, P/n is a subgraph of P which consists of source nodes in the scope of n and sink nodes other than n

B

C

A

a b

B

C

A

a b

P/a

slide-22
SLIDE 22

Scope Bisimulation

a relation R is a scope bismulaiton if for any P and Q such that

(P, Q) in R,

P is an empty graph iff Q is an empty graph

the set of source nodes of P/n is empty iff the source nodes

Q/n is also empty for any common name n

P/n and Q/n are strongly bisimular for any common

name n R is a strong bisimulation

slide-23
SLIDE 23

Scope Equivalence

There exists the largest scope bisimulation which is a equivalence relation congruent w.r.t. contexts (composition, prefix, replication, new name...) in first-order case (ICTAC 08)

slide-24
SLIDE 24

Congruence : for higher-

  • rder model

When P and Q are scope equivalent.. P and are also equivalent Q

slide-25
SLIDE 25

!

!

Congruence(2)

When P and Q are scope equivalent.. P and are also equivalent Q

slide-26
SLIDE 26

a(x) a(x)

/

Non Congruence w.r.t. input prefix

P and Q are scope equivalent but....

P

=

Q

slide-27
SLIDE 27

The Non Congruence result

  • It comes from….
  • Scope equivalence is NOT congruent w.r.t.

higher-order substitution.

slide-28
SLIDE 28

The Counter Example

!

x a

n1

n2

!

x a

n1

n2

!

x a P

Q

b

1

b2

b

  • P and Q are equivalent.
slide-29
SLIDE 29

The Counter Example

n1

n2

n1

n2

! !

(y)(c(u).d(v).R) a (y)(c(u).d(v).R) a

!

(y)(c(u).d(v).R) a

P[(y)(c(u).d(v).R) / x]

Q[(y)(c(u).d(v).R) / x]

  • Not equivalent after the higher-order

substitution.

slide-30
SLIDE 30

The counter example

n1

n2

! !

(y)(c(u).d(v).R) a (y)(c(u).d(v).R) a

τ

!

n1

n2

(y)(c(u).d(v).R) a

c(u).d(v).R[a / y]

c(m)

!

(y)(c(u).d(v).R) a

!

n1

n2

(y)(c(u).d(v).R) a

!

(y)(c(u).d(v).R) a d(v).R[a / y][m / u]

b

1[o / x]

b2[o / x]

b’ b”

!

n1

n2

(y)(c(u).d(v).R) a

c(u).d(v).R[a / y]

n1

n2

!

(y)(c(u).d(v).R) a

!

n1

n2

(y)(c(u).d(v).R) a d(v).R[a / y][m / u]

c(m)

τ

b’ b”

slide-31
SLIDE 31

Conclusion

A graph rewriting model of concurrent/ distributed systems with higher-order message represents scopes of names precisely equivalence relation Congruent w.r.t. any context in first order Not congruent w.r.t. input (and higher-order) context