37
Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento di Informatica Università di Pisa COORDINATION 2005, Namur, 20-23 April 2005

Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

Synchronized Hyperedge Replacement for Heterogeneous

Systems

joint work withEmilio TuostoDipartimento di Informatica Università di Pisa

Ivan LaneseDipartimento di Informatica Università di Pisa

COORDINATION 2005, Namur, 20-23 April 2005

Page 2: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Which kind of systems? Usually not cats and

dogs Entities on huge

networks applications web services computers …

Page 3: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Features of the systems Systems composed by interacting

components pre-existing, off-the-shelf heterogeneous

different computational power, features, owner, …

Interaction via middleware for communication many primitives for communication complex protocols

Mobile/reconfigurable systems

Page 4: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Classical formal tools Frameworks in literature usually have

one simple primitive for communication e.g. -calculus uses message passing

Other primitives must be encoded not always an easy task

No primitives modeling complex protocols useful for abstract models of

coordination

Page 5: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Our approach Two level modeling Modeling the primitives provided

by the middleware synchronization algebras with

mobility (SAMs) Modeling the system

hypergraphs evolution via synchronized hyperedge

replacement (SHR) synchronization uses SAMs

Page 6: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Roadmap Our approach A simple example A less simple example What else?

Page 7: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Roadmap Our approach A simple example A less simple example What else?

Page 8: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Basics of system modeling Hyperedges are system

components

Nodes are communication channels or ports

Nodes can be global or local

Page 9: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Basics of hyperedge replacement Productions rewrite an edge into a

general graph attached to the same nodes

Context free mechanism Limited expressivity

synchronization is needed

Page 10: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Basics of synchronization Specified via constraints on nodes

adjacent to the rewritten edge A set of productions can be applied

in one step iff the constraints are satisfied

Problems: how to specify constraints? when constraints are satisfied?

Page 11: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Synchronization: general idea A production performs actions on

nodes If the actions can be composed, then

constraints are satisfied

Defined using a synchronization algebra (extends Winskel’s definition)

a

b

ε

Page 12: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Synchronization algebras A tuple <Act,ActComp,ε> Act: set of actions ActComp: set of triples of actions

a triple (a,b,c) specifies that a can synchronize with b giving c

associative and commutative ε: action

stands for “not involved in the synchronization” neutral element in the synchronization c=ε iff a=ε and b=ε

Allow to specify synchronization, nondeterminism, asynchronous execution and incompatibility between actions

Page 13: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: Milner (CCS) SA Actions {a, a, , ε} Synchronizations

(a,a,) and symmetric (,ε,) and symmetric

Other synchronizations (broadcast, mutual exclusion,…) can be easily modeled

Page 14: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Adding mobility Each action is equipped with a

tuple of node references During synchronization we

compute the references attached to the resulting action

compute a fusion among nodes mobility in the Fusion Calculus style

apply the fusion to the graph and to the references of the resulting action

Page 15: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Modeling mobility Actions have an arity

(number of attached references)

We extend the tuple (a,b,c) to (a,b,(c,Mob)) Mob: partial function {1,

…,ar(a)} + {1,…,ar(b)} {1,…}

Parameters of c computed using Mob

surjective on {1,…,ar(c)} Elements that are

mapped to the same position are merged

a b c2 3 2

Page 16: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Other issues Some channels are local

only actions that do not require further interactions are meaningful here

modeled by a subset Fin of actions May have many SAMs with the

same formal structure SAMs are named to distinguish them

Page 17: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: Milner (Fusion) SAM Actions {a, a, , ε} ar(a)=ar(a), ar()=ar(ε)=0 Synchronizations

(a,a,) and symmetric corresponding names are merged

(,ε,) and symmetric names of the non-ε action are

propagated

Fin= {, ε}

Page 18: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Managing multiple SAMs SAMs label nodes For new nodes a SAM must be

specified When merging nodes, SAMs must

be composed SAMs form a programmer-defined

commutative monoid monoidal operation used for

composition

Page 19: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Roadmap Our approach A simple example A less simple example What else?

Page 20: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: graph

S1

Au

C

…x:Mil

u:Mil

Sn

Page 21: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: productions

Cx:Mil

Cx:Mil

y:Mil

Au

x

Auu:Mil

x:Mil

u:Mil

auth,y:Mil

auth,u:Mil

Page 22: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: synchronization

S1

Au

C

…x:Mil

u:Mil

Snauth,y:Mil

auth,u:Mil

Page 23: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: final graph

S1

Au

C

…x:Mil

u:Mil

Sn

Assumption: Mil • Mil = Mil

Page 24: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

The full power of our approach Suppose servers are search engines

and some clients want to submit the request to all of them

Want to use broadcast synchronization between client and servers but Milner synchronization to interact with Au

Just change the production for the client with y:Bdc and define Mil • Bdc = Bdc

Page 25: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: synchronization again

S1

Au

C

…x:Mil

u:Mil

Snauth,y:Bdc

auth,u:Mil

Page 26: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Example: final graph again

S1

Au

C

…x:Mil

u:Bdc

Sn

Assumption: Mil • Bdc = Bdc

Page 27: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Roadmap Our approach A simple example A less simple example What else?

Page 28: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

A network example Network with routers and clients Channels can have

4Kb/16Kb packets error detection/no error detection

To communicate a client creates a virtual communication channel that uses the underlying infrastructure

The communication channel supports 16Kb packets/error detection only if all the underlying channels do

Page 29: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Modeling the scenario Eight different SAMs with all the

combinations of 4Kb < 16Kb no error detection < error detection communication < control

SAMs provide variants of Milner synchronization e.g. action for detecting errors

SAMs form a partial order (pointwise) SAM composition corresponds to glb

Page 30: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Building a virtual channel

CR R

C R R

16,√ 4,×

16,×

4,√16,√

16,×

4,√

comm,16,×

Act

Act

Page 31: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Ideas on the productions Each production creates a node

labelled with a SAM for communication with the features provided by the

nearby channels During synchronization these

nodes are merged to build the communication node it is automatically labelled with the

desired SAM

Page 32: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Roadmap Our approach A simple example A less simple example What else?

Page 33: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Behind graphic A textual representation for

hypergraphs, transitions, productions

A labelled transition system for system evolution

Inference rules to derive transitions from productions

Production schemas to define classes of similar productions

Page 34: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Only for the most proud

Page 35: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Conclusions A general framework for modeling

heterogeneous systems SAMs to model synchronization/complex

interaction protocols SHR to model system evolution

Different synchronizations can be used

Synchronization policy can be changed dynamically

Sound mathematical foundations

Page 36: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto

Future work Use SHR+SAMs to model real

protocols/heterogeneous systems Use SAMs for QoS [see Emilio’s poster] Study the expressivity of the framework Implement SHR (someone wants to do

that?) Apply SAMs to process calculi [paper

submitted to CONCUR] Study the relationships between SAMs

(composition/refinement)

Page 37: Synchronized Hyperedge Replacement for Heterogeneous Systems joint work with Emilio Tuosto Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento

COORDINATION 2005, 20-23 April, Namur, Belgium Ivan Lanese and Emilio

Tuosto