generic infinite traces and path based coalgebraic
play

Generic Infinite Traces and Path-Based Coalgebraic Temporal Logics - PowerPoint PPT Presentation

Generic Infinite Traces and Path-Based Coalgebraic Temporal Logics Corina C rstea School of Electronics and Computer Science University of Southampton Overview several known path-based temporal specification logics: CTL* on


  1. Generic Infinite Traces and Path-Based Coalgebraic Temporal Logics Corina Cˆ ırstea School of Electronics and Computer Science University of Southampton

  2. Overview • several known path-based temporal specification logics: • CTL* on transition systems • PCTL on probabilistic transition systems • similarities not sufficiently understood/exploited Goals: • find a unifying pattern (need infinite computation paths) • existing general theory of finite traces [Hasuo et. al.] • existing definition of infinite traces for T = P [Jacobs ’04] • automatically derive new path-based temporal logics

  3. � � � � � Restricted Transition Systems • restricted transition systems are P + -coalgebras ( P + ( S ) = set of non-empty subsets of S ) Example ���� ���� Some computation paths from s 0 : s 2 � � � { try } { fail } � s 0 → s 1 → s 1 . . . ���� ���� � ���� ���� � � � � s 0 s 1 � � s 0 → s 1 → s 2 → s 0 → s 1 → s 2 . . . � � � { succ } ���� ���� � � � s 3 s 0 → s 1 → s 3 → s 3 . . . • to each state, one associates a set of computation paths

  4. � � � � � The Logic CTL* • path formulas: ϕ ::= φ | ¬ ϕ | ϕ ∧ ϕ | X ϕ | F ϕ | G ϕ | ϕ U ϕ • state formulas: φ ::= tt | p | ¬ φ | φ ∧ φ | E ϕ | A ϕ • E and A similar to ♦ and � modalities . . . Example ���� ���� A F ( try U succ ) s 2 � � � { try } { fail } � ���� ���� � ���� ���� � � � � s 0 s 1 � � � � { succ } � � ���� ���� � � s 3

  5. � � � � � Probabilistic Transition Systems • probabilistic transition systems are D -coalgebras ( D ( S ) = set of probability distributions over S ) Example 1 ���� ���� Some computation paths from s 0 : s 2 s 0 → s 1 → s 1 . . . � 0 . 01 � � { try } { fail } � ���� ���� � ���� ���� � � � 1 � s 0 → s 1 → s 2 → s 0 → s 1 → s 2 . . . s 0 s 1 � � � � � { succ } s 0 → s 1 → s 3 → s 3 . . . ���� ���� � � 0 . 98 � 0 . 01 s 3 1 • to each state, one associates a probability measure on the computation paths from that state

  6. � � � � � The Logic PCTL • path formulas: ϕ ::= X φ | φ U ≤ t φ t ∈ { 0 , 1 , . . . } ∪ {∞} • state formulas: φ ::= tt | p | ¬ φ | φ ∧ φ | [ ϕ ] ≥ q | [ ϕ ] > q Example [tt U ≤ 3 fail ] < 0 . 1 ���� ���� 1 s 2 [( try U succ )] ≥ 1 � 0 . 01 � � { try } { fail } � ���� ���� � ���� ���� � � � � 1 s 0 s 1 � � � � { succ } � � ���� ���� � 0 . 98 � 0 . 01 s 3 1

  7. More Examples • (restricted) labelled transition systems (LTSs) are P + ( A × Id)-coalgebras • generative probabilistic transition systems (GPTSs) are D ( A × Id)-coalgebras For both LTSs and GPTSs, computation paths have the form a 0 � s 1 a 1 � s 2 a 2 � . . . s 0 whereas infinite computation traces have the form a 0 a 1 a 2 . . . What LTSs and GPTSs have in common is the inner part of the signature functor: A × Id.

  8. The General Setting Similarly to [Hasuo et. al.], we focus on T ◦ F -coalgebras, where: • strong monad T : C → C describes the computation type e.g. P + , D • functor F : C → C describes the transition type • require final sequence of F to stabilise at ω e.g. Id, A × Id, 1 + A × Id • distributive law λ : F ◦ T ⇒ T ◦ F (compatible with monad structure) is fixed

  9. � � � Towards Infinite Traces • the possible infinite traces for both LTSs and GPTSs are elements of A ω (the final A × -coalgebra): A ω � � � � � � � � � � � � � � � � � � � � � � � � � � � � � . . . 1 A × A A • for an LTS/GPTS ( S , γ ), the actual infinite traces should be structured according to the computation type: tr γ : S → P + ( A ω ) tr γ : S → D ( A ω ) or

  10. � � � � � � Defining the Infinite Trace Map (for LTSs) Fix an LTS γ : S → P + ( A × S ). tr γ P + ( A ω ) S � � � � � � � � � � � � � � � � � � � � � � � � � �������������������������������������� � � � ������������������������� � � � � � ������������ � � γ 2 γ 1 � � � � � � � γ 0 � � � � � � � � � � � � � � � � � . . . P + (1) P + ( A ) P + ( A × A ) Define tr γ : S → P + ( A ω ) from its finite approximants γ i . For existence of tr γ , we need: • γ i ’s define cone • P + ( A ω ) weakly limiting

  11. � � � � � Defining the Approximants (for LTSs) b ���� ���� γ : S → P + ( S ) s 2 a � ���� ���� a � ���� ���� � � � γ ( s 0 ) = { ( a , s 1 ) } � s 0 s 1 � b � γ ( s 1 ) = { ( a , s 2 ) , ( b , s 3 ) , ( c , s 1 ) } � ���� ���� � � s 3 c γ ( s 2 ) = { ( b , s 0 ) } γ ( s 3 ) = { ( c , s 3 ) } c • one application of γ gives γ 1 ( s 1 ) = { a , b , c } • two applications of γ followed by some “flattenning” (use of distributive law) give γ 2 ( s 1 ) = { ab , bc , ca , cb , cc } • . . .

  12. � � � � � � � A Problem . . . and its Solution tr γ P + ( A ω ) S � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � γ 2 γ 1 � � � � � � � γ 0 � � � � � � � � � � � � � � � � � . . . P + (1) P + ( A ) P + ( A × A ) • in general, there are several choices for the infinite trace map . . . • . . . but there is a canonical ( maximal ) one, assuming: • dcpo ⊑ on S → P + ( Z ) • mediating maps form directed set • the trace map can be defined for a general coalgebraic type T ◦ F (subject to reasonable constraints)

  13. � � � � � � � � � � From Infinite Traces to Infinite Executions • view P + ( A × )-coalgebra: as P + ( S × A × ): b s 2 , b ���� ���� ���� ���� s 2 s 2 a s 1 , a � � ���� ���� a � ���� ���� � ���� ���� s 0 , a � ���� ���� � � � � � � � s 0 s 1 s 0 s 1 � b � s 1 , b � � � ���� ���� � ���� ���� � � � � s 3 c s 3 s 1 , c c s 3 , c • obtain an infinite execution map exec γ : S → ( S × A ) ω as the infinite trace map of the new coalgebra !!

  14. “Infinite” Executions: Examples Take T = P + . • F = (restricted TSs): s 0 s 1 s 2 . . . • F = A × (restricted LTSs): s 0 a 1 s 1 a 2 s 2 . . . • F = 1 + A × (LTSs): or s 0 a 1 s 1 a 2 s 2 . . . s 0 a 1 s 1 . . . s n

  15. � � � � � The Case of Probabilistic Systems Example 1 ���� ���� s 2 � 0 . 01 � � { try } { fail } � ���� ���� � ���� ���� � � � 1 � s 0 s 1 � � � � � { succ } ���� ���� � � 0 . 98 � 0 . 01 s 3 1 • working with T = D over sets does not work: • probability measures needed to deal with uncountably many traces ⇒ need to work with T = G (the Giry monad) over measurable spaces • resulting infinite trace map takes states to probability measures over infinite traces

  16. Coalgebra Structure on Infinite Executions Fix a P + ( A × )-coalgebra ( S , γ ). The possible infinite executions have S × ( A × )-coalgebra structure. Hence, one can extract from each infinite execution • the first state, • an A × -observation.

  17. Towards Coalgebraic Path-Based Temporal Logics • coalgebraic types come equipped with modal languages • e.g. for T = P + , the language has modal operators � and ♦ : s ′ | = φ for all s ′ s.t. s → s ′ • s | = � φ iff s ′ | = φ for some s ′ s.t. s → s ′ • s | = ♦ φ iff • e.g. for F = A × , the language has modal operators a and X : • s | = a iff s → ( a , s ′ ) = X φ iff s → ( a , s ′ ) and s ′ | • s | = φ • our coalgebras have type T ◦ F , so we make use of the above . . . . . . but with a non-standard interpretation of � and ♦ !

  18. Path-Based Fixpoint Logics (for TSs) T = P + with monotone � , ♦ F = Id with monotone X tt | ff | p F | φ | ϕ ∧ ϕ | ϕ ∨ ϕ | X ϕ | µ p F .ϕ | ν p F .ϕ ϕ ::= ::= tt | ff | p | φ ∧ φ | φ ∨ φ | � ϕ | ♦ ϕ φ Given T ◦ F -coalgebra ( S , γ ) and suitable valuations (for p F and p ), interpret • path formulas ϕ as sets of paths • use S × F -coalgebra structure on S ω to interpret φ and X ϕ • state formulas φ as sets of states • use infinite execution map exec γ : S → P + ( S ω ) to interpret � ϕ , ♦ ϕ

Recommend


More recommend