The Timestamp of Timed Automata Amnon Rosenmann Graz University of Technology rosenmann@math.tugraz.at Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 1 / 30
Introduction Timed automata (TA) are finite automata extended with clocks that measure the time that elapsed since past events in order to control the triggering of future events Defined [Alur and Dill, 1994] as an abstract model of real-time systems A fundamental problem is the reachability problem: is a given location of a TA reachable from the initial location? The reachability problem was shown to be decidable (of complexity PSPACE-complete) [Alur and Dill, 1994] through the construction of a region automaton We generalize the reachability problem: we show that the problem of computing the set of all time values on which any transition occurs (and thus, a location is reached) is solvable Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 2 / 30
Main results Given a non-deterministic timed automaton with silent transitions A , we effectively compute its timestamp: the set of all pairs (time value, action) of all observable timed traces of A The timestamp is in the form of a union of action-labeled intervals with integral end-points and is eventually periodic One can compute a simple deterministic timed automaton with the same timestamp as that of A Partial method, not bounded by time or number of steps, for the general language non-inclusion problem for timed automata The language of A is periodic with respect to suffixes Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 3 / 30
Example (A non-determinizable TA and its timestamp) The TA in figure (a) is non-determinizable and its language is L ( A ) = { (0 + δ 0 , a ) , · · · , ( k + δ k , a ) : k ∈ N 0 , 0 < δ i < 1 } The TA in figure (b) is deterministic and has the same timestamp: R ≥ 0 \ N 0 a a 0 < x < 1 0 < x < 1 , { x } a 0 1 0 1 x = 1 , { x } ǫ ( b ) x = 1 , { x } ( a ) Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 4 / 30
Non-deterministic timed automaton - definition Definition (Timed automaton) A non-deterministic timed automaton with silent transitions is a tuple ( Q , q 0 , Σ ǫ , C , T ): Q - a finite set of locations, q 0 - the initial location Σ ǫ = Σ ∪ { ǫ } - a finite set of transition labels, or actions, Σ - observable, ǫ - silent C - a finite set of clocks T ⊆ Q × Σ ǫ × G × P ( C ) × Q - a finite set of transitions ( q , a , g , C rst , q ′ ): q , q ′ ∈ Q - the source and the target locations, respectively a ∈ Σ ǫ - the transition action g ∈ G - the transition guard C rst ⊆ C - the clocks to be reset Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 5 / 30
Example (Fishy) a x = 2 , { x } c ( x > 4) ∧ ( y ≥ 4) a 3 < x ≤ 4 , { x } 1 < x ≤ 2 ǫ 0 1 2 ǫ b y = 2 , { y } ǫ y = 2 0 ≤ x < 1 , { x } a 3 x = 2 , { x , y } a 0 < x < 1 Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 6 / 30
The semantics of a TA v : C → R ≥ 0 - a clock valuation V - the set of all clock valuations Definition (Semantics of a TA) The semantics of a TA A is the timed transition system � A � = ( S , s 0 , R ≥ 0 , Σ ǫ , T ): S = { ( q , v ) ∈ Q × V} - the set of states, s 0 = ( q 0 , 0 ) - the initial state T ⊆ S × (Σ ǫ ∪ R ≥ 0 ) × S - the transition relation: d Timed transitions (delays): ( q , v ) − → ( q , v + d ), d ∈ R ≥ 0 a → ( q ′ , v ′ ), a ∈ Σ ǫ where there Discrete transitions (jumps): ( q , v ) − exists a transition ( q , a , g , C rst , q ′ ) in T , such that the valuation v satisfies the guard g and v ′ = v [ C rst ] Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 7 / 30
Run, timed trace, language Definition (Run) A (finite) run ̺ of a TA A - a sequence of alternating timed and discrete transitions: d k a k d 1 a 1 d 2 ( q 0 , 0 ) − → ( q 0 , d 1 ) − → ( q 1 , v 1 ) − → · · · − → ( q k − 1 , v k − 1 + d k ) − → ( q k , v k ) Definition (Timed trace) A timed trace (timed word) - a sequence of pairs: λ = ( t 1 , a 1 ) , ( t 2 , a 2 ) , . . . , ( t k , a k ) , with a i ∈ Σ ǫ and t i = Σ i j =1 d i Definition (Language) The language L ( A ) - the set of (accepted observable) timed traces of A Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 8 / 30
The trail of a path In order to track the timestamp of an event along a path in the TA A with clocks x 1 , · · · , x s we first add a global clock t that displays absolute time A run along a path in A induces a trajectory in the non-negative part of the tx 1 · · · x s -space in direction 1 , except for the projections during events with clocks reset The set of all runs along a given path forms a trail The trail is triangulated into symplices called regions Each region sits on the integral grid within a unit hyper-cube and defines a fixed ordering among the partial parts of the clocks and it has its immediate time-successor Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 9 / 30
The timestamp of an event Definition (Timestamp of an event in a path) The timestamp of an event in a path is the union of the timestamps (time, action) of that event of all runs along the path Proposition The timestamp of each event is a labeled interval between points m and n , m ≤ n , m ∈ N 0 and n ∈ N ∪ ∞ Proof. It suffices to show that the timestamp of a single simplex is of the required form. Another proof is by representing events i by variables t i and showing that max/min solutions of a corresponding linear programming problem has integer solutions. Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 10 / 30
Example (Trail, timestamp and regions of a path) We look at the path: (0) a → (1) b → (2) a → (3) a − − − − → (2) x event 4 3 event 2 2 0 l i a event 1 event 3 r t 1 a l i a l r i x = 1 , { x } a t r t a 0 t 1 < x < 2 0 1 2 3 4 5 6 7 1 2 3 a -timestamp b event 1 event 3 event 4 1 ≤ x ≤ 3 , { x } a x = 3 , { x } b -timestamp event 2 ( a ) ( b ) x 3 2 1−dim trail 2−dim trail 1 0 t 0 1 2 3 4 5 6 7 ( c ) Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 11 / 30
Infinite augmented region automaton - definition We augment A with the clock t that measures absolute time and never resets Definition (Infinite augmented region automaton) The infinite augmented region automaton R t ∞ ( A ) is a tuple ( V , v 0 , E , Σ ǫ ): V - the infinite (in general) set of vertices ( q , n , ∆), where q - a location of A , ( n , ∆) - a region: n = ( n 0 , n 1 , . . . , n s ) ∈ N 0 × { 0 , 1 , . . . , M , ⊤} s - the integral parts of the clocks t , x 1 , . . . , x s ∆ - the simplex defined by the order of the fractional parts of the clocks v 0 = ( q 0 , 0 , 0 ) - the initial vertex E - the set of labeled edges: ( q , r ) a → ( q ′ , r ′ ) ∈ E iff ∃ a run of A − containing ( q , v ) d → ( q , v + d ) a → ( q ′ , v ′ ), where v - clock valuation − − belonging to region r and similarly with v ′ , r ′ Σ ǫ = Σ ∪ { ǫ } - the set of actions Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 12 / 30
Example: Infinite augmented region automaton t ∆ 0 : 0 = { t } = { x } = { y } ∆ 1 : 0 = { t } = { y } < { x } (0 , 0) (0 , 0) ǫ 0 ∆ 2 : 0 = { t } < { x } = { y } 0 ∆ 0 3 ∆ 0 ∆ 3 : 0 = { x } = { y } < { t } ǫ ∆ 4 : 0 = { x } < { t } = { y } ∆ 5 : 0 < { t } = { x } = { y } (0 , 0) (0 , 1) ∆ 6 : 0 < { t } = { y } < { x } a 3 ∆ 4 ∆ 7 : 0 < { x } < { t } = { y } ∆ 8 : 0 < { x } = { y } < { t } a ǫ ∆ 9 : 0 < { t } < { x } = { y } (1 , 1) (1 , 2) ∆ 10 : 0 = { t } = { x } < { y } ǫ 1 ∆ 5 ∆ 11 : 0 = { x } < { t } < { y } ∆ 12 : 0 = { x } < { y } < { t } (1 , 0) (2 , 2) (2 , 0) 2 ǫ 1 ∆ 1 1 ∆ 0 1 ∆ 0 C 4 . ǫ ǫ . . ǫ ǫ a (0 , 3) (0 , 1) x = 2 , { x } (3 , 4) 2 ∆ 4 2 ∆ 4 (0 , 2) c 4 2 ∆ 0 ( x > 4) ∧ ( y ≥ 4) a a 3 < x ≤ 4 , { x } (0 , 2) a 1 < x ≤ 2 ǫ (4 , 5) 0 1 2 2 ∆ 4 a . . (0 , 0) . ǫ (5 , 6) y = 2 , { y } b 3 ∆ 3 ǫ a y = 2 0 ≤ x < 1 , { x } (0 , 0) a 6 C 3 3 x = 2 , { x , y } 3 ∆ 0 ǫ (0 , 0) (6 , 7) 3 ∆ 3 . ǫ . (2 , 0) a . (7 , 8) C 3 0 < x < 1 1 ∆ 3 ǫ (2 , 0) ( a ) 8 ǫ ǫ 1 ∆ 0 ǫ (2 , 0) (0 , 1) C 4 (8 , 9) 1 ∆ 3 2 ∆ 12 ǫ ǫ (0 , 1) 9 a 2 ∆ 10 (0 , 1) (0 , 0) (0 , 1) . . (9 , 10) . 2 ∆ 4 2 ∆ 3 2 ∆ 11 a . . (0 , 0) . (10 , 11) 3 ∆ 3 a (0 , 0) . . 11 . a 3 ∆ 0 (0 , 0) (11 , 12) ǫ 3 ∆ 3 . . (2 , 0) . 13 ( b ) 1 ∆ 0 . . . . . . Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 13 / 30
Augmented region automaton We now fold R t ∞ ( A ) by ignoring the integral part of t The result is a finite augmented region automaton R t ( A ) obtained by identifying vertices that contain the same data except for the integral part of t As a compensation, we assign weights to the edges of R t ( A ) which equal the integral time difference between the target and source locations R t ( A ) and R t ∞ ( A ) are equally informative and more informative than the regular region automaton: we can construct from R t ( A ) a deterministic automaton which approximates A with a maximal error of 1 / 2 time units at each observed transition Amnon Rosenmann (TU Graz) The Timestamp of Timed Automata 14 / 30
Recommend
More recommend