Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Probabilistic systemsa place where categories meet probability
Ana Sokolova
SOS group, Radboud University Nijmegen
University Dortmund, CS Kolloquium, 12.6.6 – p.1/32
Outline• Introduction - probabilistic systems and coalgebras
• Bisimilarity - the strong end of the spectrum
• Application - expressiveness hierarchy(older result)
• Trace semantics - the weak end of the spectrum(newer result)
University Dortmund, CS Kolloquium, 12.6.6 – p.2/32
Outline• Introduction - probabilistic systems and coalgebras
• Bisimilarity - the strong end of the spectrum
• Application - expressiveness hierarchy(older result)
• Trace semantics - the weak end of the spectrum(newer result)
University Dortmund, CS Kolloquium, 12.6.6 – p.2/32
Outline• Introduction - probabilistic systems and coalgebras
• Bisimilarity - the strong end of the spectrum
• Application - expressiveness hierarchy(older result)
• Trace semantics - the weak end of the spectrum(newer result)
University Dortmund, CS Kolloquium, 12.6.6 – p.2/32
Outline• Introduction - probabilistic systems and coalgebras
• Bisimilarity - the strong end of the spectrum
• Application - expressiveness hierarchy(older result)
• Trace semantics - the weak end of the spectrum(newer result)
University Dortmund, CS Kolloquium, 12.6.6 – p.2/32
Systemsare formal objects, transition systems (e.g. LTS), that serveas models of real (software, hardware,...) systems
University Dortmund, CS Kolloquium, 12.6.6 – p.3/32
Systemsare formal objects, transition systems (e.g. LTS), that serveas models of real (software, hardware,...) systems
•
• •
•
• •
University Dortmund, CS Kolloquium, 12.6.6 – p.3/32
Systemsare formal objects, transition systems (e.g. LTS), that serveas models of real (software, hardware,...) systems
•
•
a77ppppppppppb
// •
•
awwpppppp
pppp
• •c
oo
c
WW
University Dortmund, CS Kolloquium, 12.6.6 – p.3/32
Probabilistic systemsarise by enriching transition systems with (discrete)probabilities as labels on the transitions.Examples:
University Dortmund, CS Kolloquium, 12.6.6 – p.4/32
Probabilistic systemsarise by enriching transition systems with (discrete)probabilities as labels on the transitions.Examples:
•
¤¤¨̈¨̈¨
¾¾777
77•
13
¤¤ ¤C¤C¤C 2
3
¾¾¾[¾[
¾[
•
²²
• ⇒ •
1²²²O²O
•
• •
University Dortmund, CS Kolloquium, 12.6.6 – p.4/32
Probabilistic systemsarise by enriching transition systems with (discrete)probabilities as labels on the transitions.Examples:
•
¤¤¨̈¨̈¨
¾¾777
77•
a[ 13]
¤¤ ¤C¤C¤C b[ 2
3]
¾¾¾[¾[
¾[
•
²²
• ⇒ •a[1]
²²²O²O
•
• •
University Dortmund, CS Kolloquium, 12.6.6 – p.4/32
Probabilistic systemsarise by enriching transition systems with (discrete)probabilities as labels on the transitions.Examples:
•
¥¥ªªªªªª
½½555
555 ♦
13
¤¤ ¤C¤C¤C 2
3
¾¾¾[¾[
¾[
•
²²
• ⇒ •a
²²
•
• •
University Dortmund, CS Kolloquium, 12.6.6 – p.4/32
Probabilistic systemsarise by enriching transition systems with (discrete)probabilities as labels on the transitions.Examples:
•
¥¥ªªªªªª
½½555
555 •
a
¤¤¨̈¨̈¨
b
½½555
555
•
²²
• ⇒ ♦
1²²²O²O
•
• •
University Dortmund, CS Kolloquium, 12.6.6 – p.4/32
Probabilistic systemsarise by enriching transition systems with (discrete)probabilities as labels on the transitions.Examples:
•
¤¤¨̈¨̈¨
¾¾777
77
•
²²
•
•
⇒ •1
²²²O²O
a
££¦¦¦¦¦¦ b
¿¿999
999
•1
²²²O²O
•
a²²•
University Dortmund, CS Kolloquium, 12.6.6 – p.4/32
Probabilistic systemsarise by enriching transition systems with (discrete)probabilities as labels on the transitions.Examples:
•
¤¤¨̈¨̈¨
¾¾777
77
•
²²
•
•
⇒ •a
²²13
££ £B£B£B 2
3
¿¿¿\¿\
¿\
•b
²²
•
1²²²O²O
•University Dortmund, CS Kolloquium, 12.6.6 – p.4/32
Coalgebrasare an elegant generalization of transition systems with
states + transitions
• based on category theory
• provide a uniform way of treating transition systems
• provide general notions and results e.g. a generic notion ofbisimulation
University Dortmund, CS Kolloquium, 12.6.6 – p.5/32
Coalgebrasare an elegant generalization of transition systems with
states + transitionsas pairs
〈S, α : S → FS〉, for F a functor
• based on category theory
• provide a uniform way of treating transition systems
• provide general notions and results e.g. a generic notion ofbisimulation
University Dortmund, CS Kolloquium, 12.6.6 – p.5/32
Coalgebrasare an elegant generalization of transition systems with
states + transitionsas pairs
〈S, α : S → FS〉, for F a functor
• based on category theory
• provide a uniform way of treating transition systems
• provide general notions and results e.g. a generic notion ofbisimulation
University Dortmund, CS Kolloquium, 12.6.6 – p.5/32
Examples
A TS is a pair 〈S, α : S → PS〉
!! coalgebra of the powerset functor P
University Dortmund, CS Kolloquium, 12.6.6 – p.6/32
Examples
A TS is a pair 〈S, α : S → PS〉
!! coalgebra of the powerset functor P
An LTS is a pair 〈S, α : S → PSA〉
!!! coalgebra of the functor PA
Note: PA ∼= P(A× )
University Dortmund, CS Kolloquium, 12.6.6 – p.6/32
More examplesThanks to the probability distribution functor D
DS = {µ : S → [0, 1], µ[S] = 1}, µ[X] =∑
s∈X µ(x)
Df : DS → DT, Df(µ)(t) = µ[f−1({t})]
the probabilistic systems are also coalgebras
University Dortmund, CS Kolloquium, 12.6.6 – p.7/32
More examplesThanks to the probability distribution functor D
DS = {µ : S → [0, 1], µ[S] = 1}, µ[X] =∑
s∈X µ(x)
Df : DS → DT, Df(µ)(t) = µ[f−1({t})]
the probabilistic systems are also coalgebras ... of functorsbuilt by the following syntax
F ::= | A | P | D | G +H | G ×H | GA | G ◦H
University Dortmund, CS Kolloquium, 12.6.6 – p.7/32
reactive, generative
evolve from LTS - functor P (A× ) ∼= PA
reactive systems:functor (D + 1)A
generative systems:functor (D + 1)(A× ) = D(A× ) + 1
note: in the probabilistic case
(D + 1)A 6∼= D(A× ) + 1
University Dortmund, CS Kolloquium, 12.6.6 – p.8/32
reactive, generative
evolve from LTS - functor P (A× ) ∼= PA
reactive systems:functor (D + 1)A
generative systems:functor (D + 1)(A× ) = D(A× ) + 1
note: in the probabilistic case
(D + 1)A 6∼= D(A× ) + 1
University Dortmund, CS Kolloquium, 12.6.6 – p.8/32
reactive, generative
evolve from LTS - functor P (A× ) ∼= PA
reactive systems:functor (D + 1)A
generative systems:functor (D + 1)(A× ) = D(A× ) + 1
note: in the probabilistic case
(D + 1)A 6∼= D(A× ) + 1
University Dortmund, CS Kolloquium, 12.6.6 – p.8/32
reactive, generative
evolve from LTS - functor P (A× ) ∼= PA
reactive systems:functor (D + 1)A
generative systems:functor (D + 1)(A× ) = D(A× ) + 1
note: in the probabilistic case
(D + 1)A 6∼= D(A× ) + 1
University Dortmund, CS Kolloquium, 12.6.6 – p.8/32
Probabilistic system typesMC D
DLTS ( + 1)A
LTS P(A× ) ∼= PA
React (D + 1)A
Gen D(A× ) + 1
Str D + (A× ) + 1
Alt D + P(A× )
Var D(A× ) + P(A× )
SSeg P(A×D)
Seg PD(A× )
. . . . . .University Dortmund, CS Kolloquium, 12.6.6 – p.9/32
Probabilistic system typesMC D
DLTS ( + 1)A
LTS P(A× ) ∼= PA
React (D + 1)A
Gen D(A× ) + 1
Str D + (A× ) + 1
Alt D + P(A× )
Var D(A× ) + P(A× )
SSeg P(A×D)
Seg PD(A× )
. . . . . .
•
a[ 23]
²O
²²²O
a[ 13]
ÄÄ Ä?Ä?
Ä?Ä?
Ä?b[1]
ÂÂÂ_Â_
Â_Â_
Â_
•
b[1]
²² ²O²O²O²O
• •
a[1]
²² ²O²O²O²O
• •
University Dortmund, CS Kolloquium, 12.6.6 – p.9/32
Probabilistic system typesMC D
DLTS ( + 1)A
LTS P(A× ) ∼= PA
React (D + 1)A
Gen D(A× ) + 1
Str D + (A× ) + 1
Alt D + P(A× )
Var D(A× ) + P(A× )
SSeg P(A×D)
Seg PD(A× )
. . . . . .
•
a[ 14]
²O
²²²O
a[ 12]
ÄÄ Ä?Ä?
Ä?Ä?
Ä?b[ 1
4]
ÂÂÂ_Â_
Â_Â_
Â_
• •
c[1]
²² ²O²O²O²O
•
c[1]
²² ²O²O²O²O
• •
University Dortmund, CS Kolloquium, 12.6.6 – p.9/32
Probabilistic system typesMC D
DLTS ( + 1)A
LTS P(A× ) ∼= PA
React (D + 1)A
Gen D(A× ) + 1
Str D + (A× ) + 1
Alt D + P(A× )
Var D(A× ) + P(A× )
SSeg P(A×D)
Seg PD(A× )
. . . . . .
♦14
¢¢ ¢A¢A¢A¢A 3
4
ÀÀÀ]À]
À]
•
b
²²a
¢¢¤¤¤¤¤¤
♦12
²²²O²O
12
ÁÁÁ^Á^
Á^
• • • •
University Dortmund, CS Kolloquium, 12.6.6 – p.9/32
Probabilistic system typesMC D
DLTS ( + 1)A
LTS P(A× ) ∼= PA
React (D + 1)A
Gen D(A× ) + 1
Str D + (A× ) + 1
Alt D + P(A× )
Var D(A× ) + P(A× )
SSeg P(A×D)
Seg PD(A× )
. . . . . .
•a
ÄÄÄÄÄÄÄÄ
a
²²
b
ÂÂ???
???
14 ²²
²O²O3
4
ÄÄ Ä?Ä?
Ä?1
²²²O²O
13²²
²O²O 2
3
ÂÂÂ_Â_
Â_
• • • • •
University Dortmund, CS Kolloquium, 12.6.6 – p.9/32
Probabilistic system typesMC D
DLTS ( + 1)A
LTS P(A× ) ∼= PA
React (D + 1)A
Gen D(A× ) + 1
Str D + (A× ) + 1
Alt D + P(A× )
Var D(A× ) + P(A× )
SSeg P(A×D)
Seg PD(A× )
. . . . . .
•
ÄÄÄÄÄÄÄÄ
ÂÂ???
???
a[ 14]
ÄÄ Ä?Ä?
Ä?b[ 3
4]
²²²O²O
a[ 13]
²²²O²O a[ 2
3]
ÂÂÂ_Â_
Â_
• • • •
University Dortmund, CS Kolloquium, 12.6.6 – p.9/32
Bisimulation - LTSConsider the LTS
•s0EDGFa
@A//
b²²
•t0
b²²
a // •t2GFED
a
BCoo
b²²
•s1 •t1 •t3
University Dortmund, CS Kolloquium, 12.6.6 – p.10/32
Bisimulation - LTSConsider the LTS
•s0EDGFa
@A//
b²²
•t0
b²²
a // •t2GFED
a
BCoo
b²²
•s1 •t1 •t3
The states s0 and t0 are bisimilar since there is abisimulation R relating them...
University Dortmund, CS Kolloquium, 12.6.6 – p.10/32
Bisimulation - LTSConsider the LTS
•s0EDGFa
@A//
b²²
•t0
b²²
a // •t2GFED
a
BCoo
b²²
•s1 •t1 •t3
Transfer condition: 〈s, t〉 ∈ R =⇒
sa→ s′ ⇒ (∃t′) t
a→ t′, 〈s′, t′〉 ∈ R,
ta→ t′ ⇒ (∃s′) s
a→ s′, 〈s′, t′〉 ∈ R
University Dortmund, CS Kolloquium, 12.6.6 – p.10/32
Bisimulation - generativeConsider the generative systems
•s0EDGF
a[ 12]
@A//
b[ 12]
²²
•t0
b[ 12]
²²
a[ 12]
''•t2GFEDa[ 1
6]
BCoo
a[ 13]
gg
b[ 12]
²²•s1 •t1 •t3
University Dortmund, CS Kolloquium, 12.6.6 – p.11/32
Bisimulation - generativeConsider the generative systems
•s0EDGF
a[ 12]
@A//
b[ 12]
²²
•t0
b[ 12]
²²
a[ 12]
''•t2GFEDa[ 1
6]
BCoo
a[ 13]
gg
b[ 12]
²²•s1 •t1 •t3
The states s0 and t0 are bisimilar, and so are s0 and t2,since there is a bisimulation R relating them...
University Dortmund, CS Kolloquium, 12.6.6 – p.11/32
Bisimulation - generativeConsider the generative systems
•s0EDGF
a[ 12]
@A//
b[ 12]
²²
•t0
b[ 12]
²²
a[ 12]
''•t2GFEDa[ 1
6]
BCoo
a[ 13]
gg
b[ 12]
²²•s1 •t1 •t3
Transfer condition: 〈s, t〉 ∈ R =⇒
s;µ⇒ (∃µ′) t;µ′, µ ≡R,A µ′
University Dortmund, CS Kolloquium, 12.6.6 – p.11/32
Bisimulation - simple SegalaConsider the simple Segala systems
•s0EDGFa
@A//
b²²
•t0
b²²
a //
13
|| _Âe%j*o/t4y9 23 ///o/o/o •t2
GFEDa
BCoo
b²²
•s1 •t1 •t3
University Dortmund, CS Kolloquium, 12.6.6 – p.12/32
Bisimulation - simple SegalaConsider the simple Segala systems
•s0EDGFa
@A//
b²²
•t0
b²²
a //
13
|| _Âe%j*o/t4y9 23 ///o/o/o •t2
GFEDa
BCoo
b²²
•s1 •t1 •t3
The states s0 and t0 are bisimilar, since there is abisimulation R relating them...
University Dortmund, CS Kolloquium, 12.6.6 – p.12/32
Bisimulation - simple SegalaConsider the simple Segala systems
•s0EDGFa
@A//
b²²
•t0
b²²
a //
13
|| _Âe%j*o/t4y9 23 ///o/o/o •t2
GFEDa
BCoo
b²²
•s1 •t1 •t3
Transfer condition: 〈s, t〉 ∈ R =⇒
sa→ µ⇒ (∃µ′) t
a→ µ′, µ ≡R µ′
University Dortmund, CS Kolloquium, 12.6.6 – p.12/32
Coalgebraic bisimulationA bisimulation between
〈S, α : S → FS〉 and 〈T , β : S → FS〉
is R ⊆ S × T such that ∃ γ:
University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
Coalgebraic bisimulationA bisimulation between
〈S, α : S → FS〉 and 〈T , β : S → FS〉
is R ⊆ S × T such that ∃ γ:
S
α
²²
R
γ
²²
π1oo π2 // T
β
²²FS FR
Fπ1
ooFπ2
// FT
University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
Coalgebraic bisimulationA bisimulation between
〈S, α : S → FS〉 and 〈T , β : S → FS〉
is R ⊆ S × T such that ∃ γ:
S
α
²²
R
γ
²²
π1oo π2 // T
β
²²FS FR
Fπ1
ooFπ2
// FT
Transfer condition: 〈s, t〉 ∈ R =⇒
〈α(s), β(t)〉 ∈ Rel(F)(R)
University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
Coalgebraic bisimulationA bisimulation between
〈S, α : S → FS〉 and 〈T , β : S → FS〉
is R ⊆ S × T such that ∃ γ:
S
α
²²
R
γ
²²
π1oo π2 // T
β
²²FS FR
Fπ1
ooFπ2
// FT
Theorem: Coalgebraic and concrete bisimilarity coincide !
University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
Expressiveness
simple Segala system → Segala system
•a
²²p1
ww w7 w7 w7 w7 w7 w7 w7
p2ÄÄ Ä?Ä?
Ä? pn
(((h(h(h(h(h(h(h(h
• • ... •
University Dortmund, CS Kolloquium, 12.6.6 – p.14/32
Expressiveness
simple Segala system → Segala system
•a
²²p1
ww w7 w7 w7 w7 w7 w7 w7
p2ÄÄ Ä?Ä?
Ä? pn
(((h(h(h(h(h(h(h(h
• • ... •
•
²²a[p1]
ww w7 w7 w7 w7 w7 w7 w7
a[p2]ÄÄ Ä?Ä?
Ä? a[pn]
(((h(h(h(h(h(h(h(h
• • ... •
University Dortmund, CS Kolloquium, 12.6.6 – p.14/32
Expressiveness
simple Segala system → Segala system
•a
²²p1
ww w7 w7 w7 w7 w7 w7 w7
p2ÄÄ Ä?Ä?
Ä? pn
(((h(h(h(h(h(h(h(h
• • ... •
•
²²a[p1]
ww w7 w7 w7 w7 w7 w7 w7
a[p2]ÄÄ Ä?Ä?
Ä? a[pn]
(((h(h(h(h(h(h(h(h
• • ... •
When do we consider one type of systems moreexpressive than another?
University Dortmund, CS Kolloquium, 12.6.6 – p.14/32
Comparison criterion
CoalgF → CoalgG
if there is a mapping 〈S, α : S → FS〉T7→ 〈S, α̃ : S → GS〉
that preserves and reflects bisimilarity
University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Comparison criterion
CoalgF → CoalgG
if there is a mapping 〈S, α : S → FS〉T7→ 〈S, α̃ : S → GS〉
that preserves and reflects bisimilarity
s〈S,α〉 ∼ t〈T,β〉 ⇐⇒ sT 〈S,α〉 ∼ tT 〈T,β〉
University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Comparison criterion
CoalgF → CoalgG
if there is a mapping 〈S, α : S → FS〉T7→ 〈S, α̃ : S → GS〉
that preserves and reflects bisimilarity
Theorem: An injective natural transformation F ⇒ G issufficient for CoalgF → CoalgG
University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Comparison criterion
CoalgF → CoalgG
if there is a mapping 〈S, α : S → FS〉T7→ 〈S, α̃ : S → GS〉
that preserves and reflects bisimilarity
Theorem: An injective natural transformation F ⇒ G issufficient for CoalgF → CoalgG
proof via cocongruences - behavioral equivalence
University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Example
Indeed SSeg → Seg since P(A×D)Pτ⇒PD(A× ) is
injective for
(A×D)τ⇒D(A× )
given by τX(〈a, µ〉) = δa × µ, where
µ× µ′(〈x, x′〉) = µ(x) · µ′(x′)
and δa is Dirac distribution for a
University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example
Indeed SSeg → Seg since P(A×D)Pτ⇒PD(A× ) is
injective for
(A×D)τ⇒D(A× )
given by
τX(〈a, µ〉) = δa × µ, where
µ× µ′(〈x, x′〉) = µ(x) · µ′(x′)
and δa is Dirac distribution for a
University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example
Indeed SSeg → Seg since P(A×D)Pτ⇒PD(A× ) is
injective for
(A×D)τ⇒D(A× )
given by τX(〈a, µ〉) = δa × µ, where
µ× µ′(〈x, x′〉) = µ(x) · µ′(x′)
and δa is Dirac distribution for a
University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example
Indeed SSeg → Seg since P(A×D)Pτ⇒PD(A× ) is
injective for
(A×D)τ⇒D(A× )
given by τX(〈a, µ〉) = δa × µ, where
µ× µ′(〈x, x′〉) = µ(x) · µ′(x′)
and δa is Dirac distribution for a
University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example
Indeed SSeg → Seg since P(A×D)Pτ⇒PD(A× ) is
injective for
(A×D)τ⇒D(A× )
given by τX(〈a, µ〉) = δa × µ, where
µ× µ′(〈x, x′〉) = µ(x) · µ′(x′)
and δa is Dirac distribution for a
University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
The hierarchy...
MG
PZ
::ttttt
Seg
::uuuuuBun
ddIIIII
SSeg
99sssssVar
ccHHHHH::vvvvv
Alt
[[6666666666666666
React
88qqqqqqLTS
eeLLLLL::uuuuu
Gen
ddIIIIIStr
OO
DLTS
ggNNNNNN88rrrrr
MC
OO
University Dortmund, CS Kolloquium, 12.6.6 – p.17/32
The hierarchy...
MG
PZ
::ttttt
Seg
::uuuuuBun
ddIIIII
SSeg
99sssssVar
ccHHHHH::vvvvv
Alt
[[6666666666666666
React
88qqqqqqLTS
eeLLLLL::uuuuu
Gen
ddIIIIIStr
OO
DLTS
ggNNNNNN88rrrrr
MC
OO
* Falk Bartels, AS, Erik de VinkUniversity Dortmund, CS Kolloquium, 12.6.6 – p.17/32
LT/BT spectrumBisimilarity is not the only semantics...
University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
LT/BT spectrumAre these non-deterministic systems equal ?
•xa
²²
•ya
¢¢¥¥¥¥ a
ÀÀ:::
:
•b
¡¡££££ c
ÁÁ<<<
< •b ²²
•c
²²• • • •
University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
LT/BT spectrumAre these non-deterministic systems equal ?
•xa
²²
•ya
¢¢¥¥¥¥ a
ÀÀ:::
:
•b
¡¡££££ c
ÁÁ<<<
< •b ²²
•c
²²• • • •
x and y are:
• different wrt. bisimilarity
University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
LT/BT spectrumAre these non-deterministic systems equal ?
•xa
²²
•ya
¢¢¥¥¥¥ a
ÀÀ:::
:
•b
¡¡££££ c
ÁÁ<<<
< •b ²²
•c
²²• • • •
x and y are:
• different wrt. bisimilarity, but
• equivalent wrt. trace semanticstr(x) = tr(y) = {ab, ac}
University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
Traces - LTSFor LTS with explicit termination (NA)
trace = the set of all possiblelinear behaviors
University Dortmund, CS Kolloquium, 12.6.6 – p.19/32
Traces - LTSFor LTS with explicit termination (NA)
trace = the set of all possiblelinear behaviors
Example:
•xEDGFa
@A// a // •y
GFEDb
BCoo
²²X
tr(y) = b∗, tr(x) = a+ · tr(y) = a+ · b∗
University Dortmund, CS Kolloquium, 12.6.6 – p.19/32
Traces - generativeFor generative probabilistic systems with ex. termination
trace =sub-probability distribution overpossible linear behaviors
University Dortmund, CS Kolloquium, 12.6.6 – p.20/32
Traces - generativeFor generative probabilistic systems with ex. termination
trace =sub-probability distribution overpossible linear behaviors
Example:
•x
b[ 13]
²²
a[ 13]
//13
&&LLLLL
LLLLLL
•yGFEDa[ 1
2]
BCoo
12
²²•zBC@A
a[1]
GF // X
tr(x) : 〈〉 7→ 13
a 7→ 13· 1
2
a2 7→ 13· 1
2· 1
2
· · ·University Dortmund, CS Kolloquium, 12.6.6 – p.20/32
Trace of a coalgebra ?
• Power&Turi ’99
• Jacobs ’04
• Hasuo& Jacobs ’05
• Ichiro Hasuo, Bart Jacobs, AS:Generic Trace Theory, CMCS’06
University Dortmund, CS Kolloquium, 12.6.6 – p.21/32
Trace of a coalgebra ?
• Power&Turi ’99
• Jacobs ’04
• Hasuo& Jacobs ’05
• Ichiro Hasuo, Bart Jacobs, AS:Generic Trace Theory, CMCS’06
University Dortmund, CS Kolloquium, 12.6.6 – p.21/32
Trace of a coalgebra ?
• Power&Turi ’99
• Jacobs ’04
• Hasuo& Jacobs ’05
• Ichiro Hasuo, Bart Jacobs, AS:Generic Trace Theory, CMCS’06
main idea: coinduction in a Kleisli category
University Dortmund, CS Kolloquium, 12.6.6 – p.21/32
Coinduction
FXF(beh) //_______ FZ
X
α
OO
beh//_______ Z
∼=
OO
system final coalgebra
University Dortmund, CS Kolloquium, 12.6.6 – p.22/32
Coinduction
FXF(beh) //_______ FZ
X
α
OO
beh//_______ Z
∼=
OO
system final coalgebra
• finality = ∃!(morphism for any F - coalgebra)
• beh gives the behavior of the system
• this yields final coalgebra semantics
University Dortmund, CS Kolloquium, 12.6.6 – p.22/32
Coinduction
FXF(beh) //_______ FZ
X
α
OO
beh//_______ Z
∼=
OO
system final coalgebra
• f.c.s. in Sets = bisimilarity
• f.c.s. in a Kleisli category = trace semantics
University Dortmund, CS Kolloquium, 12.6.6 – p.22/32
Types of systemsFor trace semantics systems are suitably modelled ascoalgebras in Sets
Xc→ T F X
monad - branching type
functor - linear i/o type
needed: distributive law FT ⇒ T F
University Dortmund, CS Kolloquium, 12.6.6 – p.23/32
Types of systemsFor trace semantics systems are suitably modelled ascoalgebras in Sets
Xc→ T F X
monad - branching type
functor - linear i/o type
needed: distributive law FT ⇒ T F
University Dortmund, CS Kolloquium, 12.6.6 – p.23/32
Types of systemsFor trace semantics systems are suitably modelled ascoalgebras in Sets
Xc→ T F X
monad - branching type
functor - linear i/o type
needed: distributive law FT ⇒ T F
University Dortmund, CS Kolloquium, 12.6.6 – p.23/32
Types of systemsFor trace semantics systems are suitably modelled ascoalgebras in Sets
Xc→ T F X
monad - branching type
functor - linear i/o type
needed: distributive law FT ⇒ T F
University Dortmund, CS Kolloquium, 12.6.6 – p.23/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
PFc→ PFPFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
PFc→ PFPFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
PFc→ PFPFX
d.l.→ PPFFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
PFc→ PFPFX
d.l.→ PPFFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
PFc→ PFPFX
d.l.→ PPFFX
m.m.→ PFFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed since branching is irrelevant:
LTS with X- PF = P(1 + A× )
•xa
¤¤¨̈¨̈¨̈¨
a
¿¿888
8888
•a
¥¥©©©©©© b
¾¾666
666 •
b²²
X X X
•x
ab
§§
aa
»»X
Xc→ PFX
PFc→ PFPFX
d.l.→ PPFFX
m.m.→ PFFX
University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
• objects - sets
• arrows - Xf→ Y are functions f : X → T Y
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
FT ⇒ T F : F lifts to F K̀ (T ) on K`(T ).
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
FT ⇒ T F : F lifts to F K̀ (T ) on K`(T ).
Hence: coalgebra Xc→ F K̀ (T )X in K`(T ) !!!
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
FT ⇒ T F : F lifts to F K̀ (T ) on K`(T ).
Hence: coalgebra Xc→ F K̀ (T )X in K`(T ) !!!
in K`(T ) : Xc→ F K̀ (T )X
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
FT ⇒ T F : F lifts to F K̀ (T ) on K`(T ).
Hence: coalgebra Xc→ F K̀ (T )X in K`(T ) !!!
in K`(T ) : Xc→ F K̀ (T )X
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
FT ⇒ T F : F lifts to F K̀ (T ) on K`(T ).
Hence: coalgebra Xc→ F K̀ (T )X in K`(T ) !!!
in K`(T ) : Xc→ F K̀ (T )X
FK̀ (T )c→ F K̀ (T )F K̀ (T )X
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive lawis needed for X
c→ T FX to be a coalgebra in the Kleisli
category K`(T )..
FT ⇒ T F : F lifts to F K̀ (T ) on K`(T ).
Hence: coalgebra Xc→ F K̀ (T )X in K`(T ) !!!
in K`(T ) : Xc→ F K̀ (T )X
FK̀ (T )c→ F K̀ (T )F K̀ (T )X → · · ·
University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Main theorem - tracesIf ♣, then
F K̀ (T )I
ηI◦α ∼=
²²
F K̀ (T )I
I I
ηFI◦α−1 ∼=
OO
is initial is final in K`(T )
University Dortmund, CS Kolloquium, 12.6.6 – p.26/32
Main theorem - tracesIf ♣, then
F K̀ (T )I
ηI◦α ∼=
²²
F K̀ (T )I
I I
ηFI◦α−1 ∼=
OO
is initial is final in K`(T )
[α : FI∼=→ I denotes the initial F-algebra in Sets]
University Dortmund, CS Kolloquium, 12.6.6 – p.26/32
Main theorem - tracesIf ♣, then
F K̀ (T )I
ηI◦α ∼=
²²
F K̀ (T )I
I I
ηFI◦α−1 ∼=
OO
is initial is final in K`(T )
[α : FI∼=→ I denotes the initial F-algebra in Sets]
proof: via limit-colimit coincidence Smyth&Plotkin ’82
University Dortmund, CS Kolloquium, 12.6.6 – p.26/32
The assumptions ♣:• A monad T s.t. K`(T ) is DCpo⊥-enriched
left-strict composition
• A functor F that preserves ω-colimits
• A distributive law FT ⇒ T F : lifting F K̀ (T )
• F K̀ (T ) should be locally monotone
University Dortmund, CS Kolloquium, 12.6.6 – p.27/32
The assumptions ♣:• A monad T s.t. K`(T ) is DCpo⊥-enriched
left-strict composition
• A functor F that preserves ω-colimits
• A distributive law FT ⇒ T F : lifting F K̀ (T )
• F K̀ (T ) should be locally monotone
University Dortmund, CS Kolloquium, 12.6.6 – p.27/32
The assumptions ♣:• A monad T s.t. K`(T ) is DCpo⊥-enriched
left-strict composition
• A functor F that preserves ω-colimits
• A distributive law FT ⇒ T F : lifting F K̀ (T )
• F K̀ (T ) should be locally monotone
University Dortmund, CS Kolloquium, 12.6.6 – p.27/32
The assumptions ♣:• A monad T s.t. K`(T ) is DCpo⊥-enriched
left-strict composition
• A functor F that preserves ω-colimits
• A distributive law FT ⇒ T F : lifting F K̀ (T )
• F K̀ (T ) should be locally monotone
University Dortmund, CS Kolloquium, 12.6.6 – p.27/32
Corollary (♣)
For Xc→ F K̀ (T )X in K`(T )
University Dortmund, CS Kolloquium, 12.6.6 – p.28/32
Corollary (♣)
For Xc→ F K̀ (T )X in K`(T ) ... X
c→ T FX in Sets
University Dortmund, CS Kolloquium, 12.6.6 – p.28/32
Corollary (♣)
For Xc→ F K̀ (T )X in K`(T ) ... X
c→ T FX in Sets
∃! finite trace map trc : X → T I in Sets:
University Dortmund, CS Kolloquium, 12.6.6 – p.28/32
Corollary (♣)
For Xc→ F K̀ (T )X in K`(T ) ... X
c→ T FX in Sets
∃! finite trace map trc : X → T I in Sets:
in K`(T ) F K̀ (T )XF K̀ (T )(trc) //______ F K̀ (T )I
X
c
OO
trc
//__________ I
∼=
OO
University Dortmund, CS Kolloquium, 12.6.6 – p.28/32
It works for...• lift, powerset, sub-distribution monad
• shapely functors - almost all polynomial
• Hence:
* for LTS with explicit termination P(1 + A× )
* for generative systems with explicit terminationD(1 + A× )
Note: Initial 1 + A× - algebra is
A∗[nil,cons]
∼=// 1 + A× A∗
University Dortmund, CS Kolloquium, 12.6.6 – p.29/32
It works for...• lift, powerset, sub-distribution monad
• shapely functors - almost all polynomial
• Hence:
* for LTS with explicit termination P(1 + A× )
* for generative systems with explicit terminationD(1 + A× )
Note: Initial 1 + A× - algebra is
A∗[nil,cons]
∼=// 1 + A× A∗
University Dortmund, CS Kolloquium, 12.6.6 – p.29/32
It works for...• lift, powerset, sub-distribution monad
• shapely functors - almost all polynomial
• Hence:
* for LTS with explicit termination P(1 + A× )
* for generative systems with explicit terminationD(1 + A× )
Note: Initial 1 + A× - algebra is
A∗[nil,cons]
∼=// 1 + A× A∗
University Dortmund, CS Kolloquium, 12.6.6 – p.29/32
It works for...• lift, powerset, sub-distribution monad
• shapely functors - almost all polynomial
• Hence:
* for LTS with explicit termination P(1 + A× )
* for generative systems with explicit terminationD(1 + A× )
Note: Initial 1 + A× - algebra is
A∗[nil,cons]
∼=// 1 + A× A∗
University Dortmund, CS Kolloquium, 12.6.6 – p.29/32
It works for...• lift, powerset, sub-distribution monad
• shapely functors - almost all polynomial
• Hence:
* for LTS with explicit termination P(1 + A× )
* for generative systems with explicit terminationD(1 + A× )
Note: Initial 1 + A× - algebra is
A∗[nil,cons]
∼=// 1 + A× A∗
University Dortmund, CS Kolloquium, 12.6.6 – p.29/32
It works for...• lift, powerset, sub-distribution monad
• shapely functors - almost all polynomial
• Hence:
* for LTS with explicit termination P(1 + A× )
* for generative systems with explicit terminationD(1 + A× )
Note: Initial 1 + A× - algebra is
A∗[nil,cons]
∼=// 1 + A× A∗
University Dortmund, CS Kolloquium, 12.6.6 – p.29/32
Finite traces - LTS with X
the finality diagram in K`(P)
F K̀ (P)XF K̀ (P)(trc) //______ F K̀ (P)A
∗
X
c
OO
trc
//__________ A∗
∼=
OO
University Dortmund, CS Kolloquium, 12.6.6 – p.30/32
Finite traces - LTS with X
the finality diagram in K`(P)
1 + A×X(1+A× )K̀ (P)(trc) //_________ 1 + A× A∗
X
c
OO
trc
//_____________ A∗
∼=
OO
University Dortmund, CS Kolloquium, 12.6.6 – p.30/32
Finite traces - LTS with X
the finality diagram in K`(P)
1 + A×X(1+A× )K̀ (P)(trc) //_________ 1 + A× A∗
X
c
OO
trc
//_____________ A∗
∼=
OO
amounts to
• 〈〉 ∈ trc(x) ⇐⇒ X ∈ c(x)
• a · w ∈ trc(x) ⇐⇒ (∃x′)〈a, x′〉 ∈ c(x), w ∈ trc(x′)
University Dortmund, CS Kolloquium, 12.6.6 – p.30/32
Finite traces - generative X
the finality diagram in K`(D)
F K̀ (D)XF K̀ (D)(trc) //_______ F K̀ (D)A
∗
X
c
OO
trc
//__________ A∗
∼=
OO
University Dortmund, CS Kolloquium, 12.6.6 – p.31/32
Finite traces - generative X
the finality diagram in K`(D)
1 + A×X(1+A× )K̀ (D)(trc) //_________ 1 + A× A∗
X
c
OO
trc
//_____________ A∗
∼=
OO
University Dortmund, CS Kolloquium, 12.6.6 – p.31/32
Finite traces - generative X
the finality diagram in K`(D)
1 + A×X(1+A× )K̀ (D)(trc) //_________ 1 + A× A∗
X
c
OO
trc
//_____________ A∗
∼=
OO
amounts to trc(x) :
• 〈〉 7→ c(x)(X)
• a · w 7→∑
y∈X c(x)(a, y) · c(y)(w)
University Dortmund, CS Kolloquium, 12.6.6 – p.31/32
Conclusions & future work• Coalgebras allow for a unified treatment and expressiveness
study of (P)TS
• Coinduction gives us semantic relations:
* bisimilarity for F-systems in Sets
* trace semantics for T F-systems in K`(T )
• Other monads e.g. PD ? ... suitable monad/order structure yet tobe found (Varacca&Winskel)
• Other semantics ? .. between bisimilarity and trace in thespectrum
University Dortmund, CS Kolloquium, 12.6.6 – p.32/32
Conclusions & future work• Coalgebras allow for a unified treatment and expressiveness
study of (P)TS
• Coinduction gives us semantic relations:
* bisimilarity for F-systems in Sets
* trace semantics for T F-systems in K`(T )
• Other monads e.g. PD ? ... suitable monad/order structure yet tobe found (Varacca&Winskel)
• Other semantics ? .. between bisimilarity and trace in thespectrum
University Dortmund, CS Kolloquium, 12.6.6 – p.32/32
Conclusions & future work• Coalgebras allow for a unified treatment and expressiveness
study of (P)TS
• Coinduction gives us semantic relations:
* bisimilarity for F-systems in Sets
* trace semantics for T F-systems in K`(T )
• Other monads e.g. PD ? ... suitable monad/order structure yet tobe found (Varacca&Winskel)
• Other semantics ? .. between bisimilarity and trace in thespectrum
University Dortmund, CS Kolloquium, 12.6.6 – p.32/32
Conclusions & future work• Coalgebras allow for a unified treatment and expressiveness
study of (P)TS
• Coinduction gives us semantic relations:
* bisimilarity for F-systems in Sets
* trace semantics for T F-systems in K`(T )
• Other monads e.g. PD ? ... suitable monad/order structure yet tobe found (Varacca&Winskel)
• Other semantics ? .. between bisimilarity and trace in thespectrum
University Dortmund, CS Kolloquium, 12.6.6 – p.32/32
Conclusions & future work• Coalgebras allow for a unified treatment and expressiveness
study of (P)TS
• Coinduction gives us semantic relations:
* bisimilarity for F-systems in Sets
* trace semantics for T F-systems in K`(T )
• Other monads e.g. PD ? ... suitable monad/order structure yet tobe found (Varacca&Winskel)
• Other semantics ? .. between bisimilarity and trace in thespectrum
University Dortmund, CS Kolloquium, 12.6.6 – p.32/32
Conclusions & future work• Coalgebras allow for a unified treatment and expressiveness
study of (P)TS
• Coinduction gives us semantic relations:
* bisimilarity for F-systems in Sets
* trace semantics for T F-systems in K`(T )
• Other monads e.g. PD ? ... suitable monad/order structure yet tobe found (Varacca&Winskel)
• Other semantics ? .. between bisimilarity and trace in thespectrum
University Dortmund, CS Kolloquium, 12.6.6 – p.32/32
Conclusions & future work• Coalgebras allow for a unified treatment and expressiveness
study of (P)TS
• Coinduction gives us semantic relations:
* bisimilarity for F-systems in Sets
* trace semantics for T F-systems in K`(T )
• Other monads e.g. PD ? ... suitable monad/order structure yet tobe found (Varacca&Winskel)
• Other semantics ? .. between bisimilarity and trace in thespectrum
University Dortmund, CS Kolloquium, 12.6.6 – p.32/32