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/33 Let T denote the set of all timed words L ( A ) = T ? Universality: Given A , is Inclusion: Given A , B , is L ( B ) L ( A ) ? Universality and


slide-1
SLIDE 1

Automata for Real-Time Systems

  • B. Srivathsan

Chennai Mathematical Institute

1/33

slide-2
SLIDE 2

Let TΣ∗ denote the set of all timed words Universality: Given A, is L(A) = TΣ∗ ? Inclusion: Given A, B, is L(B) ⊆ L(A) ? Universality and inclusion are undecidable when A has two clocks or more

A theory of timed automata

Alur and Dill. TCS’94 2/33

slide-3
SLIDE 3

A decidable case of the inclusion problem

3/33

slide-4
SLIDE 4

Universality: Given A, is L(A) = TΣ∗ ? Inclusion: Given A, B, is L(B) ⊆ L(A) ? One-clock restriction Universality and inclusion are decidable when A has at most

  • ne clock

On the language inclusion problem for timed automata: Closing a decidability gap

Ouaknine and Worrell. LICS’05 4/33

slide-5
SLIDE 5

Universality: Given A, is L(A) = TΣ∗ ? Inclusion: Given A, B, is L(B) ⊆ L(A) ? One-clock restriction Universality and inclusion are decidable when A has at most

  • ne clock

On the language inclusion problem for timed automata: Closing a decidability gap

Ouaknine and Worrell. LICS’05

In this lecture: universality for one clock TA

4/33

slide-6
SLIDE 6

Step 0: Well-quasi orders and Higman’s Lemma

5/33

slide-7
SLIDE 7

Quasi-order

Given a set Q, a quasi-order is a reflexive and transitive relation: ⊑ ⊆ Q × Q

◮ (N, ≤) ◮ (Z, ≤)

Let Λ = {A, B, . . . , Z}, Λ∗ = {set of words}

◮ (Λ∗, lexicographic order ⊑L):

AAAB ⊑L AAB ⊑L AB

◮ (Λ∗, prefix order ⊆P):

AB ⊆P ABA ⊆P ABAA

◮ (Λ∗, subword order ) HIGMAN HIGHMOUNTAIN [OW’05]

6/33

slide-8
SLIDE 8

Well-quasi-order

An infinite sequence q1, q2, . . . in (Q, ⊑) is saturating if ∃ i < j : qi ⊑ qj A quasi-order ⊑ is a well-quasi-order (wqo) if every infinite sequence is saturating

◮ (N, ≤) ◮ (Z, ≤) ◮ (Λ∗, lexicographic order ⊑L): ◮ (Λ∗, prefix order ⊆P): ◮ (Λ∗, subword order )

7/33

slide-9
SLIDE 9

Well-quasi-order

An infinite sequence q1, q2, . . . in (Q, ⊑) is saturating if ∃ i < j : qi ⊑ qj A quasi-order ⊑ is a well-quasi-order (wqo) if every infinite sequence is saturating

◮ (N, ≤) √ ◮ (Z, ≤) × −1 ≥ −2 ≥ −3, . . . ◮ (Λ∗, lexicographic order ⊑L): × B ⊒L AB ⊒L AAB . . . ◮ (Λ∗, prefix order ⊆P): × B, AB, AAB, . . . ◮ (Λ∗, subword order )

7/33

slide-10
SLIDE 10

Well-quasi-order

An infinite sequence q1, q2, . . . in (Q, ⊑) is saturating if ∃ i < j : qi ⊑ qj A quasi-order ⊑ is a well-quasi-order (wqo) if every infinite sequence is saturating

◮ (N, ≤) √ ◮ (Z, ≤) × −1 ≥ −2 ≥ −3, . . . ◮ (Λ∗, lexicographic order ⊑L): × B ⊒L AB ⊒L AAB . . . ◮ (Λ∗, prefix order ⊆P): × B, AB, AAB, . . . ◮ (Λ∗, subword order ) ?

7/33

slide-11
SLIDE 11

Higman’s lemma

Let ⊑ be a quasi-order on Λ Define the induced monotone domination order on Λ∗ as follows: a1 . . . am b1 . . . bn if there exists a strictly increasing function f : {1, . . . , m} → {1, . . . , n} s.t ∀ 1 ≤ i ≤ m : ai ⊑ bf (i)

8/33

slide-12
SLIDE 12

Higman’s lemma

Let ⊑ be a quasi-order on Λ Define the induced monotone domination order on Λ∗ as follows: a1 . . . am b1 . . . bn if there exists a strictly increasing function f : {1, . . . , m} → {1, . . . , n} s.t ∀ 1 ≤ i ≤ m : ai ⊑ bf (i) Higman’52 If ⊑ is a wqo on Λ, then the induced monotone domination order is a wqo on Λ∗

8/33

slide-13
SLIDE 13

Subword order

Λ := {A, B, . . . , Z} ⊑ := x ⊑ y if x = y

9/33

slide-14
SLIDE 14

Subword order

Λ := {A, B, . . . , Z} ⊑ := x ⊑ y if x = y ⊑ is a wqo as Λ is finite

9/33

slide-15
SLIDE 15

Subword order

Λ := {A, B, . . . , Z} ⊑ := x ⊑ y if x = y ⊑ is a wqo as Λ is finite Induced monotone domination order is the subword order HIGMAN HIGHMOUNTAIN

9/33

slide-16
SLIDE 16

Subword order

Λ := {A, B, . . . , Z} ⊑ := x ⊑ y if x = y ⊑ is a wqo as Λ is finite Induced monotone domination order is the subword order HIGMAN HIGHMOUNTAIN By Higman’s lemma, is a wqo too If we start writing an infinite sequence of words, we will eventually write down a superword of an earlier word in the sequence

9/33

slide-17
SLIDE 17

Step 1: A naive procedure for universality of one-clock TA

10/33

slide-18
SLIDE 18

Terminology

Let A = (Q, Σ, Q0, {x}, T, F) be a timed automaton with one clock

◮ Location:

q0, q1, · · · ∈ Q

◮ State:

(q, u) where u ∈ R≥0 gives value of the clock

◮ Configuration:

finite set of states q0 q1

x < 1, a {x} 1 ≤ x ≤ 3, Σ x ≥ 2, b

11/33

slide-19
SLIDE 19

Terminology

Let A = (Q, Σ, Q0, {x}, T, F) be a timed automaton with one clock

◮ Location:

q0, q1, · · · ∈ Q

◮ State:

(q, u) where u ∈ R≥0 gives value of the clock

◮ Configuration:

finite set of states {(q1, 2.3), (q0, 0)} q0 q1

x < 1, a {x} 1 ≤ x ≤ 3, Σ x ≥ 2, b

11/33

slide-20
SLIDE 20

Transition between configurations: {(q0, 0)}

0.2, a

− − − → q0 q1

x < 1, a {x} 1 ≤ x ≤ 3, Σ x ≥ 2, b

12/33

slide-21
SLIDE 21

Transition between configurations: {(q0, 0)}

0.2, a

− − − → {(q1, 0.2)} q0 q1

x < 1, a {x} 1 ≤ x ≤ 3, Σ x ≥ 2, b

12/33

slide-22
SLIDE 22

Transition between configurations: {(q0, 0)}

0.2, a

− − − → {(q1, 0.2)}

2.1, b

− − − → q0 q1

x < 1, a {x} 1 ≤ x ≤ 3, Σ x ≥ 2, b

12/33

slide-23
SLIDE 23

Transition between configurations: {(q0, 0)}

0.2, a

− − − → {(q1, 0.2)}

2.1, b

− − − → {(q1, 2.3), (q0, 0)} . . . q0 q1

x < 1, a {x} 1 ≤ x ≤ 3, Σ x ≥ 2, b

12/33

slide-24
SLIDE 24

Transition between configurations: {(q0, 0)}

0.2, a

− − − → {(q1, 0.2)}

2.1, b

− − − → {(q1, 2.3), (q0, 0)} . . . q0 q1

x < 1, a {x} 1 ≤ x ≤ 3, Σ x ≥ 2, b

C1

δ, a

− − → C2 if C2 = { (q2, u2) | ∃(q1, u1) ∈ C1 s. t. (q1, u1)

δ, a

− − → (q2, u2)}

12/33

slide-25
SLIDE 25

Labeled transition system of configurations

. . . . . .

0.4, a 3.6, b

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

13/33

slide-26
SLIDE 26

Labeled transition system of configurations

. . . . . .

0.4, a 3.6, b

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

Bad: all locations non-accepting

13/33

slide-27
SLIDE 27

Labeled transition system of configurations

. . . . . .

0.4, a 3.6, b

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

Bad: all locations non-accepting Is a bad configuration reachable from some initial configuration?

13/33

slide-28
SLIDE 28

. . . . . . . . . . . . . . . . . . Need to handle two dimensions of infinity!

14/33

slide-29
SLIDE 29

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

abstraction by equivalence ∼

C1 C2

C1 ∼ C2 iff: C1 goes to a bad config. ⇔ C2 goes to a bad config.

15/33

slide-30
SLIDE 30

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

finite domination order

C1 C2

C1 C2 iff: C2 goes to a bad config ⇒ C1 goes to a bad config. too

16/33

slide-31
SLIDE 31

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

finite domination order

C1 C2

C1 C2 iff: C2 goes to a bad config ⇒ C1 goes to a bad config. too No need to explore C2!

16/33

slide-32
SLIDE 32

Step 2: The equivalence

Credits: Examples in this part taken from one of Ouaknine’s talks

17/33

slide-33
SLIDE 33

Equivalent configurations: Examples

C1 = {(q0, 0.5)} ≁ C2 = {(q0, 1.3)} q0 q0

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

C1 C2

18/33

slide-34
SLIDE 34

Equivalent configurations: Examples

C1 = {(q0, 0.5)} ≁ C2 = {(q0, 1.3)} q0 q0

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

C1 C2 q0 q1 x > 1, Σ Σ C2 is universal, but C1 rejects (a, 0)

18/33

slide-35
SLIDE 35

q0 q0

. . . . . . . . . . . . . . . . . . ∼

q0 q0

. . . . . . . . . . . . . . . . . . ∼

19/33

slide-36
SLIDE 36

q0 q0

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

0.7 1.2 1.8 0.3

C1 C2

20/33

slide-37
SLIDE 37

q0 q0

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

0.7 1.2 1.8 0.3

C1 C2 q0 q1

x < 1 ∨ x > 2, Σ Σ

C2 is universal, but C1 rejects (a, 0.5)

20/33

slide-38
SLIDE 38

Let K be the largest constant appearing in A Define REG = {r0, r1

0, r1, . . . , rK, r∞ K }

r0

1

r1 r1

2

r2 r2

1

K

rK r∞

K

· · ·

21/33

slide-39
SLIDE 39

Let K be the largest constant appearing in A Define REG = {r0, r1

0, r1, . . . , rK, r∞ K }

r0

1

r1 r1

2

r2 r2

1

K

rK r∞

K

· · ·

C = {(q1, 0.0), (q1, 0.3), (q1, 1.2), (q2, 1.0), (q3, 0.8), (q3, 1.3)}

21/33

slide-40
SLIDE 40

Let K be the largest constant appearing in A Define REG = {r0, r1

0, r1, . . . , rK, r∞ K }

r0

1

r1 r1

2

r2 r2

1

K

rK r∞

K

· · ·

C = {(q1, 0.0), (q1, 0.3), (q1, 1.2), (q2, 1.0), (q3, 0.8), (q3, 1.3)} {(q1, r0, 0), (q1, r1

0, 0.3), (q1, r2 1, 0.2), (q2, r1, 0), (q3, r1 0, 0.8), (q3, r2 1, 0.3)}

21/33

slide-41
SLIDE 41

Let K be the largest constant appearing in A Define REG = {r0, r1

0, r1, . . . , rK, r∞ K }

r0

1

r1 r1

2

r2 r2

1

K

rK r∞

K

· · ·

C = {(q1, 0.0), (q1, 0.3), (q1, 1.2), (q2, 1.0), (q3, 0.8), (q3, 1.3)} {(q1, r0, 0), (q1, r1

0, 0.3), (q1, r2 1, 0.2), (q2, r1, 0), (q3, r1 0, 0.8), (q3, r2 1, 0.3)}

{(q1, r0, 0), (q2, r1, 0)} {(q1, r2

1, 0.2)} {(q1, r1 0, 0.3)(q3, r2 1, 0.3)} {(q3, r1 0, 0.8)}

21/33

slide-42
SLIDE 42

Let K be the largest constant appearing in A Define REG = {r0, r1

0, r1, . . . , rK, r∞ K }

r0

1

r1 r1

2

r2 r2

1

K

rK r∞

K

· · ·

C = {(q1, 0.0), (q1, 0.3), (q1, 1.2), (q2, 1.0), (q3, 0.8), (q3, 1.3)} {(q1, r0, 0), (q1, r1

0, 0.3), (q1, r2 1, 0.2), (q2, r1, 0), (q3, r1 0, 0.8), (q3, r2 1, 0.3)}

{(q1, r0, 0), (q2, r1, 0)} {(q1, r2

1, 0.2)} {(q1, r1 0, 0.3)(q3, r2 1, 0.3)} {(q3, r1 0, 0.8)}

H(C) = {(q1, r0), (q2, r1)} {(q1, r2

1)} {(q1, r1 0)(q3, r2 1)} {(q3, r1 0)}

21/33

slide-43
SLIDE 43

Let K be the largest constant appearing in A REG := {r0, r1

0, r1, . . . , rK, r∞ K }

Λ := P( Q × REG ) We can give H : C → Λ∗ that remembers:

◮ integral part of the clock value (modulo K) in each state of C, ◮ order of fractional parts of the clock among different states in C

22/33

slide-44
SLIDE 44

Equivalence

C1 ∼ C2 if H(C1) = H(C2)

23/33

slide-45
SLIDE 45

Equivalence

C1 ∼ C2 if H(C1) = H(C2) It can be shown that ∼ is a bisimulation C1 goes to a bad config. ⇔ C2 goes to a bad config.

23/33

slide-46
SLIDE 46

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

abstraction by equivalence ∼

C1 C2

C1 ∼ C2 iff: C1 goes to a bad config. ⇔ C2 goes to a bad config.

24/33

slide-47
SLIDE 47

Step 3: The domination order

25/33

slide-48
SLIDE 48

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

finite domination order

C1 C2

C1 C2 iff: C2 goes to a bad config ⇒ C1 goes to a bad config. too

26/33

slide-49
SLIDE 49

Look at H(C1) and H(C2), the words over Λ∗ Λ = P( Q × REG )

27/33

slide-50
SLIDE 50

Look at H(C1) and H(C2), the words over Λ∗ Λ = P( Q × REG ) Let ⊆ be the inclusion (quasi-)order on Λ

27/33

slide-51
SLIDE 51

Look at H(C1) and H(C2), the words over Λ∗ Λ = P( Q × REG ) Let ⊆ be the inclusion (quasi-)order on Λ Consider the induced monotone domination order over Λ∗ {(q0, r0)} {(q1, r1

0), (q0, r3 2)}

  • {(q0, r0), (q1, r1)} {(q2, r3

2)} {(q1, r1 0), (q0, r3 2), (q2, r2 1)}

27/33

slide-52
SLIDE 52

Look at H(C1) and H(C2), the words over Λ∗ Λ = P( Q × REG ) Let ⊆ be the inclusion (quasi-)order on Λ Consider the induced monotone domination order over Λ∗ {(q0, r0)} {(q1, r1

0), (q0, r3 2)}

  • {(q0, r0), (q1, r1)} {(q2, r3

2)} {(q1, r1 0), (q0, r3 2), (q2, r2 1)}

Theorem: If H(C1) H(C2), then ∃C′

2 ⊆ C2 s.t. C1 ∼ C2

27/33

slide-53
SLIDE 53

Look at H(C1) and H(C2), the words over Λ∗ Λ = P( Q × REG ) Let ⊆ be the inclusion (quasi-)order on Λ Consider the induced monotone domination order over Λ∗ {(q0, r0)} {(q1, r1

0), (q0, r3 2)}

  • {(q0, r0), (q1, r1)} {(q2, r3

2)} {(q1, r1 0), (q0, r3 2), (q2, r2 1)}

Theorem: If H(C1) H(C2), then ∃C′

2 ⊆ C2 s.t. C1 ∼ C2

⊆ is a wqo as Λ is finite. Therefore, is a wqo due to Higman’s lemma

27/33

slide-54
SLIDE 54

Final algorithm

◮ Start from H(C0), where C0 is the initial configuration ◮ Successor computation is effective ◮ Termination guaranteed as domination order is wqo

A is universal iff the algorithm does not reach a bad node

28/33

slide-55
SLIDE 55

One-clock Universality is decidable for one-clock timed automata

29/33

slide-56
SLIDE 56

One-clock Universality is decidable for one-clock timed automata For two clocks, we know universality is undecidable

29/33

slide-57
SLIDE 57

One-clock Universality is decidable for one-clock timed automata For two clocks, we know universality is undecidable Where does this algorithm go wrong when A has two clocks?

29/33

slide-58
SLIDE 58

Two clocks

State: (q, u, v) Configuration: {(q1, u1, v1), (q2, u2, v2), . . . , (qn, un, vn)} At the least, the following should be remembered while abstracting:

◮ relative ordering between fractional parts of x ◮ relative ordering between fractional parts of y

Current encoding can remember only one of them

30/33

slide-59
SLIDE 59

Other encodings possible?

Consider some domination order C1 C2 if for all C′

2 ⊆ C2:

◮ either relative order of clock x does not match ◮ or relative order of clock y does not match

In the next slide: No wqo possible!

31/33

slide-60
SLIDE 60

An infinite non-saturating sequence C1, C2, C3, . . .

x y C3

32/33

slide-61
SLIDE 61

An infinite non-saturating sequence C1, C2, C3, . . .

x y C3 x y C4

32/33

slide-62
SLIDE 62

An infinite non-saturating sequence C1, C2, C3, . . .

x y C3 x y C4 x y C5

32/33

slide-63
SLIDE 63

Conclusion

◮ An algorithm for universality when A has one clock ◮ Can be extended for L(B) ⊆ L(A) when A has one-clock

33/33