Automata for Real-time Systems B. Srivathsan Chennai Mathematical - - PowerPoint PPT Presentation

automata for real time systems
SMART_READER_LITE
LIVE PREVIEW

Automata for Real-time Systems B. Srivathsan Chennai Mathematical - - PowerPoint PPT Presentation

Automata for Real-time Systems B. Srivathsan Chennai Mathematical Institute 1/22 Lecture 15: Better abstractions through better constants 2/22 Reachability problem { x } y > 5 q 2 q 0 q 1 x 2 Given a TA, does there exist a run to a


slide-1
SLIDE 1

Automata for Real-time Systems

  • B. Srivathsan

Chennai Mathematical Institute

1/22

slide-2
SLIDE 2

Lecture 15: Better abstractions through better constants

2/22

slide-3
SLIDE 3

Reachability problem

q0 q1 q2

{x} x ≤ 2 y > 5

Given a TA, does there exist a run to a final state? Main challenge: infinite behaviour of timed automata

3/22

slide-4
SLIDE 4

· · · · · · · · · · · · · · · · · ·

(q0, 0, 0) (q1, 0, 0) (q1, 0, 1.3) (q1, 0, 10.9) (q1, 0, 100) (q0, 0, 1.3) (q0, 2, 3.3) · · · (q2, 3.75, 5.05) (q2, 12, 13.3)

. . . . . . . . . . . . . . . . . .

100 1.3 10.9 2 1.75 10

4/22

slide-5
SLIDE 5

Abstraction

◮ Forget unnecessary information ◮ Retain essential information

Aim: Get a finite abstraction, as small as possible

5/22

slide-6
SLIDE 6

Abstraction

◮ Forget unnecessary information ◮ Retain essential information

Aim: Get a finite abstraction, as small as possible Regions

[AD94]

5/22

slide-7
SLIDE 7

Maximal bounds: M : X → N ∪ {−∞}

1 2 3 4 5 1 2 3 4 ◮ Forget:

Exact clock values

◮ Retain:

  • 1. Integral values upto max
  • 2. Relative ordering of fractional values for clocks less than max

6/22

slide-8
SLIDE 8

(q0, 0 = x = y) (q1, 0 = x = y) (q1, 0 = x ∧ 0 < y < 1) (q1, 0 = x ∧ y > 5) (q0, 0 < x < y < 1) (q0, 0 < x < 1 ∧ y = 1) (q0, x = 2 ∧ 2 < y < 3) (q2, x > 2 ∧ y > 5)

· · · · · ·

If X is set of clocks, O(|X|! M|X|) many regions!

7/22

slide-9
SLIDE 9

Abstraction

◮ Forget unnecessary information ◮ Retain essential information

Aim: Get a finite abstraction, as small as possible Regions Zones

[AD94] [DT98]

8/22

slide-10
SLIDE 10

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

9/22

slide-11
SLIDE 11

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

9/22

slide-12
SLIDE 12

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

9/22

slide-13
SLIDE 13

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

9/22

slide-14
SLIDE 14

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

9/22

slide-15
SLIDE 15

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

9/22

slide-16
SLIDE 16

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

9/22

slide-17
SLIDE 17

q0 q1 q2 q3

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

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

9/22

slide-18
SLIDE 18

q0 q1 q2 q3

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

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

◮ Forget:

Exact times taken along a run

◮ Retain:

Sequence of discrete transitions

9/22

slide-19
SLIDE 19

q0 : (0 ≤ x = y) q2 : (5 < x = y) q1 : (0 ≤ x ≤ y) q0 : (0 ≤ x ≤ y) q2 : (0 ≤ x ≤ y, y > 5)

y > 5 {x} y > 5 x ≤ 2 {x}

But the zone graph could be infinite

10/22

slide-20
SLIDE 20

q0 q1 (y = 1), {y} {x, y}

11/22

slide-21
SLIDE 21

q0 q1 (y = 1), {y} {x, y}

(q0, x − y = 0)

11/22

slide-22
SLIDE 22

q0 q1 (y = 1), {y} {x, y}

(q0, x − y = 0) (q1, x − y = 0)

11/22

slide-23
SLIDE 23

q0 q1 (y = 1), {y} {x, y}

(q0, x − y = 0) (q1, x − y = 0) (q1, x − y = 1)

11/22

slide-24
SLIDE 24

q0 q1 (y = 1), {y} {x, y}

(q0, x − y = 0) (q1, x − y = 0) (q1, x − y = 1) (q1, x − y = 2)

. . .

11/22

slide-25
SLIDE 25

Abstraction

◮ Forget unnecessary information ◮ Retain essential information

Aim: Get a finite abstraction, as small as possible Regions Zones Zones + abstraction function

[AD94] [DT98] [DT98] [BBLP06] [HSW12]

12/22

slide-26
SLIDE 26

Abstraction functions

Non-convex Convex

aLU ClosureM Extra+

M

Extra+

LU

ExtraLU ExtraM

13/22

slide-27
SLIDE 27

Abstraction functions

Non-convex Convex

aLU ClosureM Extra+

M

Extra+

LU

ExtraLU ExtraM In our course: ClosureM

13/22

slide-28
SLIDE 28

q0 q1 (y = 1), {y} {x, y} M(x) = −∞ M(y) = 1

14/22

slide-29
SLIDE 29

q0 q1 (y = 1), {y} {x, y} M(x) = −∞ M(y) = 1

14/22

slide-30
SLIDE 30

q0 q1 (y = 1), {y} {x, y} M(x) = −∞ M(y) = 1

(q0, x − y = 0) (q1, x − y = 0) (q1, x − y = 1)

x − y = 1 ⊆ ClosureM(x − y = 0)

14/22

slide-31
SLIDE 31

q0 q1 (y = 1), {y} {x, y} M(x) = −∞ M(y) = 1

(q0, x − y = 0) (q1, x − y = 0) (q1, x − y = 1)

x − y = 1 ⊆ ClosureM(x − y = 0) Using Closure

  • 1. Z ⊆ ClosureM(Z′) can be done efficiently [HKSW11]

(seen last class)

  • 2. Given M, ClosureM is optimal [HSW12]

(proof not needed)

14/22

slide-32
SLIDE 32

Reachability algorithm:

◮ Compute zones ◮ Use Z ⊆ ClosureM(Z′) for termination ◮ Given M, ClosureM is optimal

15/22

slide-33
SLIDE 33

Reachability algorithm:

◮ Compute zones ◮ Use Z ⊆ ClosureM(Z′) for termination ◮ Given M, ClosureM is optimal

Coming next: get better M bounds!

15/22

slide-34
SLIDE 34

q0 q1 q2

(y = 1), {y} {x} x ≥ 106 x y M(x) = 106 M(y) = 1

. . .

16/22

slide-35
SLIDE 35

q0 q1 q2

(y = 1), {y} {x} x ≥ 106 x y M(x) = 106 M(y) = 1

. . .

(q0, x − y = 0) (q0, x − y = 1) (q0, x − y = 2) (q0, x − y = 106 + 1) (q0, x − y = 106 + 2) (q1, 0 ≤ x ≤ y) (q2, 106 ≤ x ≤ y)

. . .

More than 106 nodes unnecessary

16/22

slide-36
SLIDE 36

q − → q1 − → . . . qi − − →

{x} qi+1 −

→ . . . − → qn

x≥c

− − → q′ Constant c is not relevant for x at q

17/22

slide-37
SLIDE 37

Static guard analysis [BBFL03], [UPPAAL]

Key idea: Bounds for every q of the automaton

q0 q1 q2

(y = 1), {y} {x} x ≥ 106 M0(x) = −∞ M0(y) = 1 M1(x) = 106 M1(y) = −∞

18/22

slide-38
SLIDE 38

Static guard analysis [BBFL03], [UPPAAL]

Key idea: Bounds for every q of the automaton

q0 q1 q2

(y = 1), {y} {x} x ≥ 106 M0(x) = −∞ M0(y) = 1 M1(x) = 106 M1(y) = −∞

(q0, x − y = 0) (q0, x − y = 1) (q1, 0 ≤ x ≤ y) (q2, 106 ≤ x ≤ y) 18/22

slide-39
SLIDE 39

More details about static guard analysis on the board

19/22

slide-40
SLIDE 40

Abstraction

◮ Forget unnecessary information ◮ Retain essential information

Aim: Get a finite abstraction, as small as possible Regions Zones Zones + abstraction function

[AD94] [DT98] [DT98] [BBLP06] [HSW12]

+ better abstraction parameters [BBFL03, HSW13]

20/22

slide-41
SLIDE 41

Experiments

Model

  • nb. of

UPPAAL (-C) Better abst. clocks nodes sec. nodes sec. CSMA/CD 10 11 120845 1.9 51210 4.0 CSMA/CD 11 12 311310 5.4 123915 10.2 CSMA/CD 12 13 786447 14.8 294924 25.2 FDDI 50 151 12605 52.9 401 0.8 FDDI 70 211 561 2.7 FDDI 140 421 1121 40.6 Fischer 9 9 135485 2.4 135485 14.8 Fischer 10 10 447598 10.1 447598 56.8 Fischer 11 11 1464971 40.4 Stari 2 7 7870 0.1 4305 0.4 Stari 3 10 136632 1.7 43269 4.5 Stari 4 13 1323193 26.2 296982 41.5 ◮ UPPAAL (-C) shows results from UPPAAL tool which uses static analysis bounds and convex abstraction Extra+

LU

◮ Better abst. shows results from the paper [HSW13] that uses non convex abstraction aLU and a generalization of static guard analysis ◮ Time out (150s), Memory out (1Gb)

21/22

slide-42
SLIDE 42

References I

  • R. Alur and D.L. Dill.

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

  • 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.
  • 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.

  • F. Herbreteau, D. Kini, B. Srivathsan, and I. Walukiewicz.

Using non-convex approximations for efficient analysis of timed automata. In Proceedings of FSTTCS, volume 13 of LIPIcs, pages 78–89. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2011.

  • F. Herbreteau, B. Srivathsan, and I. Walukiewicz.

Better abstractions for timed automata. In LICS, 2012.

  • F. Herbreteau, B. Srivathsan, and I. Walukiewicz.

Computer aided verification - 25th international conference, cav 2013, saint petersburg, russia, july 13-19, 2013. proceedings. In CAV, volume 8044 of Lecture Notes in Computer Science. Springer, 2013. 22/22