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p3WY/OeQJ6oLQtyd6SB7vtaLyvO6WZ7dfM4Rzum5B4/o7dFvlEw8c0SyJUlZyioM+yZFrfMTuSJTeM5mpgbuW+f9/GVbNo62G97zxvMP2+uv3xRfvSrcg4ewQfPyAl7DWziAQwgq/6Ilc2Vp1f+qV6rlXv5K6VC8WZNVi4qvd/AB3w9Tw=</latexit> Timed Automata Timed Languages 3 COMP 1 5 9 3 Algorithmic Verification Timed Automata and Languages Dr. Liam O’Connor CSE, UNSW (and LFCS, University of Edinburgh) Term 1 2020 1
Timed Automata Timed Languages Timed Systems The systems we have examined so far have a notion of time, but only of events happening one after the other. This is an abstraction called discrete time . For dense time systems, we care about a real-valued continuous time clocks. Example (Dense Time System) A light controlled by one button, where a “double press” of the button increases the brightness of the light. The second button press must be at most 3 time units after the first button press for the “double press” behaviour to trigger. After 12 time units, the light must turn off. 2
Timed Automata Timed Languages Can we get away with discrete time? No Theorem (Brzozowski and Seger) For every k ≥ 1 there is a system where the set of states reachable in dense time is strictly larger than the set of states reachable in discrete time in 1 k steps. This is shown for asynchronous circuits, but applies generally. 3
Timed Automata Timed Languages Towards Timed Automata Bright [ y ≤ 12] timeout; y = 12 press press; x ≤ 3 press; x := 0; y := 0 [ y ≤ 12] Off On press; x > 3 timeout; y = 12 4
Timed Automata Timed Languages Timed Automata A timed automaton is a finite automaton with one or more real valued clocks. Transitions are annotated with resets and guards and states may be annotated with invariants. Definition A timed automaton A is a 6-tuple ( L , ℓ 0 , Act , X , Inv , − → ) where: L is a set of locations. ℓ 0 is the initial location. Act is the set of discrete actions. X is the set of clock variables. Inv( ℓ ) is a clock constraint invariant associated with ℓ . g ; a ; r → ℓ ′ where Transitions are defined as ℓ − − − g is zero or more clock constraint guards . a is an action ∈ Act r is zero or more clock resets 5
Timed Automata Timed Languages Clock Constraints For reasons that will become clear later, we want to restrict clock constraints to linear subtractions: ϕ ::= x ∼ k | x − y ∼ k | ϕ 1 ∧ ϕ 2 where x , y ∈ X and k ∈ Z and ( ∼ ) ∈ { <, ≤ , = , ≥ , > } 6
Timed Automata Timed Languages States and Runs States The state of a timed automaton is a tuple of the location ∈ L and the values of all clocks ∈ R . Runs A run of a timed automaton is some interleaving of delay steps (which pass some time) and discrete steps, which take an action. Example (For the light automaton . . . ) (Off , x = y = 0) 265+ π 2 press → (Off , x = y = 265 + π 2 ) − − − − − − − → press (On , x = y = 0) 3 . 2 − − → (On , x = y = 3 . 2) − − − → (Off , x = y = 3 . 2) 27 . 87 − − − → (Off , x = y = 31 . 07) − → · · · 7
Timed Automata Timed Languages Product The product of timed automata is as the discrete time product, where we take the conjunction of all guards and invariants, and the union of all resets. Example (Boardwork) Let’s compute the product of the light automaton with this user automaton: press; z := 0 ℓ 0 ℓ 1 z ≥ 5; press [ z ≤ 6] 8
Timed Automata Timed Languages Timed Words and Languages Timed Words A timed word is a finite or infinite sequence of pairs of actions and time stamps. Example (overlines indicate sequences) L 1 = { ( a , t ) | a = (01) ∗ 0 ∧ ∀ i ≥ 0 . t 2( i +1) − t 2 i = 3 } L 2 = { ( a , t ) | a = (01) ω ∧ ∀ i ≥ 0 . t 2 i +1 ≤ t 2 i + 1 } Timed Languages Extend TA definition of A with a set F of final states and a set R of repeating states. A finite word w is ∈ L ( A ) iff a run generating the word w ends in a state F . An infinite word w is ∈ L ( A ) iff a run generating the word w visits states in R infinitely often. 9
Timed Automata Timed Languages Timed Regular Languages Definition A language is timed regular iff there exists a timed automaton that recognises it. Timed regular languages are closed under union and intersection in the usual way — merge the initial states and product respectively. Problem Write a timed automaton for words on the alphabet { a , b } that contain two a ’s exactly 1 time unit apart. Complement is not timed regular ⇒ not closed. 10
Timed Automata Timed Languages ε -Transitions Unlike for discrete time systems, ε transitions add power for timed automata. Example Consider the language where actions must occur on integer time stamps. This can be done with a ε reset, but cannot be expressed as a timed automaton without ε . 11
Timed Automata Timed Languages True Invariants Do we need invariants? Not to recognise a given timed regular language. This is because our timed words only pair time stamps with discrete actions, so violating invariants by sitting still does not change the set of recognised words. So, we just move the invariants to both the incoming and outgoing transitions like so: g ; a ; r − − − → ℓ 2 ℓ 1 becomes g ∧ Inv( ℓ 1 ) ∧ r (Inv( ℓ 2 )); a ; r − − − − − − − − − − − − − − − − − → ℓ 2 ℓ 1 Where r ( ϕ ) is applying the resets r as a substitution to ϕ . 12
Recommend
More recommend