Roberto Pisa, Italy 13 June 2008 WADT Tiles for Reo Roberto Bruni Dipartimento di Informatica Università di Pisa WADT th International Workshop on Algebraic Development Techniques Farhad Arbab (CWI) Dave Clarke (CWI) Ivan Lanese (Bologna) Ugo Montanari (Pisa)
Roberto Pisa, Italy 13 June 2008 WADT Content Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion
Roberto Pisa, Italy 13 June 2008 WADT Introduction Reo is an exogenous coordination language based on a calculus of connector composition – 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
Roberto Pisa, Italy 13 June 2008 WADT Content Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion
Roberto Pisa, Italy 13 June 2008 WADT Tiling as a Domino Game
Roberto Pisa, Italy 13 June 2008 WADT 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
Roberto Pisa, Italy 13 June 2008 WADT parallel composition Configurations input interface output interface sequential composition (interfaces can be typed)
Roberto Pisa, Italy 13 June 2008 WADT Configurations input interface output interface parallel composition sequential composition functoriality
Roberto Pisa, Italy 13 June 2008 WADT Configurations input interface output interface parallel composition sequential composition functoriality + symmetries = symmetric monoidal cat
Roberto Pisa, Italy 13 June 2008 WADT Observations initial interface final interface concurrent computation
Roberto Pisa, Italy 13 June 2008 WADT Tiles Combine horizontal and vertical structures through interfaces initial configuration final configuration trigger effect
Roberto Pisa, Italy 13 June 2008 WADT Tiles Compose tiles –horizontally
Roberto Pisa, Italy 13 June 2008 WADT Tiles Compose tiles –horizontally –(also vertically and in parallel) symmetric monoidal double cat
Roberto Pisa, Italy 13 June 2008 WADT 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
Roberto Pisa, Italy 13 June 2008 WADT Content Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion
Roberto Pisa, Italy 13 June 2008 WADT 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
Roberto Pisa, Italy 13 June 2008 WADT 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
Roberto Pisa, Italy 13 June 2008 WADT 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
Roberto Pisa, Italy 13 June 2008 WADT Replicators and Mergers Mixed nodes as pumping stations: merger+replicator
Roberto Pisa, Italy 13 June 2008 WADT Colouring Tables SyncLossySyncSyncDrain
Roberto Pisa, Italy 13 June 2008 WADT Exclusive Router A B C D E FG sAsA sCsC sDsD sFsF sGsG ls C ls D sd synchronous channel lossy synchronous channel synchronous drain
Roberto Pisa, Italy 13 June 2008 WADT Content Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion
Roberto Pisa, Italy 13 June 2008 WADT Tiles Ingredients Node machinery: –typed interfaces –node constructors (stateless) Stateless connectors Stateful connectors Observations –write, take –not-allowed
Roberto Pisa, Italy 13 June 2008 WADT Reo (Mixed) Node
Roberto Pisa, Italy 13 June 2008 WADT Merger
Roberto Pisa, Italy 13 June 2008 WADT Replicator
Roberto Pisa, Italy 13 June 2008 WADT Example: a mixed node A Syntactic sugar A
Roberto Pisa, Italy 13 June 2008 WADT Sync Channel
Roberto Pisa, Italy 13 June 2008 WADT Lossy Sync
Roberto Pisa, Italy 13 June 2008 WADT Sync Drain
Roberto Pisa, Italy 13 June 2008 WADT Sync Spout
Roberto Pisa, Italy 13 June 2008 WADT Example: Exclusive Router A B C E F sAsA ls C sDsD sCsC sd sFsF D G ls D sGsG A B C D E FG sAsA sCsC sDsD sFsF sGsG ls C ls D sd
Roberto Pisa, Italy 13 June 2008 WADT Tiling the Example
Roberto Pisa, Italy 13 June 2008 WADT Tiling the Example
Roberto Pisa, Italy 13 June 2008 WADT Tiling the Example
Roberto Pisa, Italy 13 June 2008 WADT Some Obvious Equivalences
Roberto Pisa, Italy 13 June 2008 WADT Some Obvious Equivalences...
Roberto Pisa, Italy 13 June 2008 WADT 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
Roberto Pisa, Italy 13 June 2008 WADT Empty Async FIFO 1 [ ] [ d ] [ ] d
Roberto Pisa, Italy 13 June 2008 WADT Full Async FIFO 1 [ d ] [ ] [ d ] d
Roberto Pisa, Italy 13 June 2008 WADT Towards Async FIFO 2 [ ] many FIFO 1 introduce delays depending on their number d [d] [ ] [d] [ ] d
Roberto Pisa, Italy 13 June 2008 WADT Empty Sync FIFO 1 { } { d } { } d d d
Roberto Pisa, Italy 13 June 2008 WADT Full Sync FIFO 1 { } { d } { } { d } { d 1 } { d 2 } d2d2 d1d1 d
Roberto Pisa, Italy 13 June 2008 WADT Async FIFO 2 and FIFO k { } [ ] d { } [d] { } [ ] d { } [ ] { }...
Roberto Pisa, Italy 13 June 2008 WADT Async FIFO ∞ ( ] ( d ] d ( ] ( d ] d
Roberto Pisa, Italy 13 June 2008 WADT Derived Operators: PAR _|_
Roberto Pisa, Italy 13 June 2008 WADT Derived Operators: SEQ _::_
Roberto Pisa, Italy 13 June 2008 WADT Derived Operators: PLUG(x) x
Roberto Pisa, Italy 13 June 2008 WADT Derived Operators: CLOSE
Roberto Pisa, Italy 13 June 2008 WADT Content Introduction Tiles basics Reo basics Tile semantics of Reo Conclusion
Roberto Pisa, Italy 13 June 2008 WADT 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