Connectors and Concurrency joint work with Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, September 2003
CommUnity, Tiles and Connectors Connectors and Concurrency Connectors modeling various kind of distributed systems and causal histories Tile Logic combining the use of connectors in space and time Connectors + Tiles = Dynamic Connectors Concurrent Causal Semantics Case study: Basic process algebra for which tile bisimilarity coincides with causal weak bisimilarity of Darondeau & Degano Dynamic connectors for concurrency, TCS 281(1-2): , 2002
CommUnity, Tiles and Connectors joint work with José Luiz Fiadeiro Ivan Lanese Antónia Lopes Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, 6-11 June 2004 Ongoing Work!
CommUnity, Tiles and Connectors Roadmap Motivation Background CommUnity Tiles From CommUnity to Tiles Connectors Concluding remarks
CommUnity, Tiles and Connectors Roadmap Motivation Background CommUnity Tiles From CommUnity to Tiles Connectors Concluding remarks
CommUnity, Tiles and Connectors Motivation I Categorical Approach objects are system components (architectural elements) morphisms express simulation, refinement, … complex systems are modeled as diagrams composition via universal construction (colimit) suited for systems with shared resources memory, action, channels
CommUnity, Tiles and Connectors Motivation II Categorical Approach Algebraic Approach initial algebra where constants are basic processes operations compose smaller processes into larger ones structural axioms collapse structurally equivalent processes operational semantics (SOS style) abstract semantics (bisimilarity) suited for message passing calculi communication encoded in the labels of the LTS
CommUnity, Tiles and Connectors Motivation III Categorical Approach Algebraic Approach Reconcile two selected representatives CommUnity categorical approach applied to program design Tile Model co-existence of horizontal (space) and vertical (time) dimensions Advantages transfer of concepts and techniques
CommUnity, Tiles and Connectors Roadmap Motivation Background CommUnity Tiles From CommUnity to Tiles Connectors Concluding remarks
CommUnity, Tiles and Connectors CommUnity Prototype architectural description language conceptual distinction between computation coordination (in communicating distributed systems) System configurations as diagrams Components compute locally Interactions as architectural connectors
CommUnity, Tiles and Connectors CommUnity, graphically Program Colimit Morphisms Denotational Semantics s
CommUnity, Tiles and Connectors CommUnity Programs design foo is in x, z out v, n do a: true v:= x+z | n:=v+x [] b: n>MIN n:=n-x [] c: v<MAX v:=n+z input/output channels actionsguardsconcurrent assignments a special actions always present: : true skip
CommUnity, Tiles and Connectors Morphsims channels of P 1 to channels of P 2 actions of P 2 to actions of P 1 P1P1 P2P2 actions of P 1 correspond to disjoint sets of actions of P 2 output channels cannot be merged (actions names are not important) we shall focus on actions coordination
CommUnity, Tiles and Connectors Example design P 1 is in … out … do a … [] b … design P 2 is in … out … do f … [] g … [] h … design P 3 is in … out … do p … [] q … [] r … [] s … f,g a p,q,r h b s design P is in … out … do f|a|p … [] f|a|q … [] f|a|r … [] g|a|p … [] g|a|q … [] g|a|r … [] h|b|s …
CommUnity, Tiles and Connectors Star-Shaped Diagrams roles cables no output channels actions are true skip glue
CommUnity, Tiles and Connectors Tile Model Operational and Abstract Semantics of Open Concurrent Systems Compositional in Space and Time Specification Formats Depend on chosen connectors Congruence results Category based
CommUnity, Tiles and Connectors parallel composition Configurations input interface output interface sequential composition (interfaces can be typed)
CommUnity, Tiles and Connectors Configurations input interface output interface parallel composition sequential composition functoriality
CommUnity, Tiles and Connectors Configurations input interface output interface parallel composition sequential composition functoriality + symmetries = symmetric monoidal cat
CommUnity, Tiles and Connectors Observations initial interface final interface concurrent computation
CommUnity, Tiles and Connectors Tiles Combine horizontal and vertical structures through interfaces initial configuration final configuration trigger effect
CommUnity, Tiles and Connectors Tiles Compose tiles horizontally
CommUnity, Tiles and Connectors Tiles Compose tiles horizontally (also vertically and in parallel) symmetric monoidal double cat
CommUnity, Tiles and Connectors Operational and Abstract Semantics Structural equivalence Axioms on configurations (e.g. symmetries) LTS states = configurations transitions = tiles labels = (trigger,effect) pairs Abstract semantics tile bisimilarity (congruence results for suitable formats)
CommUnity, Tiles and Connectors Roadmap Motivation Background CommUnity Tiles From CommUnity to Tiles Connectors Concluding remarks
CommUnity, Tiles and Connectors Notation Since: Initial and Final configuration are always equal We shall consider only two kinds of observations We use a flat notation for tiles 10
CommUnity, Tiles and Connectors From CommUnity to Tiles Aim: To define the operational and abstract semantics of CommUnity diagrams by translating them to tiles First step Standard decomposition of programs and diagrams identify basic building blocks make the translation easier Second step From standard diagrams to tiles basic programs to basic boxes cables, glues and morphisms modeled as connectors
CommUnity, Tiles and Connectors Results The translation of a diagram is tile bisimilar to the translation of its colimit [IFIP-TCS 2004] Corollary: Diagrams with the same colimit are mapped to tile bisimilar configurations Colimit axiomatization [Ongoing Work!] add suitable axioms for connectors axioms bisimulate existence of normal forms … hopefully! the translation of a diagram is equal up-to-axioms to the translation of its colimit
CommUnity, Tiles and Connectors Why Standard Decomposition Decomposition is part of the translation The translation becomes easier It is necessary to achieve Colimit Axiomatization in the colimit, conditional assignments are synchronized according to the diagram the axiomatization of connectors cannot change the number of computational entities decomposition is necessary to guarantee that the number of computational entities in the diagram is the same as the number of computational entities in the colimit
CommUnity, Tiles and Connectors Standard Decomposition Illustrated n output channels m actions n channel managers m guard managers n+m cables 1 glue P
CommUnity, Tiles and Connectors Channel Manager channel manager for x i i i i i i o one channel manager for each output variable x of P actions one action true x:= … for each assignement input channels variables needed in assignments output channel channel for x
CommUnity, Tiles and Connectors Guard Manager guard manager for a i i i i i i no output channel one guard manager for each action a of P one action Q skip input channels variables needed in the guard
CommUnity, Tiles and Connectors Glue i i i i i i no output channel input channels all channels of P actions one action true skip for each action of P one glue
CommUnity, Tiles and Connectors Cables (morphisms are obvious) one cable for each manager i i i i i i no output channel input channels one input channel for each channel of the role actions one action true skip for each action of the role
CommUnity, Tiles and Connectors Scheme of translation channel manager guard manager … … action synchronization through connectors channel fusion state
CommUnity, Tiles and Connectors Tiles for components channel manager for x i i i i i i o channel manager for x i i i i i i o channel manager for x i i i i i i o … actions of managers are mutually exclusive, but at least one action (e.g. ) must be executed
CommUnity, Tiles and Connectors Roadmap Motivation Background CommUnity Tiles From CommUnity to Tiles Connectors Concluding remarks
CommUnity, Tiles and Connectors Connectors Connectors are used to model diagram morphisms, cables and glues they express constraints on local choices Connectors with the same abstract semantics should be identified different ways of modeling the same constraint How? Axioms + reduction to normal form
CommUnity, Tiles and Connectors Abstract semantics Connectors can be seen as black boxes input interface output interface admissible signals on interfaces
CommUnity, Tiles and Connectors Connectors can be seen as black boxes input interface output interface admissible signals on interfaces Abstract semantics is just a matrix n inputs 2 n rows m outputs 2 m columns (not all matrix are interesting) sequential composition is matrix multiplication parallel composition is matrix expansion cells are filled with empty/id copies of matrices … … …111001… Abstract semantics domain is {input 3, outputs 1,2,3}
CommUnity, Tiles and Connectors An example: Symmetries (also identities should be considered) = connectors boxes are immaterial
CommUnity, Tiles and Connectors AND-Connectors = =
CommUnity, Tiles and Connectors AND-Tables and Normal Form n = m = 0 or 0 < n m entry with empty domain is enabled only one entry with empty input/outputs entries are closed under (domains) union intersection difference complementation at most one entry enabled for every row/column exactly one entry for every row ……
CommUnity, Tiles and Connectors co-AND-Connectors = = (as AND-table, but transposed)
CommUnity, Tiles and Connectors Mixed-AND-Connectors = =
CommUnity, Tiles and Connectors Mixed-AND-Connectors = =
CommUnity, Tiles and Connectors Mixed-AND-Connectors = = =
CommUnity, Tiles and Connectors Mixed-AND-Connectors = = =
CommUnity, Tiles and Connectors Mixed-AND-Connectors = = =
CommUnity, Tiles and Connectors n = m = 0 or 0 < n,m entry with empty domain is enabled only one entry with empty input/outputs entries are closed under (domains) union intersection difference complementation at most one entry enabled for every row/column exactly one entry for every row Mixed-AND-Tables and Normal Form … ……
CommUnity, Tiles and Connectors (co-)HIDE-Connectors ! ! ! ! = ! = !! = !!.
CommUnity, Tiles and Connectors A Relevant Difference ! ! ! ! ! !
CommUnity, Tiles and Connectors A Sample Proof ! ! ! !! ===
CommUnity, Tiles and Connectors SYNC-Tables and Normal Form n = m = 0 or 0 < n,m entry with empty domain is enabled only one entry with empty input/outputs entries are closed under (domains) union intersection difference complementation at most one entry enabled for every row/column exactly one entry for every row ! ! …… … …
CommUnity, Tiles and Connectors (co-)MEX-Connectors = =
CommUnity, Tiles and Connectors Mixed-MEX-Connectors =
CommUnity, Tiles and Connectors Mixed-MEX-Connectors =
CommUnity, Tiles and Connectors Mixed-MEX-Connectors =
CommUnity, Tiles and Connectors Mixed-MEX-Connectors =
CommUnity, Tiles and Connectors Mixed-MEX-Connectors =
CommUnity, Tiles and Connectors (co-)ZERO-Connectors = = x = ! 0 def. 10 0
CommUnity, Tiles and Connectors Some Axioms About ZERO = 0 0 == 0 0 = 0 0 = 0 !0 !0 =.= 0
CommUnity, Tiles and Connectors A Sample Proof 00 = ! 0 = ! 0 0 =. ! = 0
CommUnity, Tiles and Connectors Some Axioms About MEX-AND = =
CommUnity, Tiles and Connectors Key Axioms
CommUnity, Tiles and Connectors Key Axioms = ! ! = ! ! !
CommUnity, Tiles and Connectors An Axiom Scheme ! ! ! ! ……
CommUnity, Tiles and Connectors An Axiom Scheme !! ! ! ……
CommUnity, Tiles and Connectors n = m = 0 or 0 < n,m entry with empty domain is enabled only one entry with empty input/outputs entries are closed under (domains) union intersection difference complementation at most one entry enabled for every row/column exactly one entry for every row FULL-Tables and Normal Form ! … … … … ! … … … !
CommUnity, Tiles and Connectors (co-)ONE-Connector All tables can now be defined, but negation is introduced… … and inconsistent connectors with it! ONE is not needed for CommUnity ! 1 = def
CommUnity, Tiles and Connectors Roadmap Motivation Background CommUnity Tiles From CommUnity to Tiles Connectors Concluding remarks
CommUnity, Tiles and Connectors Concluding Remarks We have learned that reconciling the categorical and algebraic approach is not an easy task… We got some insights on further extensions more labels, weights Related to constraint solving flownomials (Cazanescu, Stefanescu), bicategories of relations (Carboni, Walters), gs-monoidal cats (Corradini, Gadducci), sharing graphs (Hasegawa), action structures and named calculi (Milner, Gardner)