� � � � � Bisimulation - LTS Consider the LTS a a �� �� �� �� ���� � • t 2 a • s 0 • t 0 b b b • s 1 • t 1 • t 3 University Dortmund, CS Kolloquium, 12.6.6 – p.10/32
� � � � � Bisimulation - LTS Consider the LTS a a �� �� �� �� ���� � • t 2 a • s 0 • t 0 b b b • s 1 • t 1 • t 3 The states s 0 and t 0 are bisimilar since there is a bisimulation R relating them... University Dortmund, CS Kolloquium, 12.6.6 – p.10/32
� � � � � Bisimulation - LTS Consider the LTS a a �� �� �� �� ���� � • t 2 a • s 0 • t 0 b b b • s 1 • t 1 • t 3 Transfer condition: � s, t � ∈ R = ⇒ → s ′ ⇒ ( ∃ t ′ ) t a a → t ′ , � s ′ , t ′ � ∈ R, s → t ′ ⇒ ( ∃ s ′ ) s a a → s ′ , � s ′ , t ′ � ∈ R t University Dortmund, CS Kolloquium, 12.6.6 – p.10/32
� � � � � � Bisimulation - generative Consider the generative systems a [ 1 a [ 1 2 ] 6 ] a [ 1 2 ] �� �� �� ���� �� � • t 2 • s 0 • t 0 b [ 1 b [ 1 b [ 1 a [ 1 2 ] 2 ] 2 ] 3 ] • s 1 • t 1 • t 3 University Dortmund, CS Kolloquium, 12.6.6 – p.11/32
� � � � � � Bisimulation - generative Consider the generative systems a [ 1 a [ 1 2 ] 6 ] a [ 1 2 ] �� �� �� ���� �� � • t 2 • s 0 • t 0 b [ 1 b [ 1 b [ 1 a [ 1 2 ] 2 ] 2 ] 3 ] • s 1 • t 1 • t 3 The states s 0 and t 0 are bisimilar, and so are s 0 and t 2 , since there is a bisimulation R relating them... University Dortmund, CS Kolloquium, 12.6.6 – p.11/32
� � � � � � Bisimulation - generative Consider the generative systems a [ 1 a [ 1 2 ] 6 ] a [ 1 2 ] �� �� �� ���� �� � • t 2 • s 0 • t 0 b [ 1 b [ 1 b [ 1 a [ 1 2 ] 2 ] 2 ] 3 ] • s 1 • t 1 • t 3 Transfer condition: � s, t � ∈ R = ⇒ s ❀ µ ⇒ ( ∃ µ ′ ) t ❀ µ ′ , µ ≡ R,A µ ′ University Dortmund, CS Kolloquium, 12.6.6 – p.11/32
� � � � � � � � � � � � � � � � Bisimulation - simple Segala Consider the simple Segala systems a a �� 1 �� �� �� ���� 3 2 a 3 � • s 0 • t 0 • t 2 b b b • s 1 • t 1 • t 3 University Dortmund, CS Kolloquium, 12.6.6 – p.12/32
� � � � � � � � � � � � � � � � Bisimulation - simple Segala Consider the simple Segala systems a a �� 1 �� �� �� ���� 3 2 a 3 � • s 0 • t 0 • t 2 b b b • s 1 • t 1 • t 3 The states s 0 and t 0 are bisimilar, since there is a bisimulation R relating them... University Dortmund, CS Kolloquium, 12.6.6 – p.12/32
� � � � � � � � � � � � � � � � Bisimulation - simple Segala Consider the simple Segala systems a a �� 1 �� �� �� ���� 3 2 a 3 � • s 0 • t 0 • t 2 b b b • s 1 • t 1 • t 3 Transfer condition: � s, t � ∈ R = ⇒ a a s → µ ⇒ ( ∃ µ ′ ) t → µ ′ , µ ≡ R µ ′ University Dortmund, CS Kolloquium, 12.6.6 – p.12/32
Coalgebraic bisimulation A bisimulation between � S, α : S → F S � and � T, β : S → F S � is R ⊆ S × T such that ∃ γ : University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
� � � � � Coalgebraic bisimulation A bisimulation between � S, α : S → F S � and � T, β : S → F S � is R ⊆ S × T such that ∃ γ : π 1 π 2 � T S R γ α β � F T F S F R F π 1 F π 2 University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
� � � � � Coalgebraic bisimulation A bisimulation between � S, α : S → F S � and � T, β : S → F S � is R ⊆ S × T such that ∃ γ : π 1 π 2 � T S R γ α β � F T F S F R F π 1 F π 2 Transfer condition: � s, t � ∈ R = ⇒ � α ( s ) , β ( t ) � ∈ Rel( F )( R ) University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
� � � � � Coalgebraic bisimulation A bisimulation between � S, α : S → F S � and � T, β : S → F S � is R ⊆ S × T such that ∃ γ : π 1 π 2 � T S R γ α β � F T F S F R F π 1 F π 2 Theorem: Coalgebraic and concrete bisimilarity coincide ! University Dortmund, CS Kolloquium, 12.6.6 – p.13/32
� � � � � � � � � � Expressiveness simple Segala system → Segala system • a � � � � � � � � p 1 p n � � � � p 2 ... • • • University Dortmund, CS Kolloquium, 12.6.6 – p.14/32
� � � � � � � � � � � � � � � � � � � � Expressiveness simple Segala system → Segala system • • a � � � � � � � � � � � � � � � � a [ p 1 ] a [ p n ] p 1 p n � � � � � � � � p 2 a [ p 2 ] ... ... • • • • • • University Dortmund, CS Kolloquium, 12.6.6 – p.14/32
� � � � � � � � � � � � � � � � � � � � Expressiveness simple Segala system → Segala system • • a � � � � � � � � � � � � � � � � a [ p 1 ] a [ p n ] p 1 p n � � � � � � � � p 2 a [ p 2 ] ... ... • • • • • • When do we consider one type of systems more expressive than another? University Dortmund, CS Kolloquium, 12.6.6 – p.14/32
Comparison criterion Coalg F → Coalg G T if there is a mapping � S, α : S → F S � �→ � S, ˜ α : S → G S � that preserves and reflects bisimilarity University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Comparison criterion Coalg F → Coalg G T if there is a mapping � S, α : S → F S � �→ � S, ˜ α : S → G S � that preserves and reflects bisimilarity s � S,α � ∼ t � T,β � ⇐ ⇒ s T � S,α � ∼ t T � T,β � University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Comparison criterion Coalg F → Coalg G T if there is a mapping � S, α : S → F S � �→ � S, ˜ α : S → G S � that preserves and reflects bisimilarity Theorem: An injective natural transformation F ⇒ G is sufficient for Coalg F → Coalg G University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Comparison criterion Coalg F → Coalg G T if there is a mapping � S, α : S → F S � �→ � S, ˜ α : S → G S � that preserves and reflects bisimilarity Theorem: An injective natural transformation F ⇒ G is sufficient for Coalg F → Coalg G proof via cocongruences - behavioral equivalence University Dortmund, CS Kolloquium, 12.6.6 – p.15/32
Example P τ Indeed SSeg → Seg since P ( A × D ) ⇒ PD ( A × ) is injective for University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example P τ Indeed SSeg → Seg since P ( A × D ) ⇒ PD ( A × ) is injective for τ ( A × D ) ⇒ D ( A × ) given by University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example P τ Indeed SSeg → Seg since P ( A × D ) ⇒ PD ( A × ) is injective for τ ( A × D ) ⇒ D ( A × ) given by τ X ( � a, µ � ) = δ a × µ , where University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example P τ Indeed SSeg → Seg since P ( A × D ) ⇒ PD ( A × ) is injective for τ ( A × D ) ⇒ D ( A × ) given by τ X ( � a, µ � ) = δ a × µ , where µ × µ ′ ( � x, x ′ � ) = µ ( x ) · µ ′ ( x ′ ) University Dortmund, CS Kolloquium, 12.6.6 – p.16/32
Example P τ Indeed SSeg → Seg since P ( A × D ) ⇒ 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 � ����� � � � � � Seg Bun � � � � � � � � � � � � � � � � SSeg Var Alt � ����� � ����� � � � � � � � � � � � React LTS Gen Str � ������ � � � � � DLTS MC University Dortmund, CS Kolloquium, 12.6.6 – p.17/32
� � � � � � � � � The hierarchy... MG � ���������������� � � � � � PZ � ����� � � � � � Seg Bun � � � � � � � � � � � � � � � � SSeg Var Alt � ����� � ����� � � � � � � � � � � � React LTS Gen Str � ������ � � � � � DLTS MC * Falk Bartels, AS, Erik de Vink University Dortmund, CS Kolloquium, 12.6.6 – p.17/32
LT/BT spectrum Bisimilarity is not the only semantics... University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
� � � LT/BT spectrum Are these non-deterministic systems equal ? • y • x � a a � � ���� a � � � • • • � b c � ���� � � c b � � • • • • University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
� � � LT/BT spectrum Are these non-deterministic systems equal ? • y • x � a a � � ���� a � � � • • • � b c � ���� � � c b � � • • • • x and y are: • different wrt. bisimilarity University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
� � � LT/BT spectrum Are these non-deterministic systems equal ? • y • x � a a � � ���� a � � � • • • � b c � ���� � � c b � � • • • • x and y are: • different wrt. bisimilarity, but • equivalent wrt. trace semantics tr( x ) = tr( y ) = { ab, ac } University Dortmund, CS Kolloquium, 12.6.6 – p.18/32
Traces - LTS For LTS with explicit termination (NA) trace = the set of all possible linear behaviors University Dortmund, CS Kolloquium, 12.6.6 – p.19/32
� � � Traces - LTS For LTS with explicit termination (NA) trace = the set of all possible linear behaviors Example: a b �� �� �� �� ���� a � • y • x � tr( x ) = a + · tr( y ) = a + · b ∗ tr( y ) = b ∗ , University Dortmund, CS Kolloquium, 12.6.6 – p.19/32
Traces - generative For generative probabilistic systems with ex. termination trace = sub-probability distribution over possible linear behaviors University Dortmund, CS Kolloquium, 12.6.6 – p.20/32
� � � � � � Traces - generative For generative probabilistic systems with ex. termination trace = sub-probability distribution over possible linear behaviors Example: a [ 1 2 ] ���� �� a [ 1 3 ] • y �� �→ 1 • x tr( x ) : � 3 � 1 � � � 3 b [ 1 1 � 3 ] � � 2 � a �→ 1 3 · 1 � � 2 • z � �� �� �� a 2 �→ 1 3 · 1 2 · 1 2 a [1] · · · University Dortmund, CS Kolloquium, 12.6.6 – p.20/32
Trace of a coalgebra ? 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 F (beh) F X F Z � � � � � � � ∼ α = X � � � � � � � Z beh system final coalgebra University Dortmund, CS Kolloquium, 12.6.6 – p.22/32
� � � � Coinduction F (beh) F X F Z � � � � � � � ∼ α = X � � � � � � � Z beh 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 F (beh) F X F Z � � � � � � � ∼ α = X � � � � � � � Z beh 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 systems For trace semantics systems are suitably modelled as coalgebras in Sets c → T F X X University Dortmund, CS Kolloquium, 12.6.6 – p.23/32
Types of systems For trace semantics systems are suitably modelled as coalgebras in Sets c → T F X X monad - branching type University Dortmund, CS Kolloquium, 12.6.6 – p.23/32
Types of systems For trace semantics systems are suitably modelled as coalgebras in Sets c → T F X X monad - branching type functor - linear i/o type University Dortmund, CS Kolloquium, 12.6.6 – p.23/32
Types of systems For trace semantics systems are suitably modelled as coalgebras in Sets c → T F X 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 law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x � � � ������� � a a � � � � • • � � ������ � � a b � b � � � � � University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � c → PF X X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � c → PF X X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � PF c c → PF X → PFPF X X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � PF c c → PF X → PFPF X X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � c PF c d.l. X → PF X → PFPF X → PPFF X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � c PF c d.l. X → PF X → PFPF X → PPFF X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � c PF c d.l. m.m. X → PF X → PFPF X → PPFF X → PFF X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
� � � � � Distributive law is needed since branching is irrelevant: LTS with � - PF = P (1 + A × ) • x • x � � � ������� � a a � � � � • • aa ab � � ������ � � a b � b � � � � � � c PF c d.l. m.m. X → PF X → PFPF X → PPFF X → PFF X University Dortmund, CS Kolloquium, 12.6.6 – p.24/32
Distributive law c is needed for X → T F X to be a coalgebra in the Kleisli category K ℓ ( T ) .. University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive law c is needed for X → T F X to be a coalgebra in the Kleisli category K ℓ ( T ) .. • objects - sets f • arrows - X → Y are functions f : X → T Y University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive law c is needed for X → T F X 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 law c is needed for X → T F X to be a coalgebra in the Kleisli category K ℓ ( T ) .. FT ⇒ T F : F lifts to F K ℓ ( T ) on K ℓ ( T ) . c Hence: coalgebra X → F K ℓ ( T ) X in K ℓ ( T ) !!! University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive law c is needed for X → T F X to be a coalgebra in the Kleisli category K ℓ ( T ) .. FT ⇒ T F : F lifts to F K ℓ ( T ) on K ℓ ( T ) . c Hence: coalgebra X → F K ℓ ( T ) X in K ℓ ( T ) !!! c in K ℓ ( T ) : → F K X ℓ ( T ) X University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive law c is needed for X → T F X to be a coalgebra in the Kleisli category K ℓ ( T ) .. FT ⇒ T F : F lifts to F K ℓ ( T ) on K ℓ ( T ) . c Hence: coalgebra X → F K ℓ ( T ) X in K ℓ ( T ) !!! c in K ℓ ( T ) : → F K X ℓ ( T ) X University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive law c is needed for X → T F X to be a coalgebra in the Kleisli category K ℓ ( T ) .. FT ⇒ T F : F lifts to F K ℓ ( T ) on K ℓ ( T ) . c Hence: coalgebra X → F K ℓ ( T ) X in K ℓ ( T ) !!! F K ℓ ( T ) c c in K ℓ ( T ) : → F K → F K ℓ ( T ) F K X ℓ ( T ) X ℓ ( T ) X University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
Distributive law c is needed for X → T F X to be a coalgebra in the Kleisli category K ℓ ( T ) .. FT ⇒ T F : F lifts to F K ℓ ( T ) on K ℓ ( T ) . c Hence: coalgebra X → F K ℓ ( T ) X in K ℓ ( T ) !!! F K ℓ ( T ) c c in K ℓ ( T ) : → F K → F K ℓ ( T ) F K ℓ ( T ) X → · · · X ℓ ( T ) X University Dortmund, CS Kolloquium, 12.6.6 – p.25/32
� � Main theorem - traces If ♣ , then F K ℓ ( T ) I F K ℓ ( T ) I η I ◦ α ∼ ∼ η F I ◦ α − 1 = = I I is initial is final in K ℓ ( T ) University Dortmund, CS Kolloquium, 12.6.6 – p.26/32
� � Main theorem - traces If ♣ , then F K ℓ ( T ) I F K ℓ ( T ) I η I ◦ α ∼ ∼ η F I ◦ α − 1 = = I I is initial is final in K ℓ ( T ) ∼ = [ α : F I → I denotes the initial F -algebra in Sets ] University Dortmund, CS Kolloquium, 12.6.6 – p.26/32
� � Main theorem - traces If ♣ , then F K ℓ ( T ) I F K ℓ ( T ) I η I ◦ α ∼ ∼ η F I ◦ α − 1 = = I I is initial is final in K ℓ ( T ) ∼ = [ α : F I → 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 University Dortmund, CS Kolloquium, 12.6.6 – p.27/32
Recommend
More recommend