Introduction to Formal Methods Chapter 11: Timed and Hybrid Systems
Roberto Sebastiani
DISI, Università di Trento, Italy – roberto.sebastiani@unitn.it URL: http://disi.unitn.it/rseba/DIDATTICA/fm2020/
Teaching assistant:Enrico Magnago– enrico.magnago@unitn.it
CDLM in Informatica, academic year 2019-2020
last update: Sunday 24thMay, 2020, 20:09
Copyright notice: some material (text, figures) displayed in these slides is courtesy of R. Alur, M. Benerecetti, A. Cimatti, M.
Di Natale, P. Pandya, M. Pistore, M. Roveri, and S.Tonetta, who detain its copyright. Some exampes displayed in these slides are taken from [Clarke, Grunberg & Peled, “Model Checking”, MIT Press], and their copyright is detained by the authors. All the other material is copyrighted by Roberto Sebastiani. Every commercial use of this material is strictly forbidden by the copyright laws without the authorization of the authors. No copy of these slides can be displayed in public
without containing this copyright notice.
Outline
1
Motivations
2
Timed systems: Modeling and Semantics Timed automata
3
Symbolic Reachability for Timed Systems Making the state space finite
Region automata Zone automata
4
Hybrid Systems: Modeling and Semantics Hybrid automata
5
Symbolic Reachability for Hybrid Systems
Multi-Rate and Rectangular Hybrid Automata
Linear Hybrid Automata
Motivations
Outline
1
Motivations
2
Timed systems: Modeling and Semantics Timed automata
3
Symbolic Reachability for Timed Systems Making the state space finite
Region automata Zone automata
4
Hybrid Systems: Modeling and Semantics Hybrid automata
5
Symbolic Reachability for Hybrid Systems Multi-Rate and Rectangular Hybrid Automata Linear Hybrid Automata
6
Exercises
Motivations
Acknowledgments
Thanks for providing material to:
Rajeev Alur & colleagues (Penn University) Paritosh Pandya (IIT Bombay)
Andrea Mattioli, Yusi Ramadian (Univ. Trento) Marco Di Natale (Scuola Superiore S.Anna, Italy)
Disclaimer
very introductory very-partial coverage
mostly computer-science centric
Motivations
Acknowledgments
Thanks for providing material to:
Rajeev Alur & colleagues (Penn University) Paritosh Pandya (IIT Bombay)
Andrea Mattioli, Yusi Ramadian (Univ. Trento) Marco Di Natale (Scuola Superiore S.Anna, Italy)
Disclaimer
very introductory very-partial coverage
mostly computer-science centric
Motivations
Hybrid Modeling
Hybrid machines = State machines + Dynamic Systems
Motivations
Hybrid Modeling: Examples
Automotive Applications
Vehicle Coordination Protocols Interacting Autonomous Robots
Bio-molecular Regulatory
Networks
Motivations
Hybrid Modeling: Examples
Automotive Applications Vehicle Coordination Protocols
Interacting Autonomous Robots
Bio-molecular Regulatory
Networks
Motivations
Hybrid Modeling: Examples
Automotive Applications Vehicle Coordination Protocols Interacting Autonomous Robots
Bio-molecular Regulatory
Networks
Motivations
Hybrid Modeling: Examples
Automotive Applications Vehicle Coordination Protocols Interacting Autonomous Robots
Bio-molecular Regulatory
Networks
Timed systems: Modeling and Semantics
Outline
1
Motivations
2
Timed systems: Modeling and Semantics Timed automata
3
Symbolic Reachability for Timed Systems Making the state space finite
Region automata Zone automata
4
Hybrid Systems: Modeling and Semantics Hybrid automata
5
Symbolic Reachability for Hybrid Systems Multi-Rate and Rectangular Hybrid Automata Linear Hybrid Automata
6
Exercises
Timed systems: Modeling and Semantics Timed automata
Outline
1
Motivations
2
Timed systems: Modeling and Semantics Timed automata
3
Symbolic Reachability for Timed Systems Making the state space finite
Region automata Zone automata
4
Hybrid Systems: Modeling and Semantics Hybrid automata
5
Symbolic Reachability for Hybrid Systems
Multi-Rate and Rectangular Hybrid Automata
Linear Hybrid Automata
Timed systems: Modeling and Semantics Timed automata
Timed Automata
Timed systems: Modeling and Semantics Timed automata
Example: Simple light control
Requirement:
if Off and press is issued once, then the light switches on;
if Off and press is issued twice quickly, then the light gets brighter;
if Light/Bright and press is issued once, then the light switches off;
Timed systems: Modeling and Semantics Timed automata
Example: Simple light control
Solution: add real-valued clock x
x reset at first press
if next press before x reaches 3 time units, then the light will get brighter;
otherwise the light is turned off
Timed systems: Modeling and Semantics Timed automata
Modeling: timing constraints
Finite graph + finite set of (real-valued) clocks
Vertexes are locations
Time can elapse there Constraints (invariants)Edges are switches
Subject to constraints Reset clocks
Timed systems: Modeling and Semantics Timed automata
Timed Automata
Locations l
1, l
2, ... (like in standard automata)
discrete part of the statemay be implemented by discrete variables
Switches (discrete transitions like in standard aut.) Labels, aka events, actions,... (like in standard aut.)
used for synchronization
Clocks: x, y,... ∈ Q
+value: time elapsed since the last time it was reset
Guards: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N
set of clock comparisons against integers bounds constrain the execution of the switch
Resets (x := 0)
set of clock assignments to 0
Invariants: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N
set of clock comparisons against integers bounds ensure progressa l1
l2
Timed systems: Modeling and Semantics Timed automata
Timed Automata
Locations l
1, l
2, ... (like in standard automata)
discrete part of the statemay be implemented by discrete variables
Switches (discrete transitions like in standard aut.) Labels, aka events, actions,... (like in standard aut.)
used for synchronization
Clocks : x, y,... ∈ Q
+value: time elapsed since the last time it was reset
Guards : (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N
set of clock comparisons against integers bounds constrain the execution of the switch
Resets (x := 0)
set of clock assignments to 0
Invariants: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N
set of clock comparisons against integers bounds ensure progress(x ≥ 4) (y ≤ 2) a
y := 0 l1
l2
Timed systems: Modeling and Semantics Timed automata
Timed Automata
Locations l
1, l
2, ... (like in standard automata)
discrete part of the statemay be implemented by discrete variables
Switches (discrete transitions like in standard aut.) Labels, aka events, actions,... (like in standard aut.)
used for synchronization
Clocks: x, y,... ∈ Q
+value: time elapsed since the last time it was reset
Guards: (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N
set of clock comparisons against integers bounds constrain the execution of the switch
Resets (x := 0)
set of clock assignments to 0
Invariants : (x ./ C) s.t. ./ ∈ {≤, <, ≥, >}, C ∈ N
set of clock comparisons against integers bounds ensure progress(x ≥ 4) (y ≤ 2) a
y := 0 l1
(x ≤ 5)
l2
(x > 4) (y ≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i:
OK!
hl2,2, 4i:
not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i:
OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i:OK! hl2,2, 4i:
not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i:
OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:
not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i:
OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:
not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i:
OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i:
OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i:
OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i:
OK! hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:
not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1)
hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:
not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard)
hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:
not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset)
hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:
not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i:
OK! hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i: OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i: OK!
hl1,3, 0i−→ hl3 1,6, 3i:
not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: States and Transitions
State: hl
i, x
1, x
2i
hl1,4, 7i: OK!hl2,2, 4i:not OK!(violates invariant in l2)
Switch: hl
i, x , y i −→ hl
a j, x
0, y
0i
hl1,4.5, 2i−→ hla 2,4.5, 0i: OK!
hl1,6, 2i−→ hla 2,6, 0i:not OK!(violates invar. in l1) hl1,3, 2i−→ hla 2,3, 0i:not OK!(violates guard) hl1,4.5, 2i−→ hla 2,4.5, 2i:not OK!(violates reset) hl1,4, 2i−→ hla 2,4, 0i:not OK!(violates invar. in l2)
Wait (time elapse): hl
i, x , y i −→ hl
δ i, x + δ, y + δi
hl1,3, 0i−→ hl2 1,5, 2i: OK!
hl1,3, 0i−→ hl3 1,6, 3i:not OK!(violates invar. in l1)
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations
Σ: Set of labels X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks
Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location
a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints
λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset
l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Timed Automata: Formal Syntax
Timed Automaton hL, L
0, Σ, X , Φ(X ), E i L: Set of locations
L
0⊆ L: Set of initial locations Σ: Set of labels
X : Set of clocks Φ(X ): Set of invariants
E ⊆ L × Σ × Φ(X ) × 2
X× L: Set of switches A switch hl, a, ϕ, λ, l
0i s.t.
l: source location a: label
ϕ: clock constraints λ⊆ X : clocks to be reset l0: target location
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Clock constraints and clock interpretations
Grammar of clock constraints:
ϕ ::= x ≤ C | x < C | x ≥ C | x > C | ϕ ∧ ϕ s.t. C positive integer values.
=⇒ allow only comparison of a clock with a constant
clock interpretation: ν
X = hx , y , zi, ν = h1.0, 1.5, 0i clock interpretation ν after δ time: ν + δ
δ = 0.2, ν + δ = h1.2, 1.7, 0.2i clock interpretation ν after reset λ: ν[λ]
λ = {y }, ν[y := 0] = h1.0, 0, 0i
A state for a timed automaton is a pair hl, νi, where l is a location and ν is a clock interpretation
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)
Timed systems: Modeling and Semantics Timed automata
Clock constraints and clock interpretations
Grammar of clock constraints:
ϕ ::= x ≤ C | x < C | x ≥ C | x > C | ϕ ∧ ϕ s.t. C positive integer values.
=⇒ allow only comparison of a clock with a constant clock interpretation: ν
X = hx , y , zi, ν = h1.0, 1.5, 0i
clock interpretation ν after δ time: ν + δ δ = 0.2, ν + δ = h1.2, 1.7, 0.2i clock interpretation ν after reset λ: ν[λ]
λ = {y }, ν[y := 0] = h1.0, 0, 0i
A state for a timed automaton is a pair hl, νi, where l is a location and ν is a clock interpretation
(x1≥ 4) (x2≤ 2) a
y := 0
L1
(x1≤ 5)
L2
(x1>4) (x2≤ 3)