Nested Timed Automata Guoqiang Li Shanghai Jiao Tong University - - PowerPoint PPT Presentation

nested timed automata
SMART_READER_LITE
LIVE PREVIEW

Nested Timed Automata Guoqiang Li Shanghai Jiao Tong University - - PowerPoint PPT Presentation

Nested Timed Automata Guoqiang Li Shanghai Jiao Tong University Feb. 9, 2014 Guoqiang LI | Feb. 9, 2014 1 / 32 Joint work with Xiaojuan Cai, Mizuhito Ogawa and Shoji Yuen. Guoqiang LI | Feb. 9, 2014 2 / 32 Motivation Hybrid automata extend


slide-1
SLIDE 1

Nested Timed Automata

Guoqiang Li

Shanghai Jiao Tong University

  • Feb. 9, 2014

Guoqiang LI | Feb. 9, 2014 1 / 32

slide-2
SLIDE 2

Joint work with Xiaojuan Cai, Mizuhito Ogawa and Shoji Yuen.

Guoqiang LI | Feb. 9, 2014 2 / 32

slide-3
SLIDE 3

Motivation

Hybrid automata extend timed automata with various rates of clocks; We would like to extend timed automata with (time-sensitive) context switches. (Recursive) Procedure calls Multi-level interrupt handlings Need to deal with ’local’ clocks.

Guoqiang LI | Feb. 9, 2014 3 / 32

slide-4
SLIDE 4

A Usual Automata-Based Program Analysis

int lek = 10; Foo() int x, y; . . . if x > y then Foo(); . . .

Guoqiang LI | Feb. 9, 2014 4 / 32

slide-5
SLIDE 5

A Usual Automata-Based Program Analysis

int lek = 10; Foo() int x, y; . . . if x > y then Foo(); . . .

pc, lekA,

. . . ⇓

pc′, lekA,

(Foo, xA, yA)

. . .

Guoqiang LI | Feb. 9, 2014 4 / 32

slide-6
SLIDE 6

Procedure with Local Clocks

Tfoo() { clock x, y; . . . reset(y); . . . if x < 10 && y <= 5 then Tfoo(); else return; . . . }

Guoqiang LI | Feb. 9, 2014 5 / 32

slide-7
SLIDE 7

Multilevel (Nested) Interrupts

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-8
SLIDE 8

Multilevel (Nested) Interrupts

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-9
SLIDE 9

Multilevel (Nested) Interrupts

Interrupt handlers override the behavior by Ai.

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3 Handler1:A1 clocks : C1

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-10
SLIDE 10

Multilevel (Nested) Interrupts

Interrupt handlers override the behavior by Ai.

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3 Handler1:A1 clocks : C1 Handler2:A2 Clocks : C2

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-11
SLIDE 11

Multilevel (Nested) Interrupts

Interrupt handlers override the behavior by Ai.

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3 Handler1:A1 clocks : C1 Handler2:A2 Clocks : C2 Handler3:A3 Clocks : C3

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-12
SLIDE 12

Multilevel (Nested) Interrupts

The behavior is resumed after the handlers terminate.

Clock values of C2 are changed.

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3 Handler1:A1 clocks : C1 Handler2:T2 C2 + T3

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-13
SLIDE 13

Multilevel (Nested) Interrupts

The behavior is resumed after the handlers terminate.

Clock values of C1 are changed.

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3 Handler1:A1 C1 + T2 + T3

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-14
SLIDE 14

Multilevel (Nested) Interrupts

The behavior is resumed after the handlers terminate.

task1 task2 . . . taskn IRQ1 IRQ2 IRQ3

Guoqiang LI | Feb. 9, 2014 6 / 32

slide-15
SLIDE 15

Behavioral Model

A nested timed automaton is a pushdown system whose stack symbols are timed automata. It either behaves as the top TA in the stack, or switches from one TA to another by pushing, popping, and altering the top TA. When time passage happens, all clocks of these TAs in the stack elapse uniformly.

Guoqiang LI | Feb. 9, 2014 7 / 32

slide-16
SLIDE 16

Contents

Timed Automata Nested timed automata (NeTA) State reachability is decidable via translation into DTPDA (dense timed pushdown automata [Abdulla et.al. LICS2012]) Correctness of the translation. Conclusion

Guoqiang LI | Feb. 9, 2014 8 / 32

slide-17
SLIDE 17

Timed Automata (TA)

A = (Q, q0, F, X, ∆), where Q is a finite set of control locations, with the initial location q0 ∈ Q, F ⊆ Q is the set of final locations, X is a finite set of clocks, ∆ ⊆ Q × O × Q, where O is a set of operations. A transition q1

φ

− → q2, where φ is either of Local ǫ, Test x ∈ I?, Assignment x ← I. Clock updates, Diagnal-free and convex constraints, No invariants

Guoqiang LI | Feb. 9, 2014 9 / 32

slide-18
SLIDE 18

Timed Automata (TA) [An Example]

x ← [0, 4.5] x ∈ (0, 8]? x ← [0, 6.5] x ∈ (8, +∞)? y ← [0, 0] y ∈ (0, 20]? x ∈ ( 2 , + ∞ ) ? x ← [0, 0] x ∈ (0, 20]?

Guoqiang LI | Feb. 9, 2014 10 / 32

slide-19
SLIDE 19

NESTED TIMED AUTOMATA

Guoqiang LI | Feb. 9, 2014 11 / 32

slide-20
SLIDE 20

Nested Timed Automata

N = (T, A0, ∆), where T is a finite set of TA, with the initial timed automaton A0 ∈ T, ∆ ⊆ T × P × (T ∪ {ε}), where P = {push, pop, internal}. A rule (Ai, Φ, Aj) ∈ ∆ is written as Ai

Φ

− → Aj, where Push Ai

push

− − − → Aj, Pop Ai

pop

− − → ε, and Internal Ai

internal

− − − − → Aj.

Guoqiang LI | Feb. 9, 2014 12 / 32

slide-21
SLIDE 21

Semantics of NeTA

Given an NeTA (T, A0, ∆), a configuration is a stack, and the stack alphabet is a tuple A, q, ν, The transition of NeTA is represented as follows: Progress transitions: c

t

− →N c + t. Discrete transitions: c

φ

− →N c′

Intra-action A, q, νc

φ

− →N A, q′, ν′c Push A, q, νc

push

− − − →N A′, q0(A′), ν′

0A, q, νc

Pop A, q, νc

pop

− − →N c if q ∈ F(A). Inter-action A, q, νc

internal

− − − − →N A′, q0(A′), ν′

0c if

q ∈ F(A).

Guoqiang LI | Feb. 9, 2014 13 / 32

slide-22
SLIDE 22

Nested Timed Automata [An Example]

q1 q1

1

x ← [0, 0] q1

r

x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-23
SLIDE 23

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 0

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-24
SLIDE 24

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 1.2

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-25
SLIDE 25

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 0

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-26
SLIDE 26

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 2.5

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-27
SLIDE 27

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 2.5 y = 0

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-28
SLIDE 28

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 2.5 y = 0

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-29
SLIDE 29

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 2.8 y = 0.3

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-30
SLIDE 30

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 3.5 y = 1

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-31
SLIDE 31

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 4.8 y = 2.3

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-32
SLIDE 32

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 pop x = 4.8

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-33
SLIDE 33

Nested Timed Automata [An Example]

q0 q1 x ← [0, 0] qr x ∈ (0, 4]? x ← [0, 0] idle idle y ← [0, 2] wt y ∈ (0, 5]? y ← [0, 2] internal push A0 A1 A2 x = 0

Guoqiang LI | Feb. 9, 2014 14 / 32

slide-34
SLIDE 34

TRANSLATION TO DTPDA

Guoqiang LI | Feb. 9, 2014 15 / 32

slide-35
SLIDE 35

Dense Timed PDA [Abdulla et.al. 2012]

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 2.5) (a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 κ1

push(d,(2,4])

− − − − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d,[4,6))

− − − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 16 / 32

slide-36
SLIDE 36

Dense Timed PDA [Abdulla et.al. 2012]

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3

(d, 2.5)

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 κ1

push(d, (2, 4])

− − − − − − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d,[4,6))

− − − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 16 / 32

slide-37
SLIDE 37

Dense Timed PDA [Abdulla et.al. 2012]

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 2.5) (a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 κ1

push(d,(2,4])

− − − − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d,[4,6))

− − − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 16 / 32

slide-38
SLIDE 38

Dense Timed PDA [Abdulla et.al. 2012]

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 2.5) (a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 κ1

push(d,(2,4])

− − − − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d,[4,6))

− − − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 16 / 32

slide-39
SLIDE 39

Dense Timed PDA [Abdulla et.al. 2012]

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 2.5) (a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 5.1) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9

(d, 5.1)

(a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 κ1

push(d,(2,4])

− − − − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d, [4, 6))

− − − − − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 16 / 32

slide-40
SLIDE 40

DTPDA

D = S, s0, Γ, C, ∆, where S is a finite set of states with the initial state s0 ∈ S, Γ is a finite stack alphabet, C is a finite set of clocks, and ∆ ⊆ S × O × S is a finite set of transitions. A transition s1

φ

− → s2, where φ is either of Local: ǫ Test: x ∈ I? Assignment: x ← I Push: push(γ, I) Pop: pop(γ, I)

Guoqiang LI | Feb. 9, 2014 17 / 32

slide-41
SLIDE 41

A Variation of DTPDA for Encoding NeTA

Push push(γ, I) pushes γ to the top of the stack, with the age in the interval I. Pop pop(γ, I) pops the top-most stack symbol provided that this symbol is γ and its age belongs to I. PushA push(γ, x) pushes γ to the stack associated with a local age with the value of the x’s value. PopA pop(γ, x) pops γ from a stack and assigns value of its local age to the global clock x.

Guoqiang LI | Feb. 9, 2014 18 / 32

slide-42
SLIDE 42

An Example of the DTPDA Variant

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 2.3) (a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 4.9) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9 (d, 4.9) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 4.9 x2 ← 3.8 x3 ← 4.9 κ1

push(d,x3)

− − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d,x1)

− − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 19 / 32

slide-43
SLIDE 43

An Example of the DTPDA Variant

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9

x3 ← 2.3

(d, 2.3)

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 4.9) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9 (d, 4.9) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 4.9 x2 ← 3.8 x3 ← 4.9 κ1

push(d, x3)

− − − − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d,x1)

− − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 19 / 32

slide-44
SLIDE 44

An Example of the DTPDA Variant

State: S = {•} clocks: C = {x1, x2, x3}, Stack symbols: Γ = {a, b, d}

(a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 2.3) (a, 1.9) (b, 6.7) (a, 3.1) (d, 4.2) x1 ← 0.5 x2 ← 3.9 x3 ← 2.3 (d, 4.9) (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 6.5 x3 ← 4.9

(d, 4.9)

(a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8) x1 ← 3.1 x2 ← 3.8 x3 ← 4.9 (a, 4.5) (b, 9.3) (a, 5.7) (d, 6.8)

x1 ← 4.9

x2 ← 3.8 x3 ← 4.9 κ1

push(d,x3)

− − − − − − − − →D κ2

2.6

− − − − − − − →D κ3

x2←(2,5]

− − − − − − − − →D κ4

pop(d, x1)

− − − − − − − − − →D κ5

Guoqiang LI | Feb. 9, 2014 19 / 32

slide-45
SLIDE 45

State Reachability of DTPDA

State reachability

s is reachabile if for some w′ and ν′, s0, w, ν→∗s, w′, ν′ where →= Local − − − → ∪ Test − − → ∪

Assignment

− − − − − − − → ∪ Push − − − → ∪

Pop

− − →

Theorem

The state reachability of DTPDA is decidable. [Abdulla et.al. LICS2012] Region construction by fractional parts of ages Rotation at poping with shadow variables consistency

Guoqiang LI | Feb. 9, 2014 20 / 32

slide-46
SLIDE 46

State Reachability of DTPDA Variant

State reachability

s is reachabile if for some w′ and ν′, s0, w, ν→∗s, w′, ν′ where →= Local − − − → ∪ Test − − → ∪

Assignment

− − − − − − − → ∪ Push − − − → ∪

Pop

− − → ∪

PushA

− − − − → ∪

PopA

− − − →

Theorem

The state reachability of DTPDA variant is decidable. Small modification to LICS2012 proof works for the variant. Another proof idea via WSPDS: [Cai et.al. 2013, 2014]

Guoqiang LI | Feb. 9, 2014 20 / 32

slide-47
SLIDE 47

Encoding to DTPDA Variant

Ai

push

− → Aj qi

push(qi ,d)

− − − − − − → pi,j

1 push(xi

1,xi 1)

− − − − − − − → · · · pi,j

mi push(xi

mi ,xi mi )

− − − − − − − − → pi,j

mi +1 ǫ

− → r j

1 xj

1←[0,0]

− − − − − − → r j

2 · · · r j mj +1 ǫ

− → tj

xj

1∈[0,0]?

− − − − − − → q0(Aj) Ai

pop

− → ǫ qi

ǫ

− → o

pop(xi

mi +1,xi mi +1)

− − − − − − − − − − − → · · ·

pop(xi

1,xi 1)

− − − − − − → o

pop(q,d)

− − − − − → q Ai

internal

− → Aj qi

ǫ

− → r j

1 xj

1←[0,0]

− − − − − − → r j

2 · · · r j mj +1 ǫ

− → tj

xj

1∈[0,0]?

− − − − − − → q0(Aj)

The key of the encoding is to synchronize the initial value of clocks, and Storing and restoring clocks values simultaneously when timed context switches.

Guoqiang LI | Feb. 9, 2014 21 / 32

slide-48
SLIDE 48

Encoding Push of NeTA to DTPDA

p1 p2

x1 ← 2.9 x2 ← 3.3

push

− − →N

q1 q2

y1 ← 0 y2 ← 0

p1 p2

x1 ← 2.9 x2 ← 3.3

Guoqiang LI | Feb. 9, 2014 22 / 32

slide-49
SLIDE 49

Encoding Push of NeTA to DTPDA

p2 x1 ← 2.9 x2 ← 3.3 y1 ← 4.1 y2 ← 0.5 push(p2, d) − − − − − − − − − − − →D p1,2

2

x1 ← 2.9 x2 ← 3.3 y1 ← 4.1 y2 ← 0.5 (p2, 0) push(x1, x1) − − − − − − − − − − − →D push(x2, x2) − − − − − − − − − − − →D r2

1

y1 ← 4.1 y2 ← 0.5 x1 ← 2.9 x2 ← 3.3 (x2, 3.3) (x1, 2.9) (p2, 0) y1 ← [0, 0] − − − − − − − − − − − →D r2

2

y1 ← 0 y2 ← 0.5 x1 ← 2.9 x2 ← 3.3 (x2, 3.3) (x1, 2.9) (p2, 0) y2 ← [0, 0] − − − − − − − − − − →D r2

3

y1 ← 0 y2 ← 0 x1 ← 2.9 x2 ← 3.3 (x2, 3.3) (x1, 2.9) (p2, 0) y1 ∈ [0, 0]? − − − − − − − − − − →D q1 y1 ← 0 y2 ← 0 x1 ← 2.9 x2 ← 3.3 (x2, 3.3) (x1, 2.9) (p2, 0)

Guoqiang LI | Feb. 9, 2014 22 / 32

slide-50
SLIDE 50

Correctness

Lemma

Given an NeTA N, its encoding E(N), and configurations c, c′ of N. (Preservation) if c − → c′, then c ֒ − →∗ c′; (Reflection) if c ֒ − →∗ κ,

1 there exists c′ such that κ = c′ and c − →∗ c′, or 2 κ is not an encoded configuration, and there exists c′ such that κ ֒ − →∗ c′ by discrete transitions and c − →∗ c′.

Guoqiang LI | Feb. 9, 2014 23 / 32

slide-51
SLIDE 51

Correctness

Lemma

Given an NeTA N, its encoding E(N), and configurations c, c′ of N. (Preservation) if c − → c′, then c ֒ − →∗ c′; (Reflection) if c ֒ − →∗ κ,

1 there exists c′ such that κ = c′ and c − →∗ c′, or 2 κ is not an encoded configuration, and there exists c′ such that κ ֒ − →∗ c′ by discrete transitions and c − →∗ c′.

Theorem

The state reachability problem of NeTA is decidable.

Guoqiang LI | Feb. 9, 2014 23 / 32

slide-52
SLIDE 52

DEADLINE ANALYSIS FOR MULTILEVEL INTERRUPT HANDLING

Guoqiang LI | Feb. 9, 2014 24 / 32

slide-53
SLIDE 53

Deadline Analysis

Interrupt handlers as guarded timed automata. Interrupt request as pushA operation. Return from interrupt as popA operation. Deadline violation as the reachability to err state.

Guoqiang LI | Feb. 9, 2014 25 / 32

slide-54
SLIDE 54

Timed Automata with Deadline

Add a stopwatch to check deadline and an error state

A B C x ← [0, 2] x ∈ (0, 7]? x ← [0, 2] x ∈ (7, +∞)?

⇒ Deadline =11

A B C

qerr

x ← [0, 2] xsch ∈ [0, 11]? x ∈ (0, 7]? xsch ∈ [0, 11]? x ← [0, 2] xsch ∈ [0, 11]? x ∈ (7, +∞)? x

s c h

∈ [ , 1 1 ] ? φ φ φ φ φ φ φ

φ = xsch ∈ (11, +∞)?

Fall into qerr when deadline passed.

Guoqiang LI | Feb. 9, 2014 26 / 32

slide-55
SLIDE 55

Deadline Analysis

Handleri : guard(Ai, di) guard(Ai, di) adds the deadline to A Interrupt : Ai

push

− − − → A| Ai may interrupt Aj Initial : A0 = Task1 || Task2 || · · · || Taskn Interrupt fails to be handled if qerr in some Ai(i > 0) is reachabile.

Guoqiang LI | Feb. 9, 2014 27 / 32

slide-56
SLIDE 56

Ongoing Work

Three kinds of clocks: global clocks, local clocks and stopwatch clocks. Reachability problems of pushdown systems under respective kind of clocks are decidable, however:

Guoqiang LI | Feb. 9, 2014 28 / 32

slide-57
SLIDE 57

Ongoing Work

Three kinds of clocks: global clocks, local clocks and stopwatch clocks. Reachability problems of pushdown systems under respective kind of clocks are decidable, however:

Under global and stopwatch clocks: Undecidable [Benerecetti et.al, 2010]

Guoqiang LI | Feb. 9, 2014 28 / 32

slide-58
SLIDE 58

Ongoing Work

Three kinds of clocks: global clocks, local clocks and stopwatch clocks. Reachability problems of pushdown systems under respective kind of clocks are decidable, however:

Under global and stopwatch clocks: Undecidable [Benerecetti et.al, 2010] Under global and local clocks: Decidable [Li et. al., 2014] Under local and stopwatch clocks: ???

Guoqiang LI | Feb. 9, 2014 28 / 32

slide-59
SLIDE 59

Ongoing Work

Three kinds of clocks: global clocks, local clocks and stopwatch clocks. Reachability problems of pushdown systems under respective kind of clocks are decidable, however:

Under global and stopwatch clocks: Undecidable [Benerecetti et.al, 2010] Under global and local clocks: Decidable [Li et. al., 2014] Under local and stopwatch clocks: ???

Reachability problem of NeTA with invariant is positive.

Guoqiang LI | Feb. 9, 2014 28 / 32

slide-60
SLIDE 60

Future Implementation

Develop a tool based on a restrictive class such that a pop action

  • ccurs only with an integer-valued age.

This subclass can be encoded into UTPDA (without local age). Encode UTPDA to weighted pushdown system to gain the efficiency.

Guoqiang LI | Feb. 9, 2014 29 / 32

slide-61
SLIDE 61

Related Work

Timed PDA [Bouajjani et. al.,1994] PDA with Global clocks Timed recursive state machines [Benerecetti et.al, 2010] Extended PDA with two stacks for states and clocks Recursive timed automata [Trivedi et.al., 2010] Local clocks stop Hierarchical timed automata [David et.al., 2001] Static hierarchy

Guoqiang LI | Feb. 9, 2014 30 / 32

slide-62
SLIDE 62

Conclusion

An NeTA is a pushdown system with a finite set of TA as stack symbols. All clocks in the stack elapse uniformly. The state reachability is decidable by encoding to DTPDA with an extension of local clock assignment.

Guoqiang LI | Feb. 9, 2014 31 / 32

slide-63
SLIDE 63

Thank you!

li.g@sjtu.edu.cn

Guoqiang LI | Feb. 9, 2014 32 / 32