Roberto Bruni @ Pisa, Italy 13 June 2008 WADT 20081 Tiles for Reo Roberto Bruni Dipartimento di...

51
WADT 2008 1 Roberto Bruni @ Pisa, Italy 13 June 2008 Tiles for Reo Roberto Bruni Dipartimento di Informatica Università di Pisa WADT 2008 19th International Workshop on Algebraic Development Techniques Farhad Arbab (CWI) Dave Clarke (CWI) Ivan Lanese (Bologna) Ugo Montanari (Pisa)
  • date post

    18-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    1

Transcript of Roberto Bruni @ Pisa, Italy 13 June 2008 WADT 20081 Tiles for Reo Roberto Bruni Dipartimento di...

WADT 2008 1Roberto Bruni @ Pisa, Italy 13 June 2008

Tiles forReo

Roberto BruniDipartimento di Informatica Università di Pisa

WADT 2008

19th International Workshop on

Algebraic Development Techniques

Farhad Arbab (CWI)Dave Clarke (CWI)Ivan Lanese (Bologna)Ugo Montanari (Pisa)

WADT 2008 2Roberto Bruni @ Pisa, Italy 13 June 2008

Content

Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion

WADT 2008 3Roberto Bruni @ Pisa, Italy 13 June 2008

Introduction

• Reo is an exogenous coordination language based on a calculus of connector composition– http://homepages.cwi.nl/~proenca/webreo/

• Tile Systems offer a coordination model equipped with flexible synchronization primitives

• We aim to show that tiles give an adequate semantic setting for Reo– exercise in understanding– tiles have some advantages w.r.t. colouring tables,

constraint-automata, graph transformations

WADT 2008 4Roberto Bruni @ Pisa, Italy 13 June 2008

Content

Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion

WADT 2008 5Roberto Bruni @ Pisa, Italy 13 June 2008

Tiling as a Domino Game

WADT 2008 6Roberto Bruni @ Pisa, Italy 13 June 2008

Graph-like Decorated Tiles

• Next slides will focus on tiles that exploit some graph-like structures of configurations and observations– a bit vague about exact tile syntax

• Key notions:– configurations (with interfaces)– observations– tiles = trigger+effect rewrites

WADT 2008 7Roberto Bruni @ Pisa, Italy 13 June 2008

parallelcomposition

Configurations

inputinterface

outputinterface

sequentialcomposition

(interfaces can be typed)

WADT 2008 8Roberto Bruni @ Pisa, Italy 13 June 2008

Configurations

inputinterface

outputinterface

parallelcomposition

sequentialcomposition

functoriality

WADT 2008 9Roberto Bruni @ Pisa, Italy 13 June 2008

Configurations

inputinterface

outputinterface

parallelcomposition

sequentialcomposition

functoriality+

symmetries=

symmetric monoidal cat

WADT 2008 10Roberto Bruni @ Pisa, Italy 13 June 2008

Observationsinitial

interface

finalinterface

concurrent

computation

WADT 2008 11Roberto Bruni @ Pisa, Italy 13 June 2008

Tiles

• Combine horizontal and vertical structures through interfaces

initial configuration

final configuration

trigger effect

WADT 2008 12Roberto Bruni @ Pisa, Italy 13 June 2008

Tiles

• Compose tiles– horizontally

WADT 2008 13Roberto Bruni @ Pisa, Italy 13 June 2008

Tiles

• Compose tiles– horizontally– (also vertically and in parallel)

symmetric monoidal double cat

WADT 2008 14Roberto Bruni @ Pisa, Italy 13 June 2008

Tile Semantics Recipee

• Operational semantics:– define interfaces, configurations and

observations– define tiles for configuration constructors

• Abstract semantics:– ordinary LTS where labels are trigger-effect pairs– tile bisimilarity, tile trace equivalence

• Congruence results:– tile decomposition property– basic source format

WADT 2008 15Roberto Bruni @ Pisa, Italy 13 June 2008

Content

Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion

WADT 2008 16Roberto Bruni @ Pisa, Italy 13 June 2008

Reo Basics

• Reo channels: point-to-point primitive connectors– one input-end + one output-end– two input-ends– two output-ends

• Reo node: the points where channel ends conjoin– input node: only input-ends– output-node: only output-ends– mixed node: both input-ends and output-ends

• Interaction with components:– write operation– take operation

WADT 2008 17Roberto Bruni @ Pisa, Italy 13 June 2008

Replicators

• A write to an input node succeeds only if all input-ends coincident on that node accept the data item– input nodes act essentially as replicators

WADT 2008 18Roberto Bruni @ Pisa, Italy 13 June 2008

Mergers

• A take on an output node succeeds only if at least one of the output-ends coincident on that node offers a data item– if more than one available, one is selected non-

deterministically and the others excluded– output nodes act essentially as mergers

WADT 2008 19Roberto Bruni @ Pisa, Italy 13 June 2008

Replicators and Mergers

• Mixed nodes as pumping stations: merger+replicator

WADT 2008 20Roberto Bruni @ Pisa, Italy 13 June 2008

Colouring Tables

Sync LossySync SyncDrain

WADT 2008 21Roberto Bruni @ Pisa, Italy 13 June 2008

Exclusive Router

A

B

C DE

F G

sA

sC sD

sF sG

lsC lsD

sdsynchronous channel

lossy synchronous channel

synchronous drain

WADT 2008 22Roberto Bruni @ Pisa, Italy 13 June 2008

Content

Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion

WADT 2008 23Roberto Bruni @ Pisa, Italy 13 June 2008

Tiles Ingredients

• Node machinery:– typed interfaces– node constructors (stateless)

• Stateless connectors• Stateful connectors• Observations

– write, take– not-allowed

WADT 2008 24Roberto Bruni @ Pisa, Italy 13 June 2008

Reo (Mixed) Node

WADT 2008 25Roberto Bruni @ Pisa, Italy 13 June 2008

Merger

WADT 2008 26Roberto Bruni @ Pisa, Italy 13 June 2008

Replicator

WADT 2008 27Roberto Bruni @ Pisa, Italy 13 June 2008

Example: a mixed node

A

Syntactic sugar A

WADT 2008 28Roberto Bruni @ Pisa, Italy 13 June 2008

Sync Channel

WADT 2008 29Roberto Bruni @ Pisa, Italy 13 June 2008

Lossy Sync

WADT 2008 30Roberto Bruni @ Pisa, Italy 13 June 2008

Sync Drain

WADT 2008 31Roberto Bruni @ Pisa, Italy 13 June 2008

Sync Spout

WADT 2008 32Roberto Bruni @ Pisa, Italy 13 June 2008

Example: Exclusive Router

A

B

C

E

F

sA

lsC

sDsC sdsF

D

G

lsD

sG

A

B

C DE

F G

sA

sC sD

sF sG

lsC lsD

sd

WADT 2008 33Roberto Bruni @ Pisa, Italy 13 June 2008

Tiling the Example

WADT 2008 34Roberto Bruni @ Pisa, Italy 13 June 2008

Tiling the Example

WADT 2008 35Roberto Bruni @ Pisa, Italy 13 June 2008

Tiling the Example

WADT 2008 36Roberto Bruni @ Pisa, Italy 13 June 2008

Some Obvious Equivalences

WADT 2008 37Roberto Bruni @ Pisa, Italy 13 June 2008

Some Obvious Equivalences

...

WADT 2008 38Roberto Bruni @ Pisa, Italy 13 June 2008

Stateless vs Stateful

• Only stateless connectors so far– colouring tables are ok– static tile configurations

• (see axiomatization in TCS, journal version of our CALCO 2005 paper)

• Stateful connectors are more interesting– colouring tables miss final configuration

WADT 2008 39Roberto Bruni @ Pisa, Italy 13 June 2008

Empty Async FIFO1

[ ]

[ ]

[ d ]

[ ]

[ ]

d

WADT 2008 40Roberto Bruni @ Pisa, Italy 13 June 2008

Full Async FIFO1

[ d ]

[ d ]

[ ]

[ d ]

[ d ]

d

WADT 2008 41Roberto Bruni @ Pisa, Italy 13 June 2008

Towards Async FIFO2

[ ]

[ ]

many FIFO1

introduce delaysdepending on their

number

d

[d]

[ ]

[ ]

[d]

[ ]

[ ]

d

WADT 2008 42Roberto Bruni @ Pisa, Italy 13 June 2008

Empty Sync FIFO1

{ }

{ }

{ d }

{ }

{ }

d

{ }

{ }

d

d

WADT 2008 43Roberto Bruni @ Pisa, Italy 13 June 2008

Full Sync FIFO1

{ }

{ d }

{ }

{ d }

{ d }

{ d1 }

{ d2 }

d2

d1d

WADT 2008 44Roberto Bruni @ Pisa, Italy 13 June 2008

Async FIFO2 and FIFOk

{ }

[ ]d

{ }

[d]

{ }

[ ]

d { }

[ ]

{ }

{ }

{ }

...

WADT 2008 45Roberto Bruni @ Pisa, Italy 13 June 2008

Async FIFO∞

( ]

( ]

( ]

( ]

( d ]

d

( ]

( d ]

( d ]

d

( d ]

( d ]

WADT 2008 46Roberto Bruni @ Pisa, Italy 13 June 2008

Derived Operators: PAR

_|_

WADT 2008 47Roberto Bruni @ Pisa, Italy 13 June 2008

Derived Operators: SEQ

_::_

WADT 2008 48Roberto Bruni @ Pisa, Italy 13 June 2008

Derived Operators: PLUG(x)

x

WADT 2008 49Roberto Bruni @ Pisa, Italy 13 June 2008

Derived Operators: CLOSE

WADT 2008 50Roberto Bruni @ Pisa, Italy 13 June 2008

Content

Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion

WADT 2008 51Roberto Bruni @ Pisa, Italy 13 June 2008

Conclusion

• Operational semantics:– local rewrite rules combined by flexible

synchronizations

• Abstract semantics: – compositional: tile bisimilarity is a congruence

• Advantages w.r.t.– colouring: final configurations are explicit for

stateful connectors– c-automata: structured proofs, concurrent

semantics– graph transformations: uniform framework for

dynamic reconfigurations