categorical categorical theory of state-based systems in sets : bisimilarity in kleisli: trace...
TRANSCRIPT
![Page 1: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/1.jpg)
The Microcosm Principle and Concurrency in Coalgebras
Ichiro Hasuo Kyoto University, Japan PRESTO Promotion Program, Japan
Bart Jacobs Radboud Univ. Nijmegen, NL Technical Univ. Eindhoven, NL
Ana Sokolova Univ. Salzburg, Austria
![Page 2: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/2.jpg)
Categorical theory of state-based systems
1-slide review of coalgebra/coinduction
c a t e g o r i c a l l y
system coalgebra
behavior-preserving
map
morphism of coalgebras
behavior coinduction (via final coalgebra)
in Sets : bisimilarityin Kleisli: trace semantics
[Hasuo,Jacobs,Sokolova LMCS´07]
Theory of coalgebras
![Page 3: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/3.jpg)
is everywhere
computer networks multi-core processors
modular, component-based design of complex systems
is hard to get right
so easy to get into deadlocks exponentially growing complexity
cf. Edward Lee. Making Concurrency Mainstream. Invited talk at CONCUR 2006.
ConcurrencyC || D
running C and D in parallel
![Page 4: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/4.jpg)
Behavior of C || Dis determined by
behavior of C and behavior of D
Compositionalityaids compositional
verification
Conventi onal presentati on
behav iora l equiva lenceo bisimilarityo trace equivalenceo ...
~ „bisimilarity is a congruence“
![Page 5: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/5.jpg)
Final coalgebra semantics as“process semantics”.
“Coalgebraic compositionality”
Compositionality in coalgebra
|| : CoalgF x CoalgF CoalgF o composing coalgebras/systems
|| : Z x Z Z o composing behavior
operation on
NFAs
operation on
regular languages
![Page 6: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/6.jpg)
the microcosm principlewith
o operations binary ||
o equationse.g. assoc. of ||
algebraic theoryX 2 C outer interpretation
inner interpretation
Nested algebraic structures:
![Page 7: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/7.jpg)
We name this principle the microcosm principle, after the theory, common in pre-modern correlative cosmologies, that every feature of the microcosm (e.g. the human soul) corresponds to some feature of the macrocosm.
John Baez & James DolanHigher-Dimensional Algebra III:
n-Categories and the Algebra of OpetopesAdv. Math. 1998
Microcosm in macrocosm
![Page 8: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/8.jpg)
You may have seen it◦ “a monoid is in a monoidal category”
The microcosm principle: you may have seen it
monoid in a monoidal category
inner depends on outer
![Page 9: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/9.jpg)
Formalizing the microcosm principle
What do we mean by “microcosm principle”?
i.e. mathemati cal defi niti on of such nested models?
Answer
algebraic theory as Lawvere theory
outer modelas prod.-pres. functor
inner modelas lax natural trans.
![Page 10: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/10.jpg)
Outline
concurrency/compositionality
mathematics
microcosm for concurrency(|| and ||)
parallel compositionvia sync nat. trans.
2-categorical formulation
generic compositi onality
theorem
for arbitrary algebraic
theory
![Page 11: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/11.jpg)
Parallel composition of coalgebrasvia
syncX,Y : FX FY F(X Y)
Part 1
![Page 12: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/12.jpg)
If the base category C has a tensor
: C x C C and F : C C comes with natural
transformation
syncX,Y : FX FY F(X Y) then we have
: CoalgF x CoalgF CoalgF
Parallel composition of coalgebrasbifunctor CoalgF x CoalgF CoalgF
usually denoted by (tensor)
Theorem : CoalgF x CoalgF CoalgF
: C x C C
liftingF with
sync
![Page 13: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/13.jpg)
Parallel composition via sync
??
??F
X Y
(X Y)
FX FYc d
syncX,Y
on base category
different sync
different
![Page 14: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/14.jpg)
CSP-style (Hoare)
CCS-style (Milner)Assuming
Examples of sync : FX FY F(X Y)
C = Sets, F = Pfin( x _)
F-coalgebra = LTS
x : Sets x Sets Sets
![Page 15: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/15.jpg)
|| “composition of states/behavior” arises by coinduction
Inner composition
![Page 16: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/16.jpg)
C has tensor F has syncX,Y : FX FY F(X Y)there is a final coalgebra Z FZ
Assume
1. by 2. || by
3. by finality yields:
Compositionality theorem
![Page 17: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/17.jpg)
When is
: CoalgF x CoalgF CoalgF
associative? Answer When
◦ : C x C C is associative, and◦sync is “associative”
Equational properties
commutativity?
arbitrary algebraic theory?
![Page 18: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/18.jpg)
2-categorical formulation ofthe microcosm principle
Part 2
for arbitrary algebraic theory
![Page 19: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/19.jpg)
exampleso monoid in
monoidal category
o final coalg. in CoalgF with
o reg. lang. vs. NFAs
Microcosm principle (Baez & Dolan)
What is precisely“microcosm principle”?
i.e. mathemati cal defi niti on of such nested models?
outer model
inner model
![Page 20: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/20.jpg)
Lawvere theory L
A Lawvere theory L is a small category s.t.
o L’s objects are natural numbers o L has finite products
Defi niti on
a category representing an algebraic theory
![Page 21: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/21.jpg)
Lawvere theory
a l g e b ra i c t h e o r y a s c a t e g o r y Loperations as arrows
equations as commuting diagrams
m (binary)e (nullary)
assoc. of munit law
other arrows:o projectionso composed terms
![Page 22: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/22.jpg)
Models for Lawvere theory L
o a set with L-structure L-setStandard: set-theoreti c model
(product-preserving)
binary opr. on X
X 2 C what about nested models?
![Page 23: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/23.jpg)
Outer model: L-category
o a category with L-structure L-categoryouter model
(product-preserving)
NB. our focus is on strict alg. structures
![Page 24: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/24.jpg)
Given an L-category C,
an L-object X in it is a lax natural transformationcompatible with products.
Inner model: L-object
Defi niti on
components lax naturality
X: carrier obj.
inner alg. str. by
mediati ng 2-cells
![Page 25: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/25.jpg)
C: L-category F: C C, lax L-functor CoalgF is an L-category
lax L-functor?
lax natur. trans.
lax naturality?
...
Factslax L-functor = F with sync
Generalizes
C: L-category Z 2 C , final object
Z is an L-object
Generalizes
![Page 26: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/26.jpg)
Assume
1. CoalgF is an L-category
2. Z FZ is an L-object
3. the behavior functor
is a (strict) L-functor
Generic compositionality theorem C is an L-category F : C C is a lax L-functor there is a final coalgebra Z FZ
by coinduction
subsumes
![Page 27: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/27.jpg)
Equational properties
associative : CoalgF x CoalgF CoalgF
associative
: C x C C
lifting
F with “associative“ sync
![Page 28: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/28.jpg)
equations are built-in in L◦ as
how about „assoc“ of sync?
◦ automaticvia “coherence condition“
Equational properties, generally
L-structure on CoalgF
L-structure on C
lifting
F : lax L-functor
=
![Page 29: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/29.jpg)
Related to the study of bialgebraic structures [Turi-Plotkin, Bartels, Klin, …] ◦Algebraic structures on coalgebras
In the current work:◦Equations, not only operations, are also an integral
part◦Algebraic structures are nested, higher-
dimensional
Related work: bialgebras
![Page 30: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/30.jpg)
“Pseudo” algebraic structures◦ monoidal category (cf. strictly monoidal category)◦ equations hold up-to-isomorphism◦ L CAT, product-preserving pseudo-functor?
Microcosm principle for full GSOS
Future work
bialgebra microcosm
Σ B B Σ current work
Σ (B x id) B TΣ (for full GSOS)
??
![Page 31: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/31.jpg)
Conclusion
concurrency/compositionality
mathematics
microcosm for concurrency(|| and ||)
parallel compositionvia sync nat. trans.
2-categorical formulation
generic compositi onality
theorem
for arbitrary algebraic
theory
Thanks for your attention!Ichiro Hasuo (Kyoto, Japan)http://www.cs.ru.nl/~ichiro
![Page 32: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/32.jpg)
Microcosm principle : same algebraic structure◦on a category C and◦on an object X 2 C
2-categorical formulation:
Concurrency in coalgebras as a CS example
Conclusion
Thank you for your attention!Ichiro Hasuo, Kyoto U., Japanhttp://www.cs.ru.nl/~ichiro
algebraic theory outer model
inner model
![Page 33: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/33.jpg)
Take F = Pfin ( £ _) in Sets.
System as coalgebra:
Behavior by coinduction:
◦ in Sets: bisimilarity◦ in certain Kleisli categories: trace equivalence
[Hasuo,Jacobs,Sokolova,CMCS’06]
Behavior by coinduction: example
the set of finitely branching edges labeled with infinite-depthtrees,
such as
xprocess
graph of x
![Page 34: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/34.jpg)
Note:Asynchronous/interleaving compositions don’t fit in this framework◦ such as ◦ We have to use, instead of F,
the cofree comonad on F
Examples of sync : FX FY F(X Y)
![Page 35: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/35.jpg)
Presentation of an algebraic theory as a category: ◦ objects: 0, 1, 2, 3, … “arities”◦ arrows: “terms (in a context)”
◦ commuting diagrams are understood as “equations”
~ unit law ~ assoc. law
◦ arises from (single-sorted) algebraic specification (, E) as the syntactic category FP-sketch
Lawvere theory
projections
operation
composed term
![Page 36: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/36.jpg)
In a coalgebraic study of concurrency,
Nested algebraic structures ◦ on a category C and◦ on an object X 2 C arise naturally (microcosm principle)
Our contributions:◦ Syntactic formalization of microcosm principle◦ 2-categorical formalization with Lawvere theories◦ Application to coalgebras:
generic compositionality theorem
Outline
![Page 37: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/37.jpg)
A Lawvere theory L is for ◦ operations, and ◦ equations (e.g. associativity, commutativity)
CoalgF is an L-category Parallel composition is automatically associative (for example)◦ Ultimately, this is due to the coherence condition on the lax
L-functor F
Possible application : Study of syntactic formats that ensure associativity/commutativity (future work)
Generic soundness result
![Page 38: Categorical Categorical theory of state-based systems in Sets : bisimilarity in Kleisli: trace semantics [Hasuo,Jacobs,Sokolova LMCS´07] in Sets : bisimilarity](https://reader038.vdocument.in/reader038/viewer/2022110102/56649f395503460f94c56142/html5/thumbnails/38.jpg)
Microcosm principle for concurrency (|| and ||)
“Parallel composition via sync nat. trans” compositionality theorem
The microcosm principle 2-categorically
Back to concurrency
Part 1 for arbitrary algebraic theory Generic compositionality theorem