Zone based verification of timed automata revisited B. Srivathsan - - PowerPoint PPT Presentation

zone based verification of timed automata revisited
SMART_READER_LITE
LIVE PREVIEW

Zone based verification of timed automata revisited B. Srivathsan - - PowerPoint PPT Presentation

Zone based verification of timed automata revisited B. Srivathsan Joint work with F. Herbreteau and I. Walukiewicz LaBRI, Universit e de Bordeaux 1 Groupe de Travail Mod elisation et V erification LIF, Marseille - November 2011 Zone


slide-1
SLIDE 1

Zone based verification of timed automata revisited

  • B. Srivathsan

Joint work with F. Herbreteau and I. Walukiewicz

LaBRI, Universit´ e de Bordeaux 1

Groupe de Travail Mod´ elisation et V´ erification LIF, Marseille - November 2011

Zone based verification of timed automata revisited - 1/45

slide-2
SLIDE 2

Outline

The reachability problem The liveness problem

Zone based verification of timed automata revisited - 2/45

slide-3
SLIDE 3

Part 1: The reachability problem

Includes work done with

  • D. Kini

Indian Institute of Technology, Bombay

Zone based verification of timed automata revisited - 3/45

slide-4
SLIDE 4

Timed Automata [AD94]

Run: finite sequence of transitions,

(s0,

x

  • 0 ,

y

  • 0 )

0.4,a

− − − → (s1, 0.4, 0)

0.5,c

− − − → (s3, 0.9, 0.5)

◮ A run is accepting if it ends in a green state.

Zone based verification of timed automata revisited - 4/45

slide-5
SLIDE 5

The problem we are interested in ...

Given a TA, does there exist an accepting run?

Zone based verification of timed automata revisited - 5/45

slide-6
SLIDE 6

The problem we are interested in ...

Given a TA, does there exist an accepting run? Theorem [AD94, CY92] This problem is PSPACE-complete

Zone based verification of timed automata revisited - 5/45

slide-7
SLIDE 7

First solution to this problem

Key idea: Partition the space of valuations into a finite number of regions

◮ Region: set of valuations

satisfying the same guards w.r.t. time

◮ Finiteness: Parametrized

by maximal constant Sound and complete [AD94] Region graph preserves state reachability

Zone based verification of timed automata revisited - 6/45

slide-8
SLIDE 8

First solution to this problem

Key idea: Partition the space of valuations into a finite number of regions

◮ Region: set of valuations

satisfying the same guards w.r.t. time

◮ Finiteness: Parametrized

by maximal constant O(|X|!.M|X|) many regions! Sound and complete [AD94] Region graph preserves state reachability

Zone based verification of timed automata revisited - 6/45

slide-9
SLIDE 9

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

Zone based verification of timed automata revisited - 7/45

slide-10
SLIDE 10

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-11
SLIDE 11

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-12
SLIDE 12

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-13
SLIDE 13

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-14
SLIDE 14

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-15
SLIDE 15

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-16
SLIDE 16

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-17
SLIDE 17

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-18
SLIDE 18

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-19
SLIDE 19

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-20
SLIDE 20

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-21
SLIDE 21

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3 (x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-22
SLIDE 22

A more efficient solution...

Key idea: Maintain all valuations reachable along a path

q0 q1 q2 q3

x = y ≥ 0 x = y ≥ 5 y − x ≥ 7 y − x ≥ 7

(x ≤ 5) (y ≥ 7) x := 0

Zone based verification of timed automata revisited - 7/45

slide-23
SLIDE 23

Zones and zone graph

◮ Zone: set of valuations defined

by conjunctions of constraints:

◮ x ∼ c ◮ x − y ∼ c ◮ e.g. (x − y ≥ 1) ∧ (y < 2)

◮ Representation: by DBM

Zone based verification of timed automata revisited - 8/45

slide-24
SLIDE 24

Zones and zone graph

◮ Zone: set of valuations defined

by conjunctions of constraints:

◮ x ∼ c ◮ x − y ∼ c ◮ e.g. (x − y ≥ 1) ∧ (y < 2)

◮ Representation: by DBM

Sound and complete [DT98] Zone graph preserves state reachability

Zone based verification of timed automata revisited - 8/45

slide-25
SLIDE 25

But the zone graph could be infinite ...

q0 q1 (y = 1) x := 0 y := 0 y := 0

Zone based verification of timed automata revisited - 9/45

slide-26
SLIDE 26

But the zone graph could be infinite ...

q0 q1 (y = 1) x := 0 y := 0 y := 0

Zone based verification of timed automata revisited - 9/45

slide-27
SLIDE 27

But the zone graph could be infinite ...

q0 q1 (y = 1) x := 0 y := 0 y := 0

Zone based verification of timed automata revisited - 9/45

slide-28
SLIDE 28

But the zone graph could be infinite ...

q0 q1 (y = 1) x := 0 y := 0 y := 0

Zone based verification of timed automata revisited - 9/45

slide-29
SLIDE 29

But the zone graph could be infinite ...

q0 q1 (y = 1) x := 0 y := 0 y := 0

Zone based verification of timed automata revisited - 9/45

slide-30
SLIDE 30

But the zone graph could be infinite ...

q0 q1 (y = 1) x := 0 y := 0 y := 0

Zone based verification of timed automata revisited - 9/45

slide-31
SLIDE 31

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2)

Zone based verification of timed automata revisited - 10/45

slide-32
SLIDE 32

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2) (q0, a(Z0))

Zone based verification of timed automata revisited - 10/45

slide-33
SLIDE 33

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2) (q0, a(Z0))

Zone based verification of timed automata revisited - 10/45

slide-34
SLIDE 34

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2) (q0, a(Z0)) (q1, Z ′)

Zone based verification of timed automata revisited - 10/45

slide-35
SLIDE 35

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2) (q0, a(Z0)) (q1, a(Z ′))

Zone based verification of timed automata revisited - 10/45

slide-36
SLIDE 36

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2) (q0, a(Z0)) (q1, a(Z ′)) (q2, Z ′′)

Zone based verification of timed automata revisited - 10/45

slide-37
SLIDE 37

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2) (q0, a(Z0)) (q1, a(Z ′)) (q2, a(Z ′′))

Zone based verification of timed automata revisited - 10/45

slide-38
SLIDE 38

Use finite abstractions

Key idea: Abstract each zone in a sound manner (q0, Z0) (q1, Z1) (q2, Z2) (q0, a(Z0)) (q1, a(Z ′)) (q2, a(Z ′′))

◮ Number of abstracted zones is finite ◮ Coarser abstraction → fewer abstracted zones

Zone based verification of timed automata revisited - 10/45

slide-39
SLIDE 39

Abstractions in literature [Bou04, BBLP06]

Extraα Closureα Extra+

LU

Extra+

α

aLU

Zone based verification of timed automata revisited - 11/45

slide-40
SLIDE 40

Abstractions in literature [Bou04, BBLP06]

Extraα Closureα Extra+

LU

Extra+

α

aLU Sound and complete All the above abstractions preserve state reachability

Zone based verification of timed automata revisited - 11/45

slide-41
SLIDE 41

Abstractions in literature [Bou04, BBLP06]

Extraα Closureα Extra+

LU

Extra+

α

aLU Sound and complete All the above abstractions preserve state reachability But for implementation abstracted zone should be a zone

Zone based verification of timed automata revisited - 11/45

slide-42
SLIDE 42

Abstractions in literature [Bou04, BBLP06]

Extraα Closureα Extra+

LU

Extra+

α

aLU Only convex abstractions in implementations!

Zone based verification of timed automata revisited - 11/45

slide-43
SLIDE 43

Here...

Efficient use of the non-convex Closure abstraction!

Zone based verification of timed automata revisited - 12/45

slide-44
SLIDE 44

What is Closureα?

α(x) α(y)

x y

Zone based verification of timed automata revisited - 13/45

slide-45
SLIDE 45

What is Closureα?

Z α(x) α(y)

x y

Zone based verification of timed automata revisited - 13/45

slide-46
SLIDE 46

What is Closureα?

Z α(x) α(y)

x y Closureα(Z): set of regions that Z intersects

Zone based verification of timed automata revisited - 13/45

slide-47
SLIDE 47

Using Closureα for reachability

(q0, a(Z0)) (q1, a(Z1)) (q5, a(Z5)) (q2, a(Z2)) (q3, a(Z3)) (q4, a(Z4)) q3 = q1 ∧ a(Z3) ⊆ a(Z1)?

Standard algorithm: covering tree

Zone based verification of timed automata revisited - 14/45

slide-48
SLIDE 48

Using Closureα for reachability

(q0, a(Z0)) (q1, a(Z1)) (q5, a(Z5)) (q2, a(Z2)) (q3, a(Z3)) (q4, a(Z4))

Closureα(Z) cannot be efficiently stored

Zone based verification of timed automata revisited - 14/45

slide-49
SLIDE 49

Using Closureα for reachability

(q0, Z0) (q1, Z1) (q5, Z5) (q2, Z2) (q3, Z3) (q4, Z4)

Do not store abstracted zones!

Zone based verification of timed automata revisited - 14/45

slide-50
SLIDE 50

Using Closureα for reachability

(q0, Z0) (q1, Z1) (q5, Z5) (q2, Z2) (q3, Z3) (q4, Z4) q3 = q1 ∧ Z3 ⊆ Closureα(Z1)?

Use Closure for termination!

Zone based verification of timed automata revisited - 14/45

slide-51
SLIDE 51

Using Closureα for reachability

(q0, Z0) (q1, Z1) (q5, Z5) (q2, Z2) (q3, Z3) (q4, Z4) q3 = q1 ∧ Z3 ⊆ Closureα(Z1)?

Need an efficient algorithm for Z ⊆ Closureα(Z ′)

Zone based verification of timed automata revisited - 14/45

slide-52
SLIDE 52

Reduction to two clocks

Inspired by a crucial observation made in [Bou04] Theorem Z ⊆ Closureα(Z ′) if and only if there exist 2 clocks x, y s.t. Projxy(Z) ⊆ Closureα(Projxy(Z ′))

Zone based verification of timed automata revisited - 15/45

slide-53
SLIDE 53

Reduction to two clocks

Inspired by a crucial observation made in [Bou04] Theorem Z ⊆ Closureα(Z ′) if and only if there exist 2 clocks x, y s.t. Projxy(Z) ⊆ Closureα(Projxy(Z ′)) Complexity: O(|X|2), where X is the set of clocks

Zone based verification of timed automata revisited - 15/45

slide-54
SLIDE 54

Reduction to two clocks

Inspired by a crucial observation made in [Bou04] Theorem Z ⊆ Closureα(Z ′) if and only if there exist 2 clocks x, y s.t. Projxy(Z) ⊆ Closureα(Projxy(Z ′)) Same complexity as Z ⊆ Z ′!

Zone based verification of timed automata revisited - 15/45

slide-55
SLIDE 55

So what do we have now...

(q0, Z0) (q1, Z1) (q5, Z5) (q2, Z2) (q3, Z3) (q4, Z4) q3 = q1 ∧ Z3 ⊆ Closureα(Z1)?

Efficient algorithm for Z ⊆ Closureα(Z ′)

Zone based verification of timed automata revisited - 16/45

slide-56
SLIDE 56

So what do we have now...

(q0, Z0) (q1, Z1) (q5, Z5) (q2, Z2) (q3, Z3) (q4, Z4) q3 = q1 ∧ Z3 ⊆ Closureα(Z1)?

Coming next: prune the bound function α!

Zone based verification of timed automata revisited - 16/45

slide-57
SLIDE 57

Bound function α

q0 q1 q2 q3

x ≤ 5 y ≥ 5 x := 0 x ≤ 14 y := 0 y ≥ 106

Naive: α(x) = 14, α(y) = 106 Size of graph ∼105

Zone based verification of timed automata revisited - 17/45

slide-58
SLIDE 58

Static analysis: bound function for every q [BBFL03]

q0 q1 q2 q3

x ≤ 5 y ≥ 5 x := 0 x ≤ 14 y := 0 y ≥ 106

Naive: α(x) = 14, α(y) = 106

5 5 5 106

Zone based verification of timed automata revisited - 17/45

slide-59
SLIDE 59

Static analysis: bound function for every q [BBFL03]

q0 q1 q2 q3

x ≤ 5 y ≥ 5 x := 0 x ≤ 14 y := 0 y ≥ 106

Naive: α(x) = 14, α(y) = 106

5 5 5 106

But this is not enough!

Zone based verification of timed automata revisited - 17/45

slide-60
SLIDE 60

Need to look at semantics...

q0 q1 q2 q3

x = 1 x := 0 x ≥ 2 x < 1 y = 106 Static analysis: α(y) = 106

More than 106 zones at q0 not necessary!

Zone based verification of timed automata revisited - 18/45

slide-61
SLIDE 61

Bound function for every (q, Z) in ZG(A)

. . . . . . . . . constants at depend on subtree

Zone based verification of timed automata revisited - 19/45

slide-62
SLIDE 62

Constant propagation

(q, Z, α)

α(x) = −∞

Zone based verification of timed automata revisited - 20/45

slide-63
SLIDE 63

Constant propagation

(q, Z, α)

x ≤ 3 α(x) = −∞

Zone based verification of timed automata revisited - 20/45

slide-64
SLIDE 64

Constant propagation

(q, Z, α)

x ≤ 3 α(x) = 3

Zone based verification of timed automata revisited - 20/45

slide-65
SLIDE 65

Constant propagation

(q, Z, α)

x ≤ 3 α(x) = 3

Zone based verification of timed automata revisited - 20/45

slide-66
SLIDE 66

Constant propagation

(q, Z, α)

x ≤ 3 α(x) = 5

Zone based verification of timed automata revisited - 20/45

slide-67
SLIDE 67

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) α(x) = 5

Zone based verification of timed automata revisited - 20/45

slide-68
SLIDE 68

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6 α(x) = 5

Zone based verification of timed automata revisited - 20/45

slide-69
SLIDE 69

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6 α(x) = 6

Zone based verification of timed automata revisited - 20/45

slide-70
SLIDE 70

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6 α(x) = 6

Zone based verification of timed automata revisited - 20/45

slide-71
SLIDE 71

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6 α(x) = 6

Zone based verification of timed automata revisited - 20/45

slide-72
SLIDE 72

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6

X

x ≥ 11 α(x) = 6

Zone based verification of timed automata revisited - 20/45

slide-73
SLIDE 73

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6

X

x ≥ 11 α(x) = 11

Zone based verification of timed automata revisited - 20/45

slide-74
SLIDE 74

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6

X

x ≥ 11 α(x) = 11

Zone based verification of timed automata revisited - 20/45

slide-75
SLIDE 75

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6

X

x ≥ 11 α(x) = 11

Zone based verification of timed automata revisited - 20/45

slide-76
SLIDE 76

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6

X

x ≥ 11 x := 0 α(x) = 11

Zone based verification of timed automata revisited - 20/45

slide-77
SLIDE 77

Constant propagation

(q, Z, α)

x ≤ 3

(q′, Z ′, α′)

Z ′ ⊆ Closureα(Z) x > 6

X

x ≥ 11 x := 0 α(x) = 11 All tentative nodes consistent + No more exploration → Terminate!

Zone based verification of timed automata revisited - 20/45

slide-78
SLIDE 78

Invariants on the bounds

◮ Non tentative nodes: α = max{αsucc} (modulo resets) ◮ Tentative nodes:

α = αcovering Theorem (Correctness) An accepting state is reachable in ZG(A) iff the algorithm reaches a node with an accepting state and a non-empty zone.

Zone based verification of timed automata revisited - 21/45

slide-79
SLIDE 79

Overall algorithm

◮ Compute ZG(A): Z ⊆ Closureα′(Z ′) for termination ◮ Bounds α calculated on-the-fly ◮ Abstraction Extra+

LU can also be handled:

Extraα Closureα Extra+

LU

Extra+

α

Closureα ◦ Extra+

LU

aLU An efficient O(|X|2) procedure for Z ⊆ Closureα(Extra+

LU(Z ′))!

Zone based verification of timed automata revisited - 22/45

slide-80
SLIDE 80

Benchmarks

Model Our algorithm UPPAAL’s algorithm UPPAAL 4.1.3 (-n4 -C -o1) nodes s. nodes s. nodes s. CSMA/CD7 5031 0.32 5923 0.27 − T.O. CSMA/CD8 16588 1.36 19017 1.08 − T.O. CSMA/CD9 54439 6.01 60783 4.19 − T.O. FDDI10 459 0.02 525 0.06 12049 2.43 FDDI20 1719 0.29 2045 0.78 − T.O. FDDI30 3779 1.29 4565 4.50 − T.O. Fischer7 7737 0.42 20021 0.53 18374 0.35 Fischer8 25080 1.55 91506 2.48 85438 1.53 Fischer9 81035 5.90 420627 12.54 398685 8.95 Fischer10 − T.O. − T.O. 1827009 53.44 ◮ Extra+ LU and static analysis bounds in UPPAAL ◮ Closureα(Extra+ LU) and otf bounds in our algorithm

Zone based verification of timed automata revisited - 23/45

slide-81
SLIDE 81

Part 2: The liveness problem

Zone based verification of timed automata revisited - 24/45

slide-82
SLIDE 82

Timed B¨ uchi Automata [AD94]

Run: infinite sequence of transitions

(s0,

x

  • 0 ,

y

  • 0 )

0.4,a

− − − → (s1, 0.4, 0)

0.5,c

− − − → (s3, 0.9, 0.5)

0.3,d

− − − → (s3, 1.2, 0.8)

15,d

− − → · · ·

◮ accepting if infinitely often green ◮ non-Zeno if time diverges ( i≥0 δi → ∞)

Zone based verification of timed automata revisited - 25/45

slide-83
SLIDE 83

Model-Checking Real-Time Systems

Correctness: Safety + Liveness + Fairness

¬open open, x := 0 (x < 5), close

”Infinitely often, the gate is open for at least 5 s.” Realistic counter-examples: infinite non-Zeno runs

Zone based verification of timed automata revisited - 26/45

slide-84
SLIDE 84

The problem that we consider

Given a TBA A, does it have a non-Zeno accepting run

Theorem [AD94] Deciding if a TBA has a non-Zeno accepting run is PSPACE- complete

Zone based verification of timed automata revisited - 27/45

slide-85
SLIDE 85

Once again abstract zone graph ZGa(A)

Extraα Closureα Extra+

LU

Extra+

α

aLU Sound and complete [Bou04, BBLP06, Tri09, Li09] Extraα, Extra+

α, Extra+ LU preserve repeated state reachability

Zone based verification of timed automata revisited - 28/45

slide-86
SLIDE 86

Once again abstract zone graph ZGa(A)

Extraα Closureα Extra+

LU

Extra+

α

aLU Sound and complete [Bou04, BBLP06, Tri09, Li09] Extraα, Extra+

α, Extra+ LU preserve repeated state reachability

What about non-Zenoness?

Zone based verification of timed automata revisited - 28/45

slide-87
SLIDE 87

Finding non-Zeno Runs from Abstract Paths

s0 s1 s2 x := 0 y := 0 (y ≤ 0) (x ≤ 0)

Region graph:

(s0, 0 = x = y) (s1, 0 = x = y) (s1, 0 = x < y) (s0, 0 = x = y) (s2, 0 = y = x) (s2, 0 = y < x)

Zone graph with Extraα:

(s0, 0 = x = y) (s1, 0 = x ≤ y) (s0, 0 = x = y) (s2, 0 = y ≤ x)

Zone graph with Extra+

LU:

(s0, ⊤) (s1, ⊤) (s0, ⊤) (s2, ⊤)

Zone based verification of timed automata revisited - 29/45

slide-88
SLIDE 88

Finding non-Zeno Runs from Abstract Paths

s0 s1 s2 x := 0 y := 0 (y ≤ 0) (x ≤ 0)

Region graph:

(s0, 0 = x = y) (s1, 0 = x = y) (s1, 0 = x < y) (s0, 0 = x = y) (s2, 0 = y = x) (s2, 0 = y < x)

Zone graph with Extraα:

(s0, 0 = x = y) (s1, 0 = x ≤ y) (s0, 0 = x = y) (s2, 0 = y ≤ x)

Zone graph with Extra+

LU:

(s0, ⊤) (s1, ⊤) (s0, ⊤) (s2, ⊤)

How to detect non-Zeno runs from abstract zones?

Zone based verification of timed automata revisited - 29/45

slide-89
SLIDE 89

From TBA to Strongly non-Zeno TBA [TYB05]

Key Idea : reduce non-Zenoness to B¨ uchi acceptation

. . . . . . . . . . . . . . . ≥ 1 ≥ 1 . . . g

1

; R

1

g

2

; R

2

A

Zone based verification of timed automata revisited - 30/45

slide-90
SLIDE 90

From TBA to Strongly non-Zeno TBA [TYB05]

Key Idea : reduce non-Zenoness to B¨ uchi acceptation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ≥ 1 ≥ 1 . . . g

1

; R

1

g

2

; R

2

A

Zone based verification of timed automata revisited - 30/45

slide-91
SLIDE 91

From TBA to Strongly non-Zeno TBA [TYB05]

Key Idea : reduce non-Zenoness to B¨ uchi acceptation

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ≥ 1 ≥ 1 . . . g

1

; R

1

g

2

; R

2

A

. . . g1 & (t ≥ 1) R1; t := 0 g1; R1 g2 & (t ≥ 1) R2; t := 0 g2; R2

A′

Zone based verification of timed automata revisited - 30/45

slide-92
SLIDE 92

Strongly non-Zeno TBA [Tri99, TYB05]

Definition Strongly non-Zeno TBA: all accepting runs are non-Zeno Theorem [TYB05] For every TBA A, there exists a Strongly non-Zeno TBA A′ that has an accepting run iff A has a non-Zeno accepting run

(size of A′: |X| + 1 clocks and at most 2|Q| states)

Theorem [Tri09] A has a non-Zeno accepting run iff ZG(A′) has an accepting run

Zone based verification of timed automata revisited - 31/45

slide-93
SLIDE 93

What we observe

Extra+

LU

Extra+

α

Extraα

Strongly non-Zeno Construction [TYB05]

Zone based verification of timed automata revisited - 32/45

slide-94
SLIDE 94

What we observe

Extra+

LU

Extra+

α

Extraα

Strongly non-Zeno Construction [TYB05] Combinatorial blowup |ZGa(A)|.O(2|X|)

Zone based verification of timed automata revisited - 32/45

slide-95
SLIDE 95

and we propose...

Extra+

LU

Extra+

α

Extraα

Strongly non-Zeno Construction [TYB05] Combinatorial blowup |ZGa(A)|.O(2|X|) Polynomial algorithm |ZGa(A)|.O(|X|2)

Zone based verification of timed automata revisited - 32/45

slide-96
SLIDE 96

and we propose...

Extra+

LU

Extra+

α

Extraα

Strongly non-Zeno Construction [TYB05] Combinatorial blowup |ZGa(A)|.O(2|X|) Polynomial algorithm |ZGa(A)|.O(|X|2) NP-complete Given A, ZGExtra+

LU

does A have a non-Zeno run?

Zone based verification of timed automata revisited - 32/45

slide-97
SLIDE 97

and we propose...

Extra+

LU

Extra+

α

Extraα

Strongly non-Zeno Construction [TYB05] Combinatorial blowup |ZGa(A)|.O(2|X|) Polynomial algorithm |ZGa(A)|.O(|X|2) NP-complete Given A, ZGExtra+

LU

does A have a non-Zeno run? Coming next: the polynomial construction

Zone based verification of timed automata revisited - 32/45

slide-98
SLIDE 98

Our approach to non-Zenoness

A path in ZGa(A) yields only Zeno runs iff:

  • 1. some clock x is blocking:
  • · · ·
  • · · ·
  • · · ·
  • · · ·
  • · · ·

x := 0 (x ≤ 1) x := 0 (x ≤ 2) (x ≤ 1) (x ≤ 2) x never reset Zone based verification of timed automata revisited - 33/45

slide-99
SLIDE 99

Our approach to non-Zenoness

A path in ZGa(A) yields only Zeno runs iff:

  • 1. some clock x is blocking:
  • · · ·
  • · · ·
  • · · ·
  • · · ·
  • · · ·

x := 0 (x ≤ 1) x := 0 (x ≤ 2) (x ≤ 1) (x ≤ 2) x never reset

  • 2. or time cannot elapse due to zero-checks:
  • · · ·

x := 0 (y = 0) y := 0 (x = 0) x := 0 (y = 0) y := 0 (x = 0) x := 0 time cannot elapse Zone based verification of timed automata revisited - 33/45

slide-100
SLIDE 100

Our approach to non-Zenoness

A path in ZGa(A) yields only Zeno runs iff:

  • 1. some clock x is blocking:
  • · · ·
  • · · ·
  • · · ·
  • · · ·
  • · · ·

x := 0 (x ≤ 1) x := 0 (x ≤ 2) (x ≤ 1) (x ≤ 2) x never reset

  • 2. or time cannot elapse due to zero-checks:
  • · · ·

x := 0 (y = 0) y := 0 (x = 0) x := 0 (y = 0) y := 0 (x = 0) x := 0 time cannot elapse

◮ Idea : define conditions on SCC in ZGa(A) to detect

those two situations

Zone based verification of timed automata revisited - 33/45

slide-101
SLIDE 101

The Case of Blocking Clocks (no x = 0)

s0 s1 s2 s3 (x ≤ 1), y := 0 (y ≤ 1) z := 0 (z ≤ 1) Zone based verification of timed automata revisited - 34/45

slide-102
SLIDE 102

The Case of Blocking Clocks (no x = 0)

s0 s1 s2 s3 (x ≤ 1), y := 0 (y ≤ 1) z := 0 (z ≤ 1) Zone based verification of timed automata revisited - 34/45

slide-103
SLIDE 103

The Case of Blocking Clocks (no x = 0)

s0 s1 s2 s3 (x ≤ 1), y := 0 (y ≤ 1) z := 0 (z ≤ 1) Zone based verification of timed automata revisited - 34/45

slide-104
SLIDE 104

The Case of Blocking Clocks (no x = 0)

s0 s1 s2 s3 (x ≤ 1), y := 0 (y ≤ 1) z := 0 (z ≤ 1) Zone based verification of timed automata revisited - 34/45

slide-105
SLIDE 105

The Case of Blocking Clocks (no x = 0)

s0 s1 s2 s3 (x ≤ 1), y := 0 (y ≤ 1) z := 0 (z ≤ 1) Zone based verification of timed automata revisited - 34/45

slide-106
SLIDE 106

The Case of Blocking Clocks (no x = 0)

s0 s1 s2 s3 (x ≤ 1), y := 0 (y ≤ 1) z := 0 (z ≤ 1)

Blocking clocks are detected in time |ZGa(A)|.(|X| + 1)

Zone based verification of timed automata revisited - 34/45

slide-107
SLIDE 107

Detecting zero-checks (x = 0)

  • ?
  • (x = 0)

Can time elapse here?

Zone based verification of timed automata revisited - 35/45

slide-108
SLIDE 108

Detecting zero-checks (x = 0)

  • x := 0

(x = 0)

Can time elapse here?

Zone based verification of timed automata revisited - 35/45

slide-109
SLIDE 109

Detecting zero-checks (x = 0)

  • x := 0

(x = 0)

Problem: detect nodes where time can elapse Solution: each zero-check must be preceded by a reset

Zone based verification of timed automata revisited - 35/45

slide-110
SLIDE 110

Detecting zero-checks (x = 0)

  • x := 0

(x = 0)

Problem: detect nodes where time can elapse Solution: each zero-check must be preceded by a reset Guessing zone graph (GZGa)

◮ Each node (q, Z, Y ) has a guess set Y ⊆ X ◮ (q, Z, Y ) x:=0

− − → (q′, Z ′, Y ∪ {x})

◮ (q, Z, Y ) (x=0)

− − − → enabled if x ∈ Y

Zone based verification of timed automata revisited - 35/45

slide-111
SLIDE 111

Detecting zero-checks (x = 0)

  • x := 0

(x = 0)

Problem: detect nodes where time can elapse Solution: each zero-check must be preceded by a reset Guessing zone graph (GZGa)

◮ Each node (q, Z, Y ) has a guess set Y ⊆ X ◮ (q, Z, Y ) x:=0

− − → (q′, Z ′, Y ∪ {x})

◮ (q, Z, Y ) (x=0)

− − − → enabled if x ∈ Y A node (q, Z, ∅) is clear for time elapse.

Zone based verification of timed automata revisited - 35/45

slide-112
SLIDE 112

Detecting zero-checks (x = 0)

  • x := 0

(x = 0)

Problem: detect nodes where time can elapse Solution: each zero-check must be preceded by a reset Guessing zone graph (GZGa)

◮ Each node (q, Z, Y ) has a guess set Y ⊆ X ◮ (q, Z, Y ) x:=0

− − → (q′, Z ′, Y ∪ {x})

◮ (q, Z, Y ) (x=0)

− − − → enabled if x ∈ Y

◮ (q, Z, Y ) τ

− → (q, Z, ∅), to forget guesses A node (q, Z, ∅) is clear for time elapse.

Zone based verification of timed automata revisited - 35/45

slide-113
SLIDE 113

Algorithm

Theorem A has a non-Zeno run iff there is an unblocked path in GZGa(A) with infinitely many nodes that have Y = ∅.

◮ Equivalent: find an SCC in GZGa(A) that has an

accepting node and a clear node, and that is unblocked

◮ Recall : blocking clocks can be detected in time

|GZGa(A)|.(|X| + 1)

Zone based verification of timed automata revisited - 36/45

slide-114
SLIDE 114

Size of GZGa(A)

2|X| more nodes in GZGa(A) than in ZGa(A) due to Y sets?

Zone based verification of timed automata revisited - 37/45

slide-115
SLIDE 115

Size of GZGa(A)

2|X| more nodes in GZGa(A) than in ZGa(A) due to Y sets? Theorem

◮ For each reachable node (q, Z), Z entails a total order

  • n X.

Zone based verification of timed automata revisited - 37/45

slide-116
SLIDE 116

Size of GZGa(A)

2|X| more nodes in GZGa(A) than in ZGa(A) due to Y sets? Theorem

◮ For each reachable node (q, Z), Z entails a total order

  • n X.

◮ Extraα preserves the order. ◮ Extra+ α preserves order on relevant clocks.

Zone based verification of timed automata revisited - 37/45

slide-117
SLIDE 117

Size of GZGa(A)

2|X| more nodes in GZGa(A) than in ZGa(A) due to Y sets? Theorem

◮ For each reachable node (q, Z), Z entails a total order

  • n X.

◮ Extraα preserves the order. ◮ Extra+ α preserves order on relevant clocks. ◮ Y respects this order.

For every (q, Z) only |X| + 1 guess sets.

Zone based verification of timed automata revisited - 37/45

slide-118
SLIDE 118

Size of GZGa(A)

2|X| more nodes in GZGa(A) than in ZGa(A) due to Y sets? Theorem

◮ For each reachable node (q, Z), Z entails a total order

  • n X.

◮ Extraα preserves the order. ◮ Extra+ α preserves order on relevant clocks. ◮ Y respects this order.

For every (q, Z) only |X| + 1 guess sets. Extra+

LU does not preserve order even on relevant clocks.

Zone based verification of timed automata revisited - 37/45

slide-119
SLIDE 119

Extra+

LU

Extra+

α

Extraα

Strongly non-Zeno Construction [TYB05] |ZGa(A)|.O(2|X|) Combinatorial blowup Polynomial algorithm |ZGa(A)|.O(|X|2) NP-complete Given A, ZGExtra+

LU

does A have a non-Zeno run?

Zone based verification of timed automata revisited - 38/45

slide-120
SLIDE 120

Benchmarks

A ZGa(A) ZGa(A′) GZGa(A) size size

  • tf

size

  • tf
  • pt

Train-Gate2 (mutex) 134 194 194 400 400 134 Train-Gate2 (bound. resp.) 988 227482 352 3840 1137 292 Train-Gate2 (liveness) 100 217 35 298 53 33 Fischer3 (mutex) 1837 3859 3859 7292 7292 1837 Fischer4 (mutex) 46129 96913 96913 229058 229058 46129 Fischer3 (liveness) 1315 4962 52 5222 64 40 Fischer4 (liveness) 33577 147167 223 166778 331 207 FDDI3 (liveness) 508 1305 44 3654 79 42 FDDI5 (liveness) 6006 15030 90 67819 169 88 FDDI3 (bound. resp.) 6252 41746 59 52242 114 60 CSMA/CD4 (collision) 4253 7588 7588 20146 20146 4253 CSMA/CD5 (collision) 45527 80776 80776 260026 260026 45527 CSMA/CD4 (liveness) 3038 9576 1480 14388 3075 832 CSMA/CD5 (liveness) 32751 120166 8437 186744 21038 4841 ◮ Combinatorial explosion may occur in practice ◮ Optimized use of GZG(A) gives best results

Zone based verification of timed automata revisited - 39/45

slide-121
SLIDE 121

What about existence of Zeno runs?

Problem : Given A, ZG a(A), does A have a Zeno run? Extra+

LU

Extra+

α

Extraα

Syntactic criterion

  • n A [GB07]

Sufficient only

Zone based verification of timed automata revisited - 40/45

slide-122
SLIDE 122

What about existence of Zeno runs?

Problem : Given A, ZG a(A), does A have a Zeno run? Extra+

LU

Extra+

α

Extraα

Syntactic criterion

  • n A [GB07]

Sufficient only Linear algorithm 2.|ZGa(A)| NP-complete

Zone based verification of timed automata revisited - 40/45

slide-123
SLIDE 123

Conclusion & Future work

◮ Reachability : Efficient implementation of non-convex

abstractions and on-the-fly learning of bounds

◮ Non-Zenoness :

◮ Combinatorial explosion due to strongly non-Zeno

construction

◮ An O(|ZG a(A)|.|X|2) algorithm for Extraα, Extra+

α and

NP-complete for Extra+

LU ◮ Zenoness : An O(|ZG a|) algorithm for Extraα, Extra+ α

and NP-complete for Extra+

LU

Zone based verification of timed automata revisited - 41/45

slide-124
SLIDE 124

Future work

◮ Propagating more than constants ◮ Computing non-Zeno strategies for timed games ◮ Automata with diagonal constraints

Zone based verification of timed automata revisited - 42/45

slide-125
SLIDE 125

Related papers

Using non-convex approximations for efficient analysis of timed automata with F. Herbreteau, D. Kini, I. Walukiewicz (FSTTCS 2011) Efficient emptiness check for timed B¨ uchi automata with F. Herbreteau, I. Walukiewicz (FMSD, CAV 2010 special issue) Efficient on-the-fly emptiness check for timed B¨ uchi automata with F. Herbreteau (ATVA 2010) Coarse abstractions make Zeno behaviours difficult to detect with F. Herbreteau (CONCUR 2010)

Zone based verification of timed automata revisited - 43/45

slide-126
SLIDE 126

Bibliography I

  • R. Alur and D.L. Dill.

A theory of timed automata. Theoretical Computer Science, 126(2):183–235, 1994.

  • R. Alur and P. Madhusudan.

Decision problems for timed automata: A survey. In SFM-RT’04, volume 3185 of LNCS, pages 1–24, 2004.

  • G. Behrmann, P. Bouyer, E. Fleury, and K. G. Larsen.

Static guard analysis in timed automata verification. In TACAS’03, volume 2619 of LNCS, pages 254–270. Springer, 2003.

  • G. Behrmann, P. Bouyer, K. G. Larsen, and R. Pelanek.

Lower and upper bounds in zone-based abstractions of timed automata.

  • Int. Journal on Software Tools for Technology Transfer, 8(3):204–215, 2006.
  • P. Bouyer.

Forward analysis of updatable timed automata.

  • Form. Methods in Syst. Des., 24(3):281–320, 2004.
  • C. Courcoubetis and M. Yannakakis.

Minimum and maximum delay problems in real-time systems.

  • Form. Methods Syst. Des., 1(4):385–415, 1992.
  • C. Daws and S. Tripakis.

Model checking of real-time reachability properties using abstractions. In TACAS’98, volume 1384 of LNCS, pages 313–329. Springer, 1998. Zone based verification of timed automata revisited - 44/45

slide-127
SLIDE 127

Bibliography II

  • R. G´
  • mez and H. Bowman.

Efficient detection of zeno runs in timed automata. In Proc. 5th Int. Conf. on Formal Modeling and Analysis of Timed Systems, FORMATS 2007, volume 4763

  • f LNCS, pages 195–210, 2007.

Guangyuan Li. Checking timed b¨ uchi automata emptiness using lu-abstractions. In Jo¨ el Ouaknine, editor, Formal modeling and analysis of timed systems. 7th Int. Conf. (FORMATS), volume 5813 of Lecture Notes in Computer Science, pages 228–242. Springer, 2009.

  • S. Tripakis.

Verifying progress in timed systems. In Proc. 5th Int. AMAST Workshop, ARTS’99, volume 1601 of LNCS, pages 299–314. Springer, 1999.

  • S. Tripakis.

Checking timed b¨ uchi emptiness on simulation graphs. ACM Transactions on Computational Logic, 10(3):??–??, 2009.

  • S. Tripakis, S. Yovine, and A. Bouajjani.

Checking timed b¨ uchi automata emptiness efficiently. Formal Methods in System Design, 26(3):267–292, 2005. Zone based verification of timed automata revisited - 45/45