Hoare vs milner comparing synchronizations in a graphical framework with mobility
This presentation is the property of its rightful owner.
Sponsored Links
1 / 39

Hoare vs. Milner: Comparing Synchronizations in a Graphical Framework With Mobility PowerPoint PPT Presentation


  • 47 Views
  • Uploaded on
  • Presentation posted in: General

Hoare vs. Milner: Comparing Synchronizations in a Graphical Framework With Mobility. Ugo Montanari Università di Pisa. in collaboration with. Ivan Lanese Università di Pisa. Outline. Graphical Calculi for Distributed Systems Synchronized Edge Replacement Systems Mobility

Download Presentation

Hoare vs. Milner: Comparing Synchronizations in a Graphical Framework With Mobility

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Hoare vs milner comparing synchronizations in a graphical framework with mobility

Hoare vs. Milner: Comparing Synchronizationsin a Graphical Framework With Mobility

Ugo Montanari

Università di Pisa

in collaboration with

Ivan Lanese

Università di Pisa


Outline

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Outline1

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Graphical approach to distributed systems

Graphical Approach to Distributed Systems

Motivations:

  • Intuitive representation of distribution

  • Natural concurrent semantics

  • No need of structural axioms

  • Existing modeling languages, e.g. UML

  • Applications to software architectures and ADL’s

  • Well-developed foundations


Graph vs term transformations

Graph vs. Term Transformations

  • Terms

    • LTS defined via SOS rules

    • Reduction rules

    • Abstract semantics

    • Non-interleaving semantics

  • Graphs

    • Double-pushout derivations

    • Concurrent semantics based on shift equivalence

    • Synchronized (hyper)edge replacement


Hyper graphs

1

4

2

M

3

(Hyper)Graphs

  • Edge: Atomic item with a label from alphabet LE= {LEn}n=0,1,… with as many (ordered) tentacles as the rank of its label.

  • Graph: A set of nodes and a set of edges such that each edgeis connected, by its tentacles, to its attachment nodes. A set of external nodes, identified by distinct names, defines the connecting points with the environment.

x

L

L

y

1

M

4

2

3

z


A notation for graphs

Representation of graphs as syntactic judgements

  N set of names

 G

G set of edges

fn(G)   binds as usual

G ::= L(x) | G|G | x. G | nil

A Notation For Graphs

  • Edge: Atomic item with a label from alphabet LE= {LEn}n=0,1,… with as many (ordered) tentacles as the rank of its label.

  • Graph: A set of nodes and a set of edges such that each edgeis connected, by its tentacles, to its attachment nodes. A set of external nodes, identified by distinct names, defines the connecting points with the environment.


A notation for graphs1

A Notation For Graphs

Well formed judgements for graphs

  • Structural Axioms

(AG2) G1|G2 = G2|G1

(AG1) (G1|G2)|G3 = G1|(G2|G3)

(AG3) G1| nil = G1

(AG4) x.y.G = y.x.G

(AG6) x.G = y.G {y/x} if y  fn(G)

(AG5) x.G = G if x  fn(G)

(AG7) x.(G1|G2 ) = (x. G1) | G2 if x  fn(G2)


A notation for graphs2

L  LEm yi  {xj}

 G1  G2

A Notation For Graphs

Well formed judgements for graphs

  • Syntactic Rules

(RG1)

(RG2)

x1,…,xn nil

x1,…,xn L(y1,…,ym)

, x G

(RG3)

(RG4)

 G1|G2

  x. G


A notation for graphs3

x,y  z, w. C(x,w) | C(w,y) | C (y,z) | C(z,x)

w

z

A Notation For Graphs

Ring Example


Outline2

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Edge replacement systems

Edge Replacement Systems

  • Productions: A context free production rewrites a single edge labeled by L into an arbitrary graph R. (Notation: L  R)

L

R

H

3

3

4

4

2

2

1

1


Edge replacement systems1

L

R

H

3

3

4

4

2

2

1

1

1

1

2

2

3

3

R’

L’

Edge Replacement Systems

  • Productions: A context free production rewrites a single edge labeled by L into an arbitrary graph R. (Notation: L  R)

Rewritings of different edges can be executed concurrently


Synchronized edge replacement

Synchronized Edge Replacement

  • Synchronized rewriting: Actions are associated to nodes in productions. Each rewrite of an edge must match actions with (a number of) its adjacent edges and they have to move simultaneously

How many edges synchronize depends on the synchronization policy

  • Synchronized rewriting propagates synchronization

    all over the graph


Synchronized edge replacement1

Hoare synchronization

a

a

a

B1

A1

a

3

3

B2

A2

Synchronized Edge Replacement

  • Hoare Synchronization: All adjacent edges must match the actions on the shared node

  • Milner Synchronization: Only two of the adjacent edges synchronize by matching their complementary actions


Outline3

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Adding mobility

  • Synchronized rewriting with name mobility

  • Add to an action in a node a tuple of names that it wants to communicate

  • The synchronization step has to match actions and tuples

  • The declared names that were matched are used to merge the corresponding nodes

a< x >

a < y >

a<x> a<y>

B1

A1

a<x> = a<y>

( x )

( y )

x= y

B2

A2

Adding Mobility


Transitions as judgements

  • Transitions

 G1  ,  G2

:  (A x N* ) (x, a , y)   if (x) = (a , y)

o

 is the set of new names that are used in synchronization

 = {z |  x. (x) = (a , y), z  , z set(y)}

Transitions as Judgements

Formalization of synchronized rewriting as judgements


Transitions as judgements1

  • Productions

x1,…,xn L(x1,…,xn)  x1,…,xn , DG

Free names can: i) be added to productions; and

ii) renaming is possible

  • Derivations

2

1

n

0 G0  1 G1  …  n Gn

Transitions as Judgements

Formalization of synchronized rewriting as judgements

  • Transitions

    are generated from the productions by applying the transition rules

    of the chosen synchronization mechanism


Synchronization via unification

Synchronization via Unification

Hoare synchronization

  • On each node all edges must have the same action

  • Synchronization is possible if there is a most general unifier of the new nodes

For any R   x A x N* (not necessarily a partial function)

(R):   n(R) is the mgu of equations (a= b)  (Y = Z) with (x,a,Y) and (x,b,Z) in R where (as usual)  = {z | (x,a,Y)  R, z set(Y), z  }


E xample

Initial Graph

Brother:

Star Reconfiguration:

x

C

r(w)

C

C

C

(w)

S

C

r(w)

C

C

C

S

Brother

Brother

Brother

Star Rec.

x

C

S

S

C

C

C

C

C

C

S

(1)

(2)

(3)

(4)

(5)

b

)

Example


Synchronization via unification1

Synchronization via Unification

Milner synchronization

  • On each node at most two edges must have actions, and in this case they must be complementary

  • Synchronization is possible if there is a most general unifier of the new nodes


Adding fusion

L,p

 G1  , f G2

L:  (A x N* ) (x,a,y)  L if L(x) = (a, y)

p:    idempotent

n(L) = { z | $x. L(x)=(a,y), z  Set(y) }

L = n(L) \ 

f = p + L

o

Adding Fusion

Synchronized rewriting with mobility and fusion


Outline4

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Rewriting rules hoare synchronization i

Rewriting Rules, Hoare Synchronization I


Rewriting rules hoare synchronization ii

Rewriting Rules, Hoare Synchronization II


Rewriting rules milner synchronization i

Rewriting Rules, Milner Synchronization I


Rewriting rules milner synchronization ii

Rewriting Rules, Milner Synchronization II


Related work

Related Work

  • Grammars for distributed systems

    [Castellani and Montanari, LNCS 1953, 1982], [Degano and Montanari, JACM 1987]

  • Graph amalgamation

    [Boehm, Fonio and Habel, JCSS, 1987]

  • CHARM (R for restriction)

    [Corradini, Montanari and Rossi, TCS 1994]

  • Mobile version (w. applications to software architectures, only p-I-like mobility, Hoare synchronization)

    [Hirsch and Montanari, Coordination 2000]

  • Modeling p-calculus (Milner synchronization)

    [Hirsch and Montanari, Concur 2001]

  • Modeling Ambient calculus [Ferrari, Montanari and Tuosto, ICTCS 2001]

  • Modeling Fusion calculus [Lanese and Montanari, to appear in TCS]


Outline5

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Expressiveness measure

C-behavS(P)(G) = reachable graphs

initial graph

1 : one-step computations

max: maximal computations

all: all computations

set of productions

synchronization style: H, M

Expressiveness Measure

(S1,C1) ≥ (S2,C2)

(i.e. style S1 is more expressive than style S2)

iff there exists a uniform simulation function f such that for all P and G

C2-behavS2(P)(G) = C1-behavS1(f(P))(G)


Hoare and milner direct comparison i

Hoare and Milner, Direct Comparison, I

(Milner,C1) ≥ (Hoare,C2) for all C1 and C2

i.e. Hoare cannot be uniformely simulated by Milner

The reason is that Milner synchronization style is monotone, i.e. in a Milner computation we can always add to a graph an additional part which stays idle, while Hoare style is not monotone


Hoare and milner direct comparison ii

Hoare and Milner, Direct Comparison, II

(Hoare,C1) ≥ (Milner,C2) for all C1 and C2

i.e. Milner cannot be uniformely simulated by Hoare

The reason is that in Hoare synchronization style restriction just hides part of the observation, while in Milner style restriction may forbid computations


Outline6

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Translation via amoeboids

Translation via Amoeboids

  • Amoeboids are graphs with suitable edge labels and corresponding productions which simulate the behavior of nodes in a different synchronization style

  • Function [[-]] replaces nodes with amoeboids while function [[-]]-1 replaces amoeboids with nodes.

  • We always have that [[([[G]])]]-1 = G


Implementing hoare with milner

Implementing Hoare with Milner

  • H-amoeboids implement broadcasting. C-amoeboids saturate nodes with less than 3 tentacles. We have rules for every action a (here with arity 2).

We have C-behavH(P)(G) = [[C-behavM(f(P))([[G]])]]-1


Implementing milner with hoare

Implementing Milner with Hoare

  • M-amoeboids implement routing. We have rules for every action a

and two analogous productions for synchronizing x with z and y with z.

We have only

C-behavM(P)(G)  [[C-behavH(f(P))([[G]])]]-1

since the amoeboids can also synchronize several pairs in parallel.


Outline7

Outline

  • Graphical Calculi for Distributed Systems

  • Synchronized Edge Replacement Systems

  • Mobility

  • Hoare and Milner Synchronization, with Fusion

  • Direct Comparison

  • Comparison with Translations

  • Conclusions and Future Work


Conclusions and future work

Conclusions and Future Work

  • Graph models with synchronized hyperedge replacement allow for more general synchronization mechanisms than ordinary process algebras, e.g. processes can synchronize at more than one channel and with more than one other process.

  • These extensions are needed for implementing one synchronization style into another.

  • Reachability in Hoare/Milner synchronization styles cannot be simulated uniformely

  • No countexample uses mobility, and thus the expressivenesses are incomparable even without mobility, and mobility does not bridge the gap

  • Distributed simulation via amoeboids of Milner style routers allows only concurrent pairwise synchronization

  • Generic synchronization styles and more general notions of implementation and refinement involving atomicity and bisimilarity can be considered: see the forthcoming PhD thesis of Ivan Lanese


  • Login