new insights on architectural connectors

63
New insights on architectural connectors joint work with Roberto Bruni University of Pisa, Italy Ugo Montanari University of Pisa, Italy José Luiz Fiadeiro University of Leicester, UK Antónia Lopes University of Lisbon, Portugal Ivan Lanese Computer Science Department University of Pisa IFIP TCS 2004, Toulouse, 22-27 August 2004

Upload: dominy

Post on 25-Feb-2016

42 views

Category:

Documents


0 download

DESCRIPTION

IFIP TCS 2004, Toulouse, 22-27 August 2004. New insights on architectural connectors. Ivan Lanese Computer Science Department University of Pisa. joint work with Roberto Bruni University of Pisa, Italy Ugo Montanari University of Pisa, Italy - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: New insights on architectural connectors

New insights on architectural connectors

joint work withRoberto Bruni University of Pisa, ItalyUgo Montanari University of Pisa, ItalyJosé Luiz Fiadeiro University of Leicester, UKAntónia Lopes University of Lisbon, Portugal

Ivan LaneseComputer Science Department University of Pisa

IFIP TCS 2004, Toulouse, 22-27 August 2004

Page 2: New insights on architectural connectors

New insights on architectural connectors

Roadmap Goal Background: CommUnity Background: tile logic Standard decomposition

for CommUnity From CommUnity to tiles Conclusion and future

work

Page 3: New insights on architectural connectors

New insights on architectural connectors

Roadmap Goal Background: CommUnity Background: tile logic Standard decomposition

for CommUnity From CommUnity to tiles Conclusion and future

work

Page 4: New insights on architectural connectors

New insights on architectural connectors

General motivation I Comparing the categorical and the algebraic

approach to systems Categorical approach Algebraic approach

Page 5: New insights on architectural connectors

New insights on architectural connectors

General motivation II Comparing the categorical and the algebraic

approach to systems Categorical approach

objects are system components morphisms express simulation, refinement, … complex systems are modeled as diagrams composition via universal construction (colimit)

Algebraic approach

Page 6: New insights on architectural connectors

New insights on architectural connectors

General motivation III Comparing the categorical and the algebraic

approach to systems Categorical approach Algebraic approach

System represented by an algebra constants are basic components operations compose smaller systems into larger ones structural axioms collapse structurally equivalent

systems operational semantics (SOS style) abstract semantics (bisimilarity)

Page 7: New insights on architectural connectors

New insights on architectural connectors

Specific aim Reconcile two selected representatives

CommUnity (categorical) architectural description language distinction between computation and

coordination Tile model (algebraic)

operational model for concurrent systems co-existence of horizontal (space) and vertical

(time) dimensions

Page 8: New insights on architectural connectors

New insights on architectural connectors

Specific aim: advantages Advantage: transfer of concepts and

techniques Semantic model for CommUnity Observational equivalence of CommUnity

configurations CommUnity-like connectors in the tile model Separation between computation and

coordination for tiles

Page 9: New insights on architectural connectors

New insights on architectural connectors

Roadmap Goal Background: CommUnity Background: tile logic Standard decomposition

for CommUnity From CommUnity to tiles Conclusion and future

work

Page 10: New insights on architectural connectors

New insights on architectural connectors

CommUnity

Program Colimit

Morphisms “Denotational semantics”

s

System configurations are diagrams Components compute locally Interactions as architectural connectors

Page 11: New insights on architectural connectors

New insights on architectural connectors

CommUnity programs

design foo isin x, zout v, ndo a: true v:= x+z | n:=v+x[] b: n>MIN n:=n-x[] c: v<MAX v:=n+z

input/output channels

actionsguards concurrent assignments

Page 12: New insights on architectural connectors

New insights on architectural connectors

Morphisms

channels of P1 to channels of P2

actions of P2 to actions of P1

P1

P2actions of P1

correspond todisjoint sets of actions of P2

output channels cannot be merged

(names are not important)

Page 13: New insights on architectural connectors

New insights on architectural connectors

Exampledesign P1 isin … out …do a …[] b …

design P2 isin … out …do f …[] g …[] h …

design P3 isin … out …do p …[] q …[] r …[] s …

f,g a p,q,r

h b s

design P isin … out …do f|a|p …[] f|a|q …[] f|a|r …

[] g|a|p …[] g|a|q …[] g|a|r …

[] h|b|s …

Page 14: New insights on architectural connectors

New insights on architectural connectors

Star-shaped diagrams

roles

cablesno output channels

actions are true skip

glue

Page 15: New insights on architectural connectors

New insights on architectural connectors

Roadmap Goal Background: CommUnity Background: tile logic Standard decomposition

for CommUnity From CommUnity to tiles Conclusion and future

work

Page 16: New insights on architectural connectors

New insights on architectural connectors

Tile model Operational and abstract semantics of

open concurrent systems Compositional in space and time Deals uniformly with closed and open

systems Congruence results for particular formats

Category based but compositionality dealt with algebraic methods

Page 17: New insights on architectural connectors

New insights on architectural connectors

parallelcomposition

Configurationsinput

interfaceoutput

interface

sequentialcomposition

(interfaces can be typed)

Page 18: New insights on architectural connectors

New insights on architectural connectors

Configurationsinput

interfaceoutput

interfaceparallel

composition

sequentialcomposition

symmetries

Page 19: New insights on architectural connectors

New insights on architectural connectors

Observationsinitial

interface

finalinterface

concurrentcomputatio

n

Page 20: New insights on architectural connectors

New insights on architectural connectors

Tiles Combine horizontal and vertical

structures through interfacesinitial configuration

final configuration

trigger effect

Page 21: New insights on architectural connectors

New insights on architectural connectors

Tiles Compose tiles

horizontally

Page 22: New insights on architectural connectors

New insights on architectural connectors

Tiles Compose tiles

horizontally (also vertically and in parallel)

Page 23: New insights on architectural connectors

New insights on architectural connectors

Operational semantics Structural equivalence

Axioms on configurations (e.g. symmetries) LTS

states = configurations transitions = tiles labels = (trigger,effect) pairs

fa

gb f g(a,b)

Page 24: New insights on architectural connectors

New insights on architectural connectors

Abstract semantics Tile bisimilarity

Standard bisimilarity applied to previous transition system

Systems are bisimilar iff they can mutually simulate transitions

More powerful than trace equivalence

xy z

x xy z

≈∕

Page 25: New insights on architectural connectors

New insights on architectural connectors

Roadmap Goal Background: CommUnity Background: tile logic Standard decomposition

for CommUnity From CommUnity to tiles Conclusion and future

work

Page 26: New insights on architectural connectors

New insights on architectural connectors

Standard decomposition The decomposition of a program is a

star-shaped diagram It highlights the algebraic structure of

CommUnity programs It is the first step of the translation

into the tile model

Page 27: New insights on architectural connectors

New insights on architectural connectors

Standard decomposition illustrated•n output channels•m actions

•n channel managers•m guard managers•n+m cables•1 glue

P

channel managers and guard managers

Page 28: New insights on architectural connectors

New insights on architectural connectors

Elements of the decomposition

Glue Channel managers Guard managers Cables Morphisms

Page 29: New insights on architectural connectors

New insights on architectural connectors

Elements of the decomposition

Glue all the channels as input channels all the actions as true skip

Channel managers Guard managers Cables Morphisms

Page 30: New insights on architectural connectors

New insights on architectural connectors

Elements of the decomposition

Glue Channel managers

one for each output channel the assignments to that channel as actions the input channels needed to evaluate the

assignments Guard managers Cables Morphisms

Page 31: New insights on architectural connectors

New insights on architectural connectors

Elements of the decomposition

Glue Channel managers Guard managers

one for each guard one action of the form pred skip the input channels needed to evaluate the guard

Cables Morphisms

Page 32: New insights on architectural connectors

New insights on architectural connectors

Elements of the decomposition

Glue Channel managers Guard managers Cables

all the channels needed by the role, as input channels

all the actions needed by the role, as true skip Morphisms

Page 33: New insights on architectural connectors

New insights on architectural connectors

Elements of the decomposition

Glue Channel managers Guard managers Cables Morphisms

maps the actions and channels of the cables to the corresponding ones in the glue and in the roles

Page 34: New insights on architectural connectors

New insights on architectural connectors

Properties of the decomposition

Correctness the colimit of the decomposed program is

equal to the starting program Possible generalization

a diagram can be decomposed by decomposing each role

morphisms entering a program become morphisms entering the glue

Page 35: New insights on architectural connectors

New insights on architectural connectors

Roadmap Goal Background: CommUnity Background: tile logic Standard decomposition

for CommUnity From CommUnity to tiles Conclusion and future

work

Page 36: New insights on architectural connectors

New insights on architectural connectors

What we need We have to define a tile logic from a

CommUnity program We need to define

objects configurations observations tiles

to specify the behavior

Page 37: New insights on architectural connectors

New insights on architectural connectors

Objects channels

with a type and a modality (input/output) special boolean objects

for the evaluation of guards synchronization objects

representing actions

Page 38: New insights on architectural connectors

New insights on architectural connectors

Structure of a configuration

State

Role orglue

Channelfusion

Actionsynchronization

Role orglue

Role orglue

……Anchored configuration

Page 39: New insights on architectural connectors

New insights on architectural connectors

Structure of a configuration

State

Role orglue

Channelfusion

Actionsynchronization

Role orglue

Role orglue

……Unanchored configuration

Page 40: New insights on architectural connectors

New insights on architectural connectors

How to build a configuration

We translate roles and glues We build the system using the “parallel

composition through one cable” operation this allows to build the whole system thanks to

the property of the decomposition we fix an order ≤ on cables for translating them the operation adds the channel fusion and action

synchronization parts Eventually we add the state

Page 41: New insights on architectural connectors

New insights on architectural connectors

Constructors for roles and state

cm[<fi>]

iiiii

b

actionschannels

channel manager

o

gm[p]

iiiii

b

actionchannels

guard managerstate

state[<val:typ>]

channels

iooo

o

b

Page 42: New insights on architectural connectors

New insights on architectural connectors

Channel connectors

i

i

i i b

o

o b

b

!i

Page 43: New insights on architectural connectors

New insights on architectural connectors

Action synchronization connectors

! 1

Page 44: New insights on architectural connectors

New insights on architectural connectors

Translating the glue

!i

!i

!i

!i

!i

1

Page 45: New insights on architectural connectors

New insights on architectural connectors

Parallel composition through one cable

Channel part: channels in the image of the same channel of the cable are merged using channel connectors

Action part: we have to synchronize in all the possible ways the actions of the two groups mapped to each action of the cable

Page 46: New insights on architectural connectors

New insights on architectural connectors

Synchronizing actions

!

!!

!

!

!

Page 47: New insights on architectural connectors

New insights on architectural connectors

Observations For the action part:

tick (action performed) or untick (action forbidden)

For the channel part terms assigning: to each output variable its data term to each special boolean object a predicate to each input variable a * term, standing

for a guess on the actual value

Page 48: New insights on architectural connectors

New insights on architectural connectors

Tiles Specify the semantics of each part of

the configuration Tiles for

state channel connectors channel managers guard managers action synchronization connectors

Page 49: New insights on architectural connectors

New insights on architectural connectors

Tiles Specify the semantics of each part of the

configuration Tiles for

state update the values with the assignments and check the

validity of predicates channel connectors channel managers guard managers action synchronization connectors

Page 50: New insights on architectural connectors

New insights on architectural connectors

Tiles Specify the semantics of each part of the

configuration Tiles for

state channel connectors

apply consistent substitutions to data terms channel managers guard managers action synchronization connectors

Page 51: New insights on architectural connectors

New insights on architectural connectors

Tiles Specify the semantics of each part of the

configuration Tiles for

state channel connectors channel managers

produce the assignments to the left and a tick on the performed action to the right

guard managers action synchronization connectors

Page 52: New insights on architectural connectors

New insights on architectural connectors

Tiles Specify the semantics of each part of the

configuration Tiles for

state channel connectors channel managers guard managers

produce the predicate to the left and a tick to the right action synchronization connectors

Page 53: New insights on architectural connectors

New insights on architectural connectors

Tiles Specify the semantics of each part of the

configuration Tiles for

state channel connectors channel managers guard managers action synchronization connectors

select the allowed combinations of tick and untick in the interfaces

Page 54: New insights on architectural connectors

New insights on architectural connectors

Tiles for mutual exclusion

Page 55: New insights on architectural connectors

New insights on architectural connectors

Tile for channel fusion

y1=x2>3and x3<4

and x1y2=x2+1

y1=x2<4and x1

y1=x2>3and x1

y2=x2+12

ii bbb oo

111 22 3

Page 56: New insights on architectural connectors

New insights on architectural connectors

Tile for channel manager

cm[<x2=x2+x1,x2=x2-x1>]

i

b

o

cm[<x2=x2+x1,x2=x2-x1>]

i

b

o

x2=x2+x1x3=true

Page 57: New insights on architectural connectors

New insights on architectural connectors

Notation dia: CommUnity diagram DS(dia): standard decomposition of

dia TS(dia,≤): tile configuration for dia

where cables have been translated in the order specified by ≤, without state

TS(dia,≤,val): as before, but with state with values val

Page 58: New insights on architectural connectors

New insights on architectural connectors

Properties of the encoding I

TS(dia,≤,val) initial configuration of a tile val’. TS(dia,≤,val’) is the final configuration

Such a tile (with empty observation) exists iff there exists a computation of colim(dia) with starting state val and final state val’

Page 59: New insights on architectural connectors

New insights on architectural connectors

Properties of the encoding II

To deal with tiles without state we need a permutation ρ to rearrange the interface

Bisimilarity results: TS(dia,≤,val) ≈ TS(dia,≤’,val) for each ≤, ≤’ TS(dia,≤) ≈ ρ;TS(dia,≤’) for each ≤, ≤’ TS(dia,≤,val) ≈ TS(colim(dia),≤’,val) TS(dia,≤) ≈ ρ;TS(colim(dia),≤’,val)

Page 60: New insights on architectural connectors

New insights on architectural connectors

Roadmap Goal Background: CommUnity Background: tile logic Standard decomposition

for CommUnity From CommUnity to tiles Conclusion and future

work

Page 61: New insights on architectural connectors

New insights on architectural connectors

Algebraic vs categoricalAlgebraic CategoricalBasic constructors ObjectsAux. constructors MorphismsRepresentative Colimitup to equivalenceOperat. semantics ?

? Architectural aspects

Page 62: New insights on architectural connectors

New insights on architectural connectors

Future work Further analyze the correspondence

axiomatize connectors to have a correspondence between normal form and colimit

Deal with other aspects of CommUnity localities mobility dynamic reconfiguration

Mutual transfer of concepts and techniques between the two approaches

Apply the approach to other formalisms

Page 63: New insights on architectural connectors

New insights on architectural connectors