Synchronization strategies for global computing

Synchronization strategies
for global computing models
Ivan Lanese
Computer Science Department
University of Bologna
1
Roadmap

Global computing

Synchronized Hyperedge Replacement

SHR vs Fusion Calculus

Synchronization Algebras with Mobility

Congruence results

Future work
2
Roadmap

Global computing

Synchronized Hyperedge Replacement

SHR vs Fusion Calculus

Synchronization Algebras with Mobility

Congruence results

Future work
3
What is global computing?

Essentially networks
deployed on huge areas

Global computing
systems quite common
nowadays
– Internet, wireless
communication networks,
overlay networks …
4
Features of global computing systems

Distribution
– Huge areas: localities can not always be hidden

Mobility
– Both physical and code mobility

Heterogeneity
– Interoperability, coordination

Openness

Reconfigurability

Non-functional requirements
5
Formal methods for GC

Building models of the system
– To concentrate on a particular aspect
– To abstract from details
– To analyze the properties of the system before building it

Traditional formal methods are not enough for GC
– Mobility must be modeled explicitly
– Need for compositionality
– Need for more abstraction
6
High level models

We look for models at the high level of abstraction
– Models of coordination among subsystems

We need powerful primitives
– Multiple synchronizations
– Abstractions of full protocols

Declarative specification of constraints
– Possible evolutions derived as solution of system of
constraints
7
Roadmap

Global computing

Synchronized Hyperedge Replacement

SHR vs Fusion Calculus

Synchronization Algebras with Mobility

Congruence results

Future work
8
Synchronized Hyperedge Replacement

A graph transformation approach
– Suitable to deal with distribution, mobility, compositionality

(Hyper)edges are systems connected through common nodes

Productions describe the evolution of single edges
– Local effect, easy to implement

Synchronization via constraints on nodes
– Determines which productions can be applied concurrently
– Productions applied indipendently
– Allows to define complex transformations
– Multiple synchronization is allowed

Declarative approach
9
Hyperedge Replacement Systems
A production describes how the hyperedge L is rewritten into the
graph R
L
R
2
1
3
4
H
2
3
4
1
10
Hyperedge Replacement Systems
A production describes how the hyperedge L is transformed into the
graph R
L
R
2
3
4
H
2
1
3
4
1
1
1
2
2
3
L’
3
R’
Many concurrent rewritings are allowed
11
Synchronizing productions
 Synchronization: productions execute actions
on nodes. A transition is allowed iff the
synchronization constraints imposed on actions are
satisfied
Many synchronization models are possible
(Hoare, Milner, ...)
12
An example: Milner SHR
Milner synchronization: pair of edges can
synchronize by performing complementary actions
a
a
A1
A1
A2
B1
a a
B1
B2
A2
B2
13
SHR with mobility
We use name mobility
– Actions carry tuples of references to nodes (new or already
existent)
– References associated to synchronized actions are matched and
corresponding nodes are merged
a<x>
a<y>
A1
x
A1
A2
y
B1
a<x>
a<y>
B1
B2
x=y
A2
B2
14
Example
Brother:
Initial Graph
x
Star Reconfiguration:
r<w>
C
C
C
C
C
r<w>
C
x
C
Brother
Brother
C
C
(1)
(2)
C
C
Brother
(3)
S
Star Rec.
S
C
C
w
S
C
C
(4)
S
S
(5)
15
Algebraic presentation of SHR

Graphs represented as terms
– Edges (applied to nodes) are basic constants
– Operators for parallel composition and hiding of
nodes

Transitions described by a LTS

Inference rules to derive transitions from
productions

Allows proofs by induction
16
Roadmap

Global computing

Synchronized Hyperedge Replacement

SHR vs Fusion Calculus

Synchronization Algebras with Mobility

Congruence results

Future work
17
Fusion Calculus

Calculus for mobility inspired by π-calculus

Input prefix is not a binder
– Symmetric input/output
– Names are merged
– Input of π-calculus obtained as input+restriction on
the objects of the input
18
SHR vs Fusion Calculus

Many common features
– LTS semantics
– Synchronization in Milner style
– Mobility using fusions

Straightforward mapping of Fusion into SHR

SHR adds:
– Graphical presentation
– Multiple synchronizations
– Concurrent semantics
19
Fusion Calculus vs SHR
Fusion
Processes
Sequential processes
Names
Parallel comp.
Scope
Prefixes
Transitions
Milner SHR
Graphs
Hyperedges
Nodes
Parallel comp.
Restriction
Productions
Interleaving tr.
20
Example
( xy)(ux.P | yx.Q | yz.R)
( xy)(ux.P | yx.Q | yz.R) 
( y)( P | yx.Q | yz.R)
( x ) ux
x  z 

( y)( P | Q | R)
We can also execute both the steps at the same time
21
Roadmap

Global computing

Synchronized Hyperedge Replacement

SHR vs Fusion Calculus

Synchronization Algebras with Mobility

Congruence results

Future work
22
Synchronization Algebras with Mobility (1)

Extend Winskel’s synchronization algebras to deal with name
mobility and local resources

Allow to have synchronization models as first-class citizens
– Can be used to have models with parametric synchronization policies
– Many synchronization policies in the same model
– Different policies can be compared and combined

Common policies can be expressed as SAMs
– Simple ones: Milner, Hoare, broadcast
– More complex ones: with priority, treshold synchronization
23
Synchronization Algebras with Mobility (2)
24
Synchronization Algebras with Mobility (2)

SAs specify composition of actions
– (a,a,τ) a synchronizes with a producing τ

SAMs also provide:
– Mapping from parameters of synchronizing actions
to parameters of the result
– Fusions among parameters
– Final actions (performed on local channels)
– Some more technical stuff
25
Milner synchronization as a SAM

Actions: normal actions, coactions, τ, ε

ε stands for “not taking part to the synchronization”

Normal actions synchronize with corresponding
coactions giving τ, corresponding parameters are
fused, no parameters are propagated

Anything can synchronize with ε, action and
parameters are propagated, no fusions

No other synchronization is allowed

Only τ and ε can be performed on local channels
26
Sample synchronization
a
b
c
27
Parametric SHR

The SAM is a parameter of the model

Different models obtained via instantiation
– Allows to recover Hoare and Milner SHR…
– …and to easily define new models

Properties can be proved in general
– Allows to highlight relations between properties of
SAMs and properties of the model
28
Heterogeneous SHR

Allows to model heterogeneous systems
– Different primitives in different parts of the system
– Example: wireless connections with broadcast and
wired connections with Milner

Each node is labeled by a SAM

SAMs must be managed dynamically
– SAMs are required to form a commutative monoid
– Node fusions cause SAMs composition
29
PRISMA Calculus

Generalization of Fusion based on SAMs
– Prefixes of the form x a y . P
– Synchronization ruled by the SAM

Standard Fusion is (more or less) Milner
PRISMA Calculus

The same approach can be applied to other
calculi (with some more technical difficulties)
30
Roadmap

Global computing

Synchronized Hyperedge Replacement

SHR vs Fusion Calculus

Synchronization Algebras with Mobility

Congruence results

Future work
31
Abstract semantics for parametric SHR

Bisimulation can be defined in a standard
way for SHR

Under reasonable conditions on the SAM
bisimilarity is a congruence for parametric
SHR
– Milner, Hoare and many others satisfy the
conditions
32
Congruence results for Fusion Calculus

Bisimilarity is not a congruence for Fusion
Calculus (not closed under substitutions)

The mapping from Fusion into SHR allows to
derive a semantics whose bisimilarity is a
congruence

The result can be extended also to π-calculus
33
The idea of the semantics
34
The idea of the semantics

Allowing many actions in the same transition but on
different channels
– Process a|b can execute a and b concurrently going to 0
(but can also execute either a or b)
– Process a|a is bisimilar to a.a
– Process a|a|b can perform τ and b concurrently going to 0

Allows to observe the degree of parallelism of a
process
35
Congruence properties
36
Congruence properties

a.b  b.a  a | b no more a counterexample since the
two terms are not bisimilar
37
Congruence properties

a.b  b.a  a | b no more a counterexample since the
two terms are not bisimilar

Observing where a synchronization is performed
becomes important
– Otherwise congruence non preserved by context a|[-]
– Actions aτ in addition to normal τ

The resulting bisimilarity is a congruence
38
Roadmap

Global computing

Synchronized Hyperedge Replacement

SHR vs Fusion Calculus

Synchronization Algebras with Mobility

Congruence results

Future work
39
Future work

I have moved, so my work has changed a bit
– Core calculus for service oriented computing
– Techniques for proving bisimilarity properties of mobile
calculi

Some follow-up of the previous work that I would like
to analyze
– Congruence results for concurrent semantics of π-calculus
– Applying SAMs to π-calculus
– Exploiting SAMs for quality of service (see Tuosto & Hirsch
work)
40
General bibliography

“A Model of Distributed Systems based on Graph Rewriting”, P.
Degano and U. Montanari, Journal of the ACM, 34

“Synchronized Hyperedge Replacement with Name Mobility”, D.
Hirsch and U. Montanari, Proceedings of CONCUR 2001, LNCS
2154

“The Fusion Calculus: Expressiveness and Symmetry in
Mobile Processes”, B. Victor, Ph.D. Thesis, Department of
Computer Systems, Uppsala University, Uppsala, Sweden

“Synchronization trees”, G. Winskel, TCS, 34

“SHReQ: Coordinating Application Level QoS”, D. Hirsch and E.
Tuosto, Proceedings of SEFM 2005, IEEE
41
My bibliography

“Software Architecture, Global Computing and Graph Transformation via
Horn Clauses”, I. Lanese and U. Montanari, Proceedings of SBES 2002 –
16th Brazilian Symposium on Software Engineering

“A Graphical Fusion Calculus”, I. Lanese and U. Montanari, Proceedings of
CoMeta: Computational Metamodels Final Workshop, ENTCS 104

“Mapping Fusion and Synchronized Hyperedge Replacement into Logic
Programming”, I. Lanese and U. Montanari, to appear in a special issue of
TPLP

“Synchronization Algebras with Mobility for Graph Transformations”, I.
Lanese and U. Montanari, Proceedings of FGUC 2004 – Workshop on
Foundations of Global Ubiquitous Computing, ENTCS 138
42
My bibliography

“Synchronized Hyperedge Replacement for Heterogeneus Systems”, I.
Lanese and E. Tuosto, Proceedings of COORDINATION 2005, LNCS 3454

"Hoare vs Milner: Comparing Synchronizations in a Graphical Framework
with Mobility", I. Lanese and U. Montanari, Proceedings of GT-VC‘05,
ENTCS, to appear

"Exploiting User-Definable Synchronizations in Graph Transformation",
I. Lanese, Proceedings of GT-VMT'06, ENTCS, to appear

"Synchronization Strategies for Global Computing Models",
Ivan Lanese, Ph.D. Thesis, Computer Science Department, University of
Pisa, to appear
43
End of talk
44