Quantitative Coalgebras for Optimal Synthesis Corina Cˆ ırstea University of Southampton 17 December 2018 SYCO-2 Workshop, Glasgow
Motivation • need for quantitative methods for complex system analysis / design • challenges: • system heterogeneity: multitude of quantitative concerns (probabilistic / resource-aware / non-deterministic behaviour) • devise generic, compositional techniques • systematic use of abstraction 1
Plan of Talk 1. Quantitative systems as coalgebras (joint with I. Hasuo, S. Shimizu) • behaviour as (quantitative) traces, extents • quantitative linear-time logics • verification and synthesis 2. Quantitative components as coalgebras • trace semantics for components • linear-time logics for component-based systems • verification and synthesis: from homogeneous to heterogeneous systems Compositionality at different levels . . . 2
Quantitative Systems as Coalgebras
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � P ω ( A × X ) • labelled transition systems: X 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � D X • Markov Chains : X 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � D ( A × X ) • probabilistic transition systems: X 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � W A × X • weighted transition systems: X 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � W A × X • weighted transition systems: X δ � { 0 , 1 } × X A • determ. automata: X 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � W A × X • weighted transition systems: X δ � { 0 , 1 } × P ( X ) A • nondet. automata: X 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � W A × X • weighted transition systems: X δ � P ( D X ) A • probabilistic automata: X 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � W A × X • weighted transition systems: X δ � P ( D X ) A • probabilistic automata: X • observational indistinguishability as bisimilarity • instantiates to known equivalences 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � W A × X • weighted transition systems: X δ � P ( D X ) A • probabilistic automata: X • observational indistinguishability as bisimilarity • instantiates to known equivalences • abstract behaviours as states in final coalgebra • e.g. determ. automata: { 0 , 1 } A ∗ , behaviour as accepted language 3
Systems as Coalgebras δ � FX • F -coalgebra: X ( F : Set → Set) • provides powerful abstraction: δ � W A × X • weighted transition systems: X δ � P ( D X ) A • probabilistic automata: X • observational indistinguishability as bisimilarity • instantiates to known equivalences • abstract behaviours as states in final coalgebra • e.g. determ. automata: { 0 , 1 } A ∗ , behaviour as accepted language • compositionality (at the level of system types): • logics, their expressiveness, completeness of proof systems • notions of simulation • . . . 3
Quantitative Systems as Coalgebras • partial commutative semiring for quantitities: ( S , + , 0 , • , 1) • Boolean semiring: ( { 0 , 1 } , ∨ , 0 , ∧ , 1) • Probab. semiring: ([0 , 1] , + , 0 , × , 1) • Tropical semiring: ( N ∞ , min , ∞ , + , 0) • natural preorder ⊑ on S induced by +: ≥ on N ∞ • ≤ on { 0 , 1 } , ≤ on [0 , 1], δ � T S FX • (closed) system with quantitative branching: X � • T S X = s i • x i for weighted choices i ∈{ 1 , 2 ,..., n } • F : Set → Set for ”linear” behaviour 4
Systems with Branching and Actions • actions with associated arities: (Λ , ar : Λ → N ) � X ar( λ ) FX = λ ∈ Λ • e.g. finite/infinite words: { a �→ 1 , b �→ 1 , � �→ 0 } FX = X + X + 1 ≃ { a , b } × X + 1 • e.g. finite/infinite labelled binary trees: { a �→ 2 , b �→ 2 , � �→ 0 } FX = X × X + X × X + 1 ≃ { a , b } × X × X + 1 • more complex behaviour: { a �→ 2 , b �→ 1 , � �→ 0 } FX = X × X + X + 1 ≃ { a } × X × X + { b } × X + 1 5
Example: Non-deterministic and Probabilistic Branching a a ( a , 1 3 ) a ( a , 1 ( a , 1 s 1 s 2 3 ) 3 ) s 1 s 2 � � ( b , 1 ( b , 1 3 ) 3 ) b b s 3 s 3 ( b , 1) b LTSs with explicit termination Markov chains • Actions: • Actions: X → { a , b } × X = F ′ X X → { a , b }× X + { � } = FX • Nondet. branching: • Probab. branching: X → D F ′ X X → P FX 6
� � � � Example: Weighted Branching • weights for resource usage: s 2 1 , c 2 , b s 1 1 , d s 3 1 , � • minimise resource usage • must also model resource gain . . . Goals: trace semantics, logics, verification, synthesis • different types of branching, uniformly • systems with several types of branching 7
� ✤ � � � � Maximal Trace Semantics for Branching Systems [C’17] δ � T S FX • X • why maximal traces ? ζ � FZ • domain for maximal traces: final F -coalgebra Z • e.g. Z = { a , b } ∗ ∪ { a , b } ω • maximal trace semantics maps ( x ∈ X , t ∈ Z ) to s ∈ S • obtained as greatest fixpoint of operator: X × Z FX × FZ T S FX × FZ X × Z ✤ E T S � ( δ × ζ ) ∗ ✤ Rel F � S S S S • non-determ./probab. models: realisability/likelihood of each maximal trace • resource-aware models: minimal resources needed for each maximal trace 8
� � � � � � � � Example: Resource-Aware Models d � t 2 � � s 2 t 1 c 1 , c 2 , b s 1 � t 4 t 3 b c 1 , d b s 3 � t 6 t 5 u v 1 , � b c . . . ( s 1 , t 1 ) ( s 1 , t 2 ) ( s 1 , t 3 ) ( s 2 , t 4 ) ( s 1 , u ) ( s 2 , v ) 0 0 0 0 0 0 1 ∞ 2 1 2 1 2 3 3 3 3 . . . 2 ∞ 5 3 ∞ ∞ 9
Modelling Offsetting • move to coalgebras of type S × (T S ◦ F ) • first component models offsetting • e.g. S = ( N ∞ , min , ∞ , + , 0): • weights model resource usage • offsets model resource gains • define � : S × S → S by s � t = inf { u | u • t ⊒ s } . • e.g. S = ( N ∞ , min , ∞ , + , 0): � max( n − m , 0) , if m � = ∞ or n � = ∞ , n � m = ∞ , otherwise . 10
� � � � � � � � Example: Resource-aware Models with Offsetting d � t 2 � � s 2 , 3 t 1 c 1 , c 2 , b � t 4 s 1 t 3 b c 1 , d b � t 6 s 3 t 5 u v 1 , � b c . . . ( s 1 , t 1 ) ( s 1 , t 2 ) ( s 1 , t 3 ) ( s 2 , t 4 ) ( s 1 , u ) ( s 2 , v ) 0 0 0 0 0 0 1 ∞ 2 0 2 0 2 2 0 2 0 . . . 2 ∞ 2 0 2 0 11
� � � � � Generalising Non-Emptiness: Extents δ � S × T S FX X • extent ext : X → S • instantiates to existence/likelihood/minimal resources across all traces • defined as greatest fixpoint . . . • e.g. S = ( N ∞ , min , ∞ , + , 0), F = A × Id: y 1 ; 5 = ν e y + 5 e x 2 , c 0 , d e y = ν min( e x , e y 1 + 2 , e y 2 + 1) 5 , a � y ; 0 x ; 0 e y 1 = ν e y � 5 0 , b = ν e y � 3 e y 2 0 , d 1 , c y 2 ; 3 e x e y e y 1 e y 2 ext 6 1 0 0 12
Dealing with More Complex Structure, Compositionally δ � F 1 T S F 2 T S . . . T S F n X • X or combinations using +/ × ! δ � A × T S ( X × X ) + B × T S (1 + X ) • e.g. X • final F 1 ◦ . . . ◦ F n -coalgebra ( Z , ζ ) gives linear behaviours • trace semantics as g.f.p. of operator on S -valued relations: Rel F 1 ; E T S ; Rel F 2 ; E T S ; . . . E T S ; Rel F n • generalises to coalgebras with offsetting: δ � S × . . . X 13
� � � � � Fixpoint Logics for Quantit. Systems, Compositionally [C’14] δ � F 1 T S F 2 T S . . . T S F n X or combinations using +/ × ! X • system structure drives associated multi-sorted S -valued logic • ⊤ interpreted as extent ! • modal operators induced by linear type F 1 ◦ F 2 ◦ . . . ◦ F n • fixpoint operators, interpreted over ( S , ⊑ ) δ � G T S FX • e.g. X ⇒ modal formulas [ λ ][ λ ′ ] ϕ • modal operators induced by G , F = • semantics of formulas induced by quantitative predicate liftings: X FX T S FX G T S FX X ✤ � λ ′ � � ✤ � λ � � ✤ δ ∗ � ✤ ext � S S S S S • generalises to coalgebras with offsetting . . . Note: step-wise semantics for the logics ! 14
Fixpoint Logics for Quantitative Systems: Example (more later!) δ � S × T S ( { c , d } × X ) • X • modalities derived directly from F : • binary modality ( c , ) ⊔ ( d , ) makes up for absence of ∧ / ∨ • e.g. eventually c : µ x . (( c , ⊤ ) ⊔ ( d , x )) • e.g. infinitely often c : ν x .µ y . (( c , x ) ⊔ ( d , y )) • e.g. S = ( N ∞ , min , ∞ , + , 0): • measures minimal resources required for linear property 15
Recommend
More recommend