720 likes | 735 Views
Explore the use of connectors and tiles to model distributed systems, concurrency, and causal histories effectively. Learn about dynamic connectors, concurrent causal semantics, and their applications in process algebra.
E N D
Dagstuhl Seminar #04241, September 2003 Connectors and Concurrency Roberto Bruni Dipartimento di Informatica Università di Pisa joint work with Ugo Montanari
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):131-176, 2002 CommUnity, Tiles and Connectors
Dagstuhl Seminar #04241, 6-11 June 2004 CommUnity, Tiles and Connectors Roberto Bruni Dipartimento di Informatica Università di Pisa Ongoing Work! joint work with José Luiz Fiadeiro Ivan Lanese Antónia Lopes Ugo Montanari
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
Morphisms Colimit s CommUnity, graphically “Denotational Semantics” Program CommUnity, Tiles and Connectors
actions guards concurrent assignments CommUnity Programs design foo is in x, z out v, n doa: true v:= x+z | n:=v+x [] b: n>MIN n:=n-x []c: v<MAX v:=n+z input/output channels a special actions always present: : true skip CommUnity, Tiles and Connectors
Morphsims output channels cannot be merged P1 channels of P1 to channels of P2 we shall focus on actions coordination (actions names are not important) actions of P2 to actions of P1 actions of P1 correspond to disjoint sets of actions of P2 P2 CommUnity, Tiles and Connectors
Example design P1is in … out … doa … [] b … design P is in … out … dof|a|p … [] f|a|q … [] f|a|r … [] g|a|p … [] g|a|q … [] g|a|r … [] h|b|s … f,g a p,q,r h b s design P2is in … out … dof … [] g … [] h … design P3is in … out … dop … [] q … [] r … [] s … CommUnity, Tiles and Connectors
Star-Shaped Diagrams glue cables no output channels actions are true skip roles 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 sequential composition Configurations output interface input interface (interfaces can be typed) CommUnity, Tiles and Connectors
Configurations output interface input interface parallel composition functoriality sequential composition CommUnity, Tiles and Connectors
Configurations output interface input interface parallel composition functoriality + symmetries = symmetric monoidal cat sequential composition CommUnity, Tiles and Connectors
concurrent computation Observations initial interface final interface CommUnity, Tiles and Connectors
initial configuration trigger effect final configuration Tiles • Combine horizontal and vertical structures through interfaces 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 1 0 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 P • n channel managers • m guard managers • n+m cables • 1 glue CommUnity, Tiles and Connectors
variables needed in assignments input channels actions one action true x:= … for each assignement channel for x output channel Channel Manager one channel manager for each output variable x of P i channel manager for x i i i i i o CommUnity, Tiles and Connectors
variables needed in the guard input channels one action Q skip Guard Manager one guard manager for each action a of P i guard manager for a i i i i i no output channel CommUnity, Tiles and Connectors
all channels of P input channels actions one action true skip for each action of P Glue one glue i i i i i i no output channel CommUnity, Tiles and Connectors
one input channel for each channel of the role input channels actions one action true skip for each action of the role Cables (morphisms are obvious) one cable for each manager i i i i i i no output channel CommUnity, Tiles and Connectors
Scheme of translation state channel fusion channel manager action synchronization through connectors … channel manager guard manager … guard manager CommUnity, Tiles and Connectors
i channel manager for x i channel manager for x i channel manager for x i i i i i i i i i i i i … i i i o o o Tiles for components 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 1 1 1 1 2 2 2 2 3 3 3 3 4 4 CommUnity, Tiles and Connectors
… 001 111 … … 0010 0101 … domain is {input 3, outputs 1,2,3} Abstract semantics • Connectors can be seen as black boxes • input interface • output interface • admissible signals on interfaces • Abstract semantics is just a matrix • n inputs 2n rows • m outputs 2m 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 1 1 1 1 2 2 2 2 3 3 3 3 4 4 CommUnity, Tiles and Connectors
00 01 10 11 00 01 = 10 11 An example: Symmetries connectors boxes are immaterial (also identities should be considered) CommUnity, Tiles and Connectors
= = AND-Connectors CommUnity, Tiles and Connectors
… … AND-Tables andNormal 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 0 1 (as AND-table, but transposed) 00 01 10 11 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
… … … Mixed-AND-Tables andNormal 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