Topics in Timed Automata
- B. Srivathsan
RWTH-Aachen
Software modeling and Verification group
1/25
Topics in Timed Automata B. Srivathsan RWTH-Aachen Software - - PowerPoint PPT Presentation
Topics in Timed Automata B. Srivathsan RWTH-Aachen Software modeling and Verification group 1/25 Reachability: Does something bad happen? The gate is still open when the train is 2 minutes away from the crossing This problem is
RWTH-Aachen
Software modeling and Verification group
1/25
“The gate is still open when the train is 2 minutes away from the crossing” A theory of timed automata
This problem is PSPACE-complete
2/25
◮ UPPAAL:
Uppsaala university (Sweden), Aalborg university (Denmark)
◮ KRONOS:
Verimag (France)
◮ RED
National Taiwan University (Taiwan)
◮ Rabbit
Brandenburg TU Cottbus (Germany)
3/25
◮ UPPAAL:
Uppsaala university (Sweden), Aalborg university (Denmark)
◮ KRONOS:
Verimag (France)
◮ RED
National Taiwan University (Taiwan)
◮ Rabbit
Brandenburg TU Cottbus (Germany) and still research on for efficient algorithms . . .
3/25
4/25
(y ≤ 3) (x < 1) (y < 1) (x < 4) (x > 6) {y} {y}
s0 s1 s3 s2
s0 s1 0.4 s3 0.9 0.5
0.4 0.5
x y
◮ accepting if ends in green state
5/25
(y ≤ 3) (x < 1) (y < 1) (x < 4) (x > 6) {y} {y}
s0 s1 s3 s2
first solution based on Regions
6/25
q0 q1 q2 q3
(x ≤ 5) (y ≥ 7) {x}
x y x y x y x y 7/25
q0 q1 q2 q3
(x ≤ 5) (y ≥ 7) {x} x = y ≥ 0 x = y ≥ 0 y − x ≥ 7 y − x ≥ 7
x y x y x y x y
7/25
◮ Zone: set of valuations defined by
◮ Representation: by DBM [Dil89]
8/25
q0 q1
(y = 1) {x, y} {y}
x y 9/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 q0 , 10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 q0 ,
a(Z0)
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 q0 ,
a(Z0)
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 W1 Z1 q0 , q1 ,
a(Z0)
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 W1 Z1 q0 , q1 ,
a(Z0) a(W1)
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 W1 Z1 W2 Z2 W3 Z3 q0 , q1 , q2 , q3 ,
a(Z0) a(W1)
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 W1 Z1 W2 Z2 W3 Z3 q0 , q1 , q2 , q3 ,
a(Z0) a(W1) a(W2) a(W3)
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 W1 Z1 W2 Z2 W3 Z3 q0 , q1 , q2 , q3 ,
a(Z0) a(W1) a(W2) a(W3) Find a such that number of abstracted sets is finite
10/25
Zone graph potentially infinite...
Z0 Z1 Z2 Z3 q0 , q1 , q2 , q3 ,
Z0 W1 Z1 W2 Z2 W3 Z3 q0 , q1 , q2 , q3 ,
a(Z0) a(W1) a(W2) a(W3) Coarser the abstraction, smaller the abstracted graph
10/25
a(W) W v
g1 R1 g2 R2 g3 R3 g4 R4 g
5
R
5
v′
g
1
R
1
g2 R2 g3 R3 g4 R4 g5 R5
q
11/25
a(W) W v
g1 R1 g2 R2 g3 R3 g4 R4 g
5
R
5
v′
g
1
R
1
g2 R2 g3 R3 g4 R4 g5 R5
q
11/25
(y ≤ 3) (x < 1) (y < 1) (x < 4) (x > 6) {y} {y}
s0 s1 s3 s2
12/25
(y ≤ 3) (x < 1) (y < 1) (x < 4) (x > 6)
12/25
(y ≤ 3) (x < 1) (y < 1) (x < 4) (x > 6)
12/25
(y ≤ 3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3 Z4 Z5
q3 = q1 ∧ Z3 ⊆ a(Z1)?
17/25
18/25
19/25
M(x) M(y)
20/25
Z M(x) M(y)
20/25
Z M(x) M(y)
20/25
x y M(x) M(y) Z Z′
21/25
x y M(x) M(y) Z Z′ ClosureM(Z′)
21/25
x y M(x) M(y) Z Z′ ClosureM(Z′)
21/25
x y M(x) M(y) Z Z′
Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
21/25
x y M(x) M(y) Z Z′
Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′ Coming next: Steps to the efficient algorithm for Z ⊆ ClosureM(Z′)
21/25
x y
22/25
x y
x < 3 x > 2 y < ∞ y > 2
22/25
x y
x < 3 x > 2 y < ∞ y > 2
x y
22/25
x y
x < 3 x > 2 y < ∞ y > 2
x y
22/25
x y
x − 0 < 3 x > 2 y < ∞ y > 2
x y
< 3 22/25
x y
x − 0 < 3 x > 2 y < ∞ y > 2
x y
< 3 22/25
x y
x − 0 < 3 0 − x < −2 y < ∞ y > 2
x y
< 3 22/25
x y
x − 0 < 3 0 − x < −2 y < ∞ y > 2
x y
< −2 < 3 22/25
x y
x − 0 < 3 0 − x < −2 y < ∞ y > 2
x y
< −2 < 3 22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 < ∞ < −2 22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 < ∞ < −2 22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 < ∞ < −2 < ∞ < ∞ 22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 < ∞ < −2 < ∞ < ∞
22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 < ∞ < −2 < ∞ < ∞
22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 < ∞ < −2 < ∞ < 1
22/25
x y
x − 0 < 3 0 − x < −2 y − 0 < ∞ 0 − y < −2
x y
< −2 < 3 < ∞ < −2 < ∞ < 1
22/25
Inspired by an observation made in [Bou04]
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GR
x1 x2 x3
GZ′
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GR
x1 x2 x3
GZ′
x2 x1 x3
min(GR, GZ′)
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GR
x1 x2 x3
GZ′
x2 x1 x3
min(GR, GZ′)
R ∩ Z′ is empty ⇔ min(GR, GZ′) has a negative cycle
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GR
x1 x2 x3
GZ′
x2 x1 x3
min(GR, GZ′)
R ∩ Z′ is empty ⇔ min(GR, GZ′) has a negative cycle involving at most 2 clocks!
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GR
x1 x2 x3
GZ′
x2 x1 x3
min(GR, GZ′)
R ∩ Z′ is empty ⇔ min(GR, GZ′) has a negative cycle involving at most 2 clocks!
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GProjx2x3(R)
x1 x2 x3
GProjx2x3(Z′)
x2 x1 x3
R ∩ Z′ is empty ⇔ min(GR, GZ′) has a negative cycle involving at most 2 clocks!
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GProjx2x3(R)
x1 x2 x3
GProjx2x3(Z′)
x2 x1 x3
min(GProjx2x3(R), GProjx2x3(Z′))
R ∩ Z′ is empty ⇔ min(GR, GZ′) has a negative cycle involving at most 2 clocks!
23/25
Inspired by an observation made in [Bou04]
x1 x2 x3
GProjx2x3(R)
x1 x2 x3
GProjx2x3(Z′)
x2 x1 x3
min(GProjx2x3(R), GProjx2x3(Z′))
R ∩ Z′ is empty ⇔ ∃ x, y. Projxy(R) ∩ Projxy(Z′) is empty
23/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′)
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′)
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′)
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′) Projx2x3(R) ∩ Projx2x3(Z)
24/25
Recall: Z ⊆ ClosureM(Z′) ⇔ ∃R. R intersects Z, R does not intersect Z′
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′) Projx2x3(R) ∩ Projx2x3(Z)
Z ⊆ Closureα(Z′) if and only if there exist 2 clocks x, y s.t. Projxy(Z) ⊆ ClosureM(Projxy(Z′))
24/25
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′) Projx2x3(R) ∩ Projx2x3(Z)
Z ⊆ Closureα(Z′) if and only if there exist 2 clocks x, y s.t. Projxy(Z) ⊆ ClosureM(Projxy(Z′)) Slightly modified edge-edge comparison is enough
24/25
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′) Projx2x3(R) ∩ Projx2x3(Z)
Z ⊆ Closureα(Z′) if and only if there exist 2 clocks x, y s.t. Projxy(Z) ⊆ ClosureM(Projxy(Z′)) Complexity: O(|X|2), where X is the set of clocks
24/25
x1 x2 x3
Z
x1 x2 x3
Z′
x1 x2 x3
R
Projx2x3(R) ∩ Projx2x3(Z′) Projx2x3(R) ∩ Projx2x3(Z)
Z ⊆ Closureα(Z′) if and only if there exist 2 clocks x, y s.t. Projxy(Z) ⊆ ClosureM(Projxy(Z′)) Same complexity as Z ⊆ Z′!
24/25
(q0, Z0) (q1, Z1) (q5, Z5) (q2, Z2) (q3, Z3) (q4, Z4) q3 = q1 ∧ Z3 ⊆ Closureα(Z1)?
25/25
◮ Store concrete semantics : zones ◮ Compute ZG(A): Z ⊆ Closureα′(Z′) for termination
26/25
M
LU
27/25
A theory of timed automata. Theoretical Computer Science, 126(2):183–235, 1994.
Static guard analysis in timed automata verification. In TACAS’03, volume 2619 of LNCS, pages 254–270. Springer, 2003.
Lower and upper bounds in zone based abstractions of timed automata. Tools and Algorithms for the Construction and Analysis of Systems, pages 312–326, 2004.
Forward analysis of updatable timed automata.
Timing assumptions and verification of finite-state concurrent systems. In AVMFSS, volume 407 of LNCS, pages 197–212. Springer, 1989.
Model checking of real-time reachability properties using abstractions. In TACAS’98, volume 1384 of LNCS, pages 313–329. Springer, 1998. François Laroussinie and Ph. Schnoebelen. The state explosion problem from trace to bisimulation equivalence. In Proceedings of the Third International Conference on Foundations of Software Science and Computation Structures, FOSSACS ’00, pages 192–207. Springer-Verlag, 2000. 27/25