A Nivat Theorem for Weighted Timed Automata and Weighted Relative Distance Logic Manfred Droste and Vitaly Perevoshchikov Leipzig University ICALP, Track B 9 th of July 2014
Timed automata 1 Nondeterministic finite automata A with clocks a , x ≥ 2, y ← 0 Edges: a ❀ ✣❀ Λ → ❵ ′ ∶ � � � ❵ 1 2 a ∈ Σ is a letter x ≤ 4 b , y ≥ 1 , x ← 0 ✣ is a clock constraint Λ is a set of clocks to be reset. 1 Alur, Dill ’92
Timed automata 1 Nondeterministic finite automata A with clocks a , x ≥ 2, y ← 0 Edges: a ❀ ✣❀ Λ → ❵ ′ ∶ � � � ❵ 1 2 a ∈ Σ is a letter x ≤ 4 b , y ≥ 1 , x ← 0 ✣ is a clock constraint Λ is a set of clocks to be reset. Run ✚ 2 ✿ 1 a 1 ✿ 1 ( 1 ❀ x = 0 delay ( 1 ❀ x = 2 ✿ 1 switch ( 2 ❀ x = 2 ✿ 1 delay ( 2 ❀ x = 3 ✿ 2 y = 0 ) � � � → y = 2 ✿ 1 ) � � � → y = 0 ) � � � → y = 1 ✿ 1 ) b switch ( 1 ❀ x = 0 � � � → y = 1 ✿ 1 ) Label ( ✚ ) ∶ = ( a ❀ 2 ✿ 1 )( b ❀ 1 ✿ 1 ) ∈ ( Σ × R ≥ 0 ) + = ∶ T Σ + is a timed word 1 Alur, Dill ’92
Timed automata 1 Nondeterministic finite automata A with clocks a , x ≥ 2, y ← 0 Edges: a ❀ ✣❀ Λ → ❵ ′ ∶ � � � ❵ 1 2 a ∈ Σ is a letter x ≤ 4 b , y ≥ 1 , x ← 0 ✣ is a clock constraint Λ is a set of clocks to be reset. Run ✚ t 1 e 1 t 2 e 2 t n e n ( ❵ 0 ❀✗ 0 ) � → � → ( ❵ 1 ❀✗ 1 ) � → � → ✿✿✿ � → � → ( ❵ n ❀✗ n ) 1 Alur, Dill ’92
Weighted Timed Automata (WTA) 12 A Both edges and locations carry a , x ≥ 2, y ← 0 weights (costs): 5 6 3 discrete : costs of edges (for 1 2 switches) 2 continuous : cost rates of x ≤ 4 locations (for delays) b , y ≥ 1 , x ← 0 Run ✚ t 1 e 1 t 2 e 2 t n e n ( ❵ 0 ❀✗ 0 ) � → � → ( ❵ 1 ❀✗ 1 ) � → � → ✿✿✿ � → � → ( ❵ n ❀✗ n ) weight ( ✚ ) = ( wt ( ❵ 0 ) ⋅ t 1 + wt ( e 1 ) ) + ✿✿✿ + ( wt ( ❵ n − 1 ) ⋅ t n + wt ( e n ) ) Behavior: quantitative timed language: ∣∣ A ∣∣ ∶ T Σ + → R ∪ { ∞ } : ∣∣ A ∣∣( w ) = min { weight ( ✚ ) ∣ ✚ is a run with label w } 1 Alur, La Torre, Pappas ’01 2 Larsen, Behrmann, Brinksma, Fehnker, Hune, Pettersson, Romijn ’01
Average behavior 1 A Both edges and locations carry a , x ≥ 2, y ← 0 weights (costs): 5 6 3 discrete : costs of edges (for 1 2 switches) 2 continuous : cost rates of x ≤ 4 locations (for delays) b , y ≥ 1 , x ← 0 Run ✚ ( ❵ 0 ❀✗ 0 ) � → ( ❵ 1 ❀✗ 1 ) → ( ❵ n ❀✗ n ) t 1 e 1 t 2 e 2 t n e n → � � → � → ✿✿✿ � → � weight ( ✚ ) = ( wt ( ❵ 0 ) ⋅ t 1 + wt ( e 1 ) ) + ✿✿✿ + ( wt ( ❵ n − 1 ) ⋅ t n + wt ( e n ) ) t 1 + ✿✿✿ + t n 1 Bouyer, Brinksma, Larsen ’04
Discounting 1 A Discounting factor 0 < ✕ < 1 a , x ≥ 2, y ← 0 Weights (costs) wt: 5 6 3 discrete : costs of edges 1 2 (in R ≥ 0 ) 2 continuous : cost rates of x ≤ 4 locations (in R ≥ 0 ) b , y ≥ 1 , x ← 0 Run ✚ ( ❵ 0 ❀✗ 0 ) � → ( ❵ 1 ❀✗ 1 ) → ( ❵ n ❀✗ n ) t 1 e 1 t 2 e 2 t n e n → � � → � → ✿✿✿ � → � Weight of ✚ : ✕ t 1 + ✿✿✿ + t i − 1 (∫ n t i wt ( ❵ i − 1 ) ⋅ ✕ ✜ d ✜ + wt ( e i ) ⋅ ✕ t i ) ∑ 0 i = 1 1 Fahrenberg, Larsen ’08
Timed valuation monoids Definition A timed valuation monoid ( M ❀ ⊕ ❀ val ❀ 0 ) : ( M ❀ ⊕ ❀ 0 ) is a commutative monoid; val ∶ T ( M × M ) + → M is a timed valuation function
Timed valuation monoids Definition A timed valuation monoid ( M ❀ ⊕ ❀ val ❀ 0 ) : ( M ❀ ⊕ ❀ 0 ) is a commutative monoid; val ∶ T ( M × M ) + → M is a timed valuation function Runs in WTA: ✚ ∶ ( ❵ 0 ❀✗ 0 ) t 1 e 1 t 2 e 2 t n e n � → � → ( ❵ 1 ❀✗ 1 ) � → � → ✿✿✿ � → � → ( ❵ n ❀✗ n ) Weight of ✚ : val [ ⟨( wt ( ❵ 0 ) ❀ wt ( e 1 )) ❀ t 1 ⟩ ❀✿✿✿❀ ⟨( wt ( ❵ n − 1 ) ❀ wt ( e n )) ❀ t n ⟩ ]
Timed valuation monoids Definition A timed valuation monoid ( M ❀ ⊕ ❀ val ❀ 0 ) : ( M ❀ ⊕ ❀ 0 ) is a commutative monoid; val ∶ T ( M × M ) + → M is a timed valuation function Runs in WTA: ✚ ∶ ( ❵ 0 ❀✗ 0 ) t 1 e 1 t 2 e 2 t n e n → ( ❵ 1 ❀✗ 1 ) → ( ❵ n ❀✗ n ) � → � � → � → ✿✿✿ � → � Weight of ✚ : val [ ⟨( wt ( ❵ 0 ) ❀ wt ( e 1 )) ❀ t 1 ⟩ ❀✿✿✿❀ ⟨( wt ( ❵ n − 1 ) ❀ wt ( e n )) ❀ t n ⟩ ] The behavior of A : ∣∣ A ∣∣ ∶ T Σ + → M w ↦ ⊕ ( weight ( ✚ ) ∣ ✚ is a run on w )
Unambiguous and deterministic TA A timed automaton A = ( L ❀ C ❀ I ❀ E ❀ F ) over an alphabet Σ is: unambiguous if for each w ∈ T Σ + there exists at most one accepting run. deterministic if for all e 1 = ( ❵❀ a ❀✣ 1 ❀ Λ 1 ❀❵ 1 ) ∈ E and e 2 = ( ❵❀ a ❀✣ 2 ❀ Λ 2 ❀❵ 2 ) ∈ E with e 1 ≠ e 2 : ✣ 1 ∧ ✣ 2 is unsatisfiable.
Unambiguous and deterministic TA A timed automaton A = ( L ❀ C ❀ I ❀ E ❀ F ) over an alphabet Σ is: unambiguous if for each w ∈ T Σ + there exists at most one accepting run. deterministic if for all e 1 = ( ❵❀ a ❀✣ 1 ❀ Λ 1 ❀❵ 1 ) ∈ E and e 2 = ( ❵❀ a ❀✣ 2 ❀ Λ 2 ❀❵ 2 ) ∈ E with e 1 ≠ e 2 : ✣ 1 ∧ ✣ 2 is unsatisfiable.
Operations for quantitative timed languages (QTL) Let M = ( M ❀ ⊕ ❀ val ❀ 0 ) be a timed valuation monoid with val ∶ T ( M × M ) + → M and Σ , Γ alphabets. Let h ∶ Γ → Σ be a renaming , v = ( ✌ 1 ❀ t 1 ) ✿✿✿ ( ✌ n ❀ t n ) ∈ T Γ + and h ( v ) = ( h ( ✌ 1 ) ❀ t 1 ) ✿✿✿ ( h ( ✌ n ) ❀ t n )
Operations for quantitative timed languages (QTL) Let M = ( M ❀ ⊕ ❀ val ❀ 0 ) be a timed valuation monoid with val ∶ T ( M × M ) + → M and Σ , Γ alphabets. Let h ∶ Γ → Σ be a renaming and r ∶ T Γ + → M . Let h ( r ) ∶ T Σ + → M w ↦ ⊕( r ( v ) ∣ v ∈ T Γ + and h ( v ) = w ) ✿
Operations for quantitative timed languages (QTL) Let M = ( M ❀ ⊕ ❀ val ❀ 0 ) be a timed valuation monoid with val ∶ T ( M × M ) + → M and Σ , Γ alphabets. Let g ∶ Γ → M × M be a renaming and val ○ g ∶ T Γ + → M v ↦ val ( g ( v ))
Operations for quantitative timed languages (QTL) Let M = ( M ❀ ⊕ ❀ val ❀ 0 ) be a timed valuation monoid with val ∶ T ( M × M ) + → M and Σ , Γ alphabets. Let r ∶ T Γ + → M and L ⊆ T Γ + . Let ( r ∩ L) ∶ T Γ + → M ⎧ ⎪ r ( v ) ❀ if v ∈ L ❀ ⎪ ⎨ ⎪ v ↦ ⎪ ⎩ otherwise 0 ❀
❀ A Nivat Decomposition Theorem for WTA Let Σ be an alphabet and M = ( M ❀ ⊕ ❀ val ❀ 0 ) a timed valuation monoid. Let N( Σ ❀ M ) be the class of QTL L ∶ T Σ + → M with L = h (( val ○ g ) ∩ L ) where h ∶ Γ → Σ , g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ T Γ + is recognizable. N Det ( Σ ❀ M ) ⊆ N Unamb ( Σ ❀ M ) ⊆ N( Σ ❀ M ) .
A Nivat Decomposition Theorem for WTA Let Σ be an alphabet and M = ( M ❀ ⊕ ❀ val ❀ 0 ) a timed valuation monoid. Let N( Σ ❀ M ) be the class of QTL L ∶ T Σ + → M with L = h (( val ○ g ) ∩ L ) where h ∶ Γ → Σ , g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ T Γ + is recognizable. N Det ( Σ ❀ M ) ⊆ N Unamb ( Σ ❀ M ) ⊆ N( Σ ❀ M ) . Let Rec ( Σ ❀ M ) be the class of recognizable QTL.
A Nivat Decomposition Theorem for WTA Let Σ be an alphabet and M = ( M ❀ ⊕ ❀ val ❀ 0 ) a timed valuation monoid. Let N( Σ ❀ M ) be the class of QTL L ∶ T Σ + → M with L = h (( val ○ g ) ∩ L ) where h ∶ Γ → Σ , g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ T Γ + is recognizable. N Det ( Σ ❀ M ) ⊆ N Unamb ( Σ ❀ M ) ⊆ N( Σ ❀ M ) . Let Rec ( Σ ❀ M ) be the class of recognizable QTL.
A Nivat Decomposition Theorem for WTA Let Σ be an alphabet and M = ( M ❀ ⊕ ❀ val ❀ 0 ) a timed valuation monoid. Let N( Σ ❀ M ) be the class of QTL L ∶ T Σ + → M with L = h (( val ○ g ) ∩ L ) where h ∶ Γ → Σ , g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ T Γ + is recognizable. N Det ( Σ ❀ M ) ⊆ N Unamb ( Σ ❀ M ) ⊆ N( Σ ❀ M ) . Let Rec ( Σ ❀ M ) be the class of recognizable QTL. Theorem 1 Rec ( Σ ❀ M ) = N Det ( Σ ❀ M ) = N Unamb ( Σ ❀ M ) . 2 If ⊕ is idempotent, then Rec ( Σ ❀ M ) = N( Σ ❀ M ) . 3 There exist an alphabet Σ 0 and a timed valuation monoid M 0 with Rec ( Σ 0 ❀ M 0 ) ≠ N( Σ 0 ❀ M 0 ) .
Relative distance logic (RDL) 1 Let Σ be an alphabet. Definition The timed MSO logic tMSO ( Σ ) : ✬ ∶∶ = P a ( x ) ∣ x ≤ y ∣ X ( x ) ∣ d ( Y ❀ x ) ∼ c ∣ ¬ ✬ ∣ ✬ ∨ ✬ ∣ ∃ x ✿✬ ∣ ∃ X ✿✬ ← where a ∈ Σ , ∼ ∈ {< ❀ ≤ ❀ = ❀ ≥ ❀ >} , c ∈ N 1 Wilke ’94
Relative distance logic (RDL) 1 Let Σ be an alphabet. Definition The timed MSO logic tMSO ( Σ ) : ✬ ∶∶ = P a ( x ) ∣ x ≤ y ∣ X ( x ) ∣ d ( Y ❀ x ) ∼ c ∣ ¬ ✬ ∣ ✬ ∨ ✬ ∣ ∃ x ✿✬ ∣ ∃ X ✿✬ ← where a ∈ Σ , ∼ ∈ {< ❀ ≤ ❀ = ❀ ≥ ❀ >} , c ∈ N Model: a timed word w = ( a 1 ❀ t 1 ) ✿✿✿ ( a n ❀ t n ) ∈ T Σ + . ( w ❀✛ ) ⊧ ← d ( Y ❀ x ) ∼ c ∆ t ∼ c t j t 1 t 2 t 3 t i time ✛ ( x ) 1 2 3 j i position ✛ ( Y ) ✛ ( Y ) 1 Wilke ’94
Recommend
More recommend