Canonical Coalgebraic Linear Time Logics Corina Cˆ ırstea University of Southampton, UK CALCO 2015, Nijmegen
Previous Work • coalgebraic linear time logics (CLTLs) [FOSSACS 2014] • coalgebras C → T FC • monad T captures branching (nondet./probab./weighted) • formulas (in L ) specify properties of F -behaviours • quantitative semantics C × L → T1 • measures extent (existence/likelihood/minimal cost) of ”paths” conforming to F -property • step-wise semantics (unlike standard path-based logics) • hidden branching modality derived canonically from T • linear time modalities derived (canonically) from polynomial F • expectation is that the step-wise semantics agrees with a path-based semantics yet to be defined . . .
� Motivating Examples (1) • for T = P , canonical choice ( ♦ ) for branching modality yields x | = ϕ iff ” ∃ maximal trace from x satisfying ϕ ” • addition of propositional operators not straightforward: For the P (1 + A × Id)-coalgebra: � ∗ x 2 b a � x 1 x 0 c � ∗ � x 3 x 0 should not satisfy [ a ][ b ] ∗ ∧ [ a ][ c ] ∗ , but the obvious step-wise semantics yields the opposite! Question 1: Which propositional operators can be safely added?
� � � Motivating Examples (2) • non-canonical choice ( � ) for resolving branching doesn’t always work: For the P (1 + A × Id × Id)-coalgebra: � ∗ � b x 1 x 3 � ∗ � a � x 2 x 0 x 4 • x 0 �| = [ a ]( ∗ , ∗ ) under the step-wise semantics • no maximal traces from x 0 (as no maximal traces from x 2 ) • hence a path-based semantics would give x 0 | = [ a ]( ∗ , ∗ ) Question 2: under what assumptions does the step-wise semantics coincide with a path-based semantics?
Main Contributions • enhance CLTLs with canonical propositional operators • path-based semantics for uniform modal fragment of CLTLs • isolate condition under which path-based semantics is equivalent to step-wise semantics Main findings: • for a canonical choice of linear time modalities, the canonical choice of branching modality is crucial for the above equivalence • other choices of both linear and branching modalities possible, but further assumptions on their interaction is needed
Technical Assumptions • T is commutative and partially additive [CJ 2013, FICS 2013] • yields partial commutative semiring (T1 , + , 0 , • , η 1 ( ∗ )), with induced preorder ⊑ • η 1 ( ∗ ) is top for ⊑ • ⊑ is a partial order with limits of increasing and decreasing chains • some examples: • T = P : ( {⊥ , ⊤} , ∨ , ⊥ , ∧ , ⊤ ) with ≤ • T = S : ([0 , 1] , + , 0 , ∗ , 1) with ≤ • T = T W , T W X = W X with W = ( N ∞ , min , ∞ , + , 0): W with ≥ Note: finitary , partially additive monads are essentially weighted monads • T X ≃ T S X = S X with ( S , + , 0 , • , 1) a partial commutative semiring
Coalgebraic Linear Time Logics (Recap) λ ∈ Λ Id ar( λ ) F : Set → Set polynomial, F = � • modal language L V induced by variables in V and modal operators λ ∈ Λ • predicate liftings � λ � X : (T1) X × . . . × (T1) X → (T1) FX defined using • • extension predicate lifting ext X : (T1) X → (T1) T X given by T p � T 2 1 p µ 1 � T1 � T1 �→ T X X • lifting ( σ τ ) X : (T1) X → (T1) T X induced by τ : T 2 1 → T1 also possible • semantics for γ : C → T FC and V : V → (T1) C : • � x � V γ = V ( x ), • � [ λ ]( ϕ 1 , . . . , ϕ n ) � V γ = γ ∗ (ext FX ( � λ � X ( � ϕ 1 � V γ , . . . , � ϕ n � V γ )))
Examples • F = 1 + A × Id × Id, p 1 , p 2 ∈ (T1) X , f ∈ FX : � 1 if f = ι 1 ( ∗ ) � ∗ � ( f ) = 0 otherwise � p 1 ( x ) • p 2 ( y ) if f = ι 2 ( a , y , z ) � a � ( p 1 , p 2 )( f ) = 0 otherwise • T ∈ {P , S , T ( N ∞ , min , ∞ , + , 0) } = ⇒ • ∈ {∧ , ∗ , + } • ext X : (T1) X → (T1) T X given by: • T = P : ext X ( p )( Y ) = � y ∈ Y p ( y ) • T = S : ext X ( p )( � p i x i ) = + i ( p i ∗ p ( x i )) i • T = T ( N ∞ , min , ∞ , + , 0) : ext X ( p )( � w i x i ) = min i ( w i + p ( x i )) i • T ∈ {P , S , T ( N ∞ , min , ∞ , + , 0) } = ⇒ existence/probability/minimal cost of a maximal trace satisfying F -property
� � � � � � � Coalgebraic Linear Time Logics via Dual Adjunctions S Set op Set S = P = (T1) ⊥ L T F P λ ∈ Λ Id ar( λ ) • syntax: L := F = � • δ : LP ⇒ P T F defined modularly from: • δ F : LP ⇒ PF (defined using � λ � ) • δ T : Id P ⇒ P T (defined using ext) L � � γ � LPX • semantics by freeness of L V : L ( L V ) δ X α P T FX P γ � � γ � PX L V V � PX V
� � � � � � � � � Lifting the Logics to Alg(T) ˜ L T F ˜ S � Set op Alg(T) ˜ P Free U S Set op Set ⊥ L T F P • ˜ ˜ S = (T1 , µ 1 ) , P = (T1) • ˜ L := Free LU • ˜ δ F := δ ♯ F : ˜ L ˜ P = Free LU ˜ P = Free LP ⇒ ˜ PF • ˜ δ T : Id ˜ P ⇒ ˜ P T given by δ : Id P ⇒ P T L Free( V ) ∈ Alg(T) • yields ˜
Lifting the Logics to Alg(T) (Examples) • T = P = ⇒ (infinitary) disjunctions • ”next” modality: � ϕ ::= � λ ∈ Λ [ λ ]( ϕ, . . . , ϕ ) • ν x . � x – existence of a maximal trace • µ x . � x – existence of a finite trace • T = S = ⇒ sub-convex combinations • F = 1 + A × Id: µ x . ( 1 2 · ∗ + 1 4 · [ a ] x ) – weighted likelihood of a . . . a ∗ (shorter traces weighing more) • T = T ( N ∞ , min , ∞ , + , 0) = ⇒ linear combinations • F = 1 + A × Id: µ x . (1 · ∗ + 2 · [ a ] x ) – weighted minimal cost of a . . . a ∗ (penalty for longer traces) Note: • fixpoints added to L V in the standard way; see paper for alternative characterisation L Free( V ) ∈ Alg(T) (see paper) • extends to ˜
The Uniform Fragments u L V and u ˜ L Free( V ) Id j i L := F = � i ∈ I V - set of variables • u L V := � n ∈ ω L n V • L n V can be interpreted over ”paths of depth n ” ! • u L V = L V when V = ∅ , or when all j i ∈ { 0 , 1 } L Free( V ) defined similarly • u ˜ • examples (for T = P ): • [ λ 1 ][ λ 2 ] X ∨ [ λ 1 ][ λ 3 ] Y ∨ [ λ 0 ] is uniform • [ λ 1 ] X ∨ [ λ 1 ][ λ 0 ] and [ λ 1 ] X ∨ [ λ 1 ][ λ 1 ] Y are not uniform
� Path-Based Semantics for the Uniform Fragment • canonical distributive law λ : F T ⇒ T F defined using double strength of T • use λ to define γ n : X → T F n X from γ : X → T FX • path-based semantics for u L V : L n V � L n PX P γ n � PX δ δ σ � . . . � PF n X � P T F n X L n V Note single application of σ ! • step-wise semantics for u L V equivalent to: L n V L n V � L n PX σ F � . . . σ F � P (T F ) n X δ � L n − 1 PFX δ � PF (T F ) n − 1 X P γ n PX
� � � Equivalence of the Path-Based and Step-Wise Semantics • Main theorem. The path-based and step-wise semantics for u L V coincide (assuming canonical choices for the branching and linear-time modalities). • Key lemma. Branching ( σ ) and linear-time ( δ ) modalities commute: δ T � PF T L σ � LP T LP δ � P λ σ F � P T F PF Proof idea. The following commutes when τ = µ 1 : τ × τ T 2 1 × T 2 1 T1 × T1 dst T1 , T1 � • T • � T 2 1 τ � T1 T(T1 × T1) (Similar results hold for u ˜ L Free( V ) .)
� � � Examples: (Non-)Canonical Branching Modalities • T = P , τ ::= τ ♦ = µ 1 : T 2 1 → T1 (existential semantics): Theorem = ⇒ coincidence of step-wise and path-based semantics • T = P , τ := τ � : T 2 1 → T1 (universal semantics): • previous diagram does not commute ! • path-based semantics not equivalent to step-wise semantics ! • problem caused by modalities of arity ≥ 2 • e.g. F = 1 + A × Id × Id: � b � ∗ x 1 x 3 � a � x 2 � ∗ x 0 x 4 x 0 | = [ a ]( ∗ , ∗ ) under the path-based semantics (no paths of length 2!) x 0 �| = [ a ]( ∗ , ∗ ) under the step-wise semantics
� � A Generalisation • Theorem. Let T ′ be a commutative submonad of T such that ι T1 × ι T1 � T 2 1 × T 2 1 τ × τ T ′ T1 × T ′ T1 T1 × T1 dst ′ dst T1 , T1 � • T1 , T1 � � T(T1 × T1) T • � T 2 1 τ � T1 T ′ (T1 × T1) ι T1 × T1 commutes. The path-based and step-wise semantics for u L V coincide on coalgebras γ : X → T ′ FX . • Example: T ′ = P + and τ = τ �
Examples: Non-Canonical Linear Time Modalities • Main theorem generalises to other choices of branching and linear-time modalities (subject to Lemma). • for F = 1 + A × Id, define modalities [ ∗ ⊔ A ] and [ ∗ ⊔ a ]: � ∗ ⊔ A � ( p )( ι 1 ( ∗ )) = 1 � ∗ ⊔ A � ( p )( ι 2 ( a , x )) = p ( x ) � if a ′ = a p ( x ) � ∗ ⊔ a � ( p )( ι 2 ( a ′ , x )) = � ∗ ⊔ a � ( p )( ι 1 ( ∗ )) = 1 0 otherwse • T ∈ {P , S , T ( N ∞ , min , ∞ , + , 0) } : • ν x . ([ ∗ ⊔ A ] x ) – existence/likelihood/minimal cost of maximal trace • replacing ν by µ – existence/likelihood/minimal cost of finite trace • µ x . [ ∗ ⊔ a ] x – existence/likelihood/minimal cost of a . . . a ∗ • ν x .µ y . ([ a ] x ⊔ [ a ] y ) – existence/likelihood/minimal cost of infinitely many a s
Recommend
More recommend