Title: Connectors and Concurrency
1Connectors and Concurrency
Dagstuhl Seminar 04241, September 2003
Roberto Bruni Dipartimento di Informatica
Università di Pisa
joint work with Ugo Montanari
2Connectors 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
3CommUnity, Tiles and Connectors
Dagstuhl Seminar 04241, 6-11 June 2004
Roberto Bruni Dipartimento di Informatica
Università di Pisa
Ongoing Work!
joint work with José Luiz Fiadeiro Ivan
Lanese Antónia Lopes Ugo Montanari
4Roadmap
- Motivation
- Background
- CommUnity
- Tiles
- From CommUnity to Tiles
- Connectors
- Concluding remarks
5Roadmap
- Motivation
- Background
- CommUnity
- Tiles
- From CommUnity to Tiles
- Connectors
- Concluding remarks
6Motivation 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
7Motivation 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
8Motivation 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
9Roadmap
- Motivation
- Background
- CommUnity
- Tiles
- From CommUnity to Tiles
- Connectors
- Concluding remarks
10CommUnity
- Prototype architectural description language
- conceptual distinction between
- computation
- coordination
- (in communicating distributed systems)
- System configurations as diagrams
- Components compute locally
- Interactions as architectural connectors
11CommUnity, graphically
Denotational Semantics
Program
12CommUnity Programs
design foo is in x, z out v, n do a true ?
v xz nvx b ngtMIN ? nn-x c
vltMAX ? vnz
input/output channels
a special actions always present ? true ? skip
13Morphsims
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
14Example
design P1 is in out do a b
design P is in out do fap faq
far gap gaq gar
hbs
f,g ? a ? p,q,r h ? b ? s
design P2 is in out do f g h
design P3 is in out do p q r
s
15Star-Shaped Diagrams
glue
cables no output channels actions are true? skip
roles
16Tile Model
- Operational and Abstract Semantics of Open
Concurrent Systems - Compositional in Space and Time
- Specification Formats
- Depend on chosen connectors
- Congruence results
- Category based
17Configurations
output interface
input interface
(interfaces can be typed)
18Configurations
output interface
input interface
parallel composition
functoriality
sequential composition
19Configurations
output interface
input interface
parallel composition
functoriality symmetries symmetric monoidal
cat
sequential composition
20Observations
initial interface
final interface
21Tiles
- Combine horizontal and vertical structures
through interfaces
22Tiles
- Compose tiles
- horizontally
23Tiles
- Compose tiles
- horizontally
- (also vertically and in parallel)
symmetric monoidal double cat
24Operational 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)
25Roadmap
- Motivation
- Background
- CommUnity
- Tiles
- From CommUnity to Tiles
- Connectors
- Concluding remarks
26Notation
- 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
27From 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
28Results
- 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
29Why 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
30Standard Decomposition Illustrated
- n output channels
- m actions
P
- n channel managers
- m guard managers
- nm cables
- 1 glue
31Channel Manager
one channel manager for each output variable x of
P
channel manager for x
i
i
i
i
i
i
o
32Guard Manager
one guard manager for each action a of P
guard manager for a
i
i
i
i
i
i
no output channel
33Glue
one glue
i
i
i
i
i
i
no output channel
34Cables (morphisms are obvious)
one cable for each manager
i
i
i
i
i
i
no output channel
35Scheme of translation
channel manager
action synchronization through connectors
channel fusion
state
channel manager
guard manager
guard manager
36Tiles for components
actions of managers are mutually exclusive,
but at least one action (e.g. ?) must be executed
37Roadmap
- Motivation
- Background
- CommUnity
- Tiles
- From CommUnity to Tiles
- Connectors
- Concluding remarks
38Connectors
- 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
39Abstract 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
40Abstract 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
41An example Symmetries
connectors boxes are immaterial
(also identities should be considered)
42AND-Connectors
43AND-Tables andNormal Form
- n m 0 or 0 lt 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
44co-AND-Connectors
1
0
(as AND-table, but transposed)
?
00
01
10
?
11
45Mixed-AND-Connectors
46Mixed-AND-Connectors
47Mixed-AND-Connectors
48Mixed-AND-Connectors
49Mixed-AND-Connectors
50Mixed-AND-Tables andNormal Form
- n m 0 or 0 lt 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
51(co-)HIDE-Connectors
!
!
.
?
0
?
1
52 A Relevant Difference
!
?
!
!
53A Sample Proof
!
!
54SYNC-Tables and Normal Form
- n m 0 or 0 lt 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
55(co-)MEX-Connectors
56Mixed-MEX-Connectors
?
57Mixed-MEX-Connectors
?
58Mixed-MEX-Connectors
?
?
59Mixed-MEX-Connectors
?
?
60Mixed-MEX-Connectors
?
?
61(co-)ZERO-Connectors
62Some Axioms About ZERO
0
63A Sample Proof
0
0
64Some Axioms About MEX-AND
65Key Axioms
?
66Key Axioms
!
67An Axiom Scheme
!
!
!
!
68An Axiom Scheme
!
!
!
!
69FULL-Tables and Normal Form
- n m 0 or 0 lt 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
70(co-)ONE-Connector
1
- All tables can now be defined, but
- negation is introduced
- and inconsistent connectors with it!
- ONE is not needed for CommUnity
71Roadmap
- Motivation
- Background
- CommUnity
- Tiles
- From CommUnity to Tiles
- Connectors
- Concluding remarks
72Concluding 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)