• Tidak ada hasil yang ditemukan

Automata for Real-Time Systems

N/A
N/A
Protected

Academic year: 2024

Membagikan "Automata for Real-Time Systems"

Copied!
63
0
0

Teks penuh

(1)

Automata for Real-Time Systems

B. Srivathsan

Chennai Mathematical Institute

(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

(3)

Lecture 5:

A decidable case of the inclusion

problem

(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 one 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

(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 one 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

(6)

Step 0:

Well-quasi orders and Higman’s Lemma

(7)

Quasi-order

Given a setQ, aquasi-orderis areflexiveandtransitiverelation:

v ⊆ Q × Q

I (N,≤)

I (Z,≤)

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

I, lexicographic ordervL): AAAB vL AAB vL AB

I, prefix order⊆P): AB ⊆P ABA ⊆P ABAA

I, subword order4) HIGMAN 4HIGHMOUNTAIN [OW’05]

(8)

Well-quasi-order

An infinite sequencehq1,q2, . . .iin(Q,v)issaturatingif ∃i<j:qivqj

A quasi-ordervis awell-quasi-order (wqo)ifeveryinfinite sequence is saturating

I (N,≤)

I (Z,≤)

×

−1≥ −2≥ −3, . . .

I, lexicographic ordervL):

×

B wL ABwL AAB . . .

I, prefix order⊆P):

×

B, AB, AAB, . . .

I, subword order4)

?

(9)

Well-quasi-order

An infinite sequencehq1,q2, . . .iin(Q,v)issaturatingif ∃i<j:qivqj

A quasi-ordervis awell-quasi-order (wqo)ifeveryinfinite sequence is saturating

I (N,≤)√

I (Z,≤)

×

−1≥ −2≥ −3, . . .

I, lexicographic ordervL):

×

B wL ABwL AAB . . .

I, prefix order⊆P):

×

B, AB, AAB, . . .

I, subword order4)

?

(10)

Well-quasi-order

An infinite sequencehq1,q2, . . .iin(Q,v)issaturatingif ∃i<j:qivqj

A quasi-ordervis awell-quasi-order (wqo)ifeveryinfinite sequence is saturating

I (N,≤)√

I (Z,≤)

×

−1≥ −2≥ −3, . . .

I, lexicographic ordervL):

×

B wL ABwL AAB . . .

I, prefix order⊆P):

×

B, AB, AAB, . . .

I, subword order4)

?

(11)

Higman’s lemma

Letvbe a quasi-order onΛ

Define the inducedmonotone domination order4onΛas follows:

a1. . .am 4 b1. . .bn if there exists astrictly increasingfunction f :{1, . . . ,m} 7→ {1, . . . ,n}s.t

∀1≤i≤m: ai v bf(i)

Higman’52

Ifvis a wqo onΛ, then the induced monotone domination order4is a wqo onΛ

(12)

Higman’s lemma

Letvbe a quasi-order onΛ

Define the inducedmonotone domination order4onΛas follows:

a1. . .am 4 b1. . .bn if there exists astrictly increasingfunction f :{1, . . . ,m} 7→ {1, . . . ,n}s.t

∀1≤i≤m: ai v bf(i)

Higman’52

Ifvis a wqo onΛ, then the induced monotone domination order4is a wqo onΛ

(13)

Subword order

Λ := {A,B, . . . ,Z}

v := x v yifx = y

v is awqoas Λ isfinite

Induced monotone domination order4is the subword order HIGMAN 4HIGHMOUNTAIN

By Higman’s lemma,4is a wqo too

If we start writing aninfinite sequenceof words, we willeventually write down asuperwordof an earlier word in the sequence

(14)

Subword order

Λ := {A,B, . . . ,Z}

v := x v yifx = y v is awqoas Λ isfinite

Induced monotone domination order4is the subword order HIGMAN 4HIGHMOUNTAIN

By Higman’s lemma,4is a wqo too

If we start writing aninfinite sequenceof words, we willeventually write down asuperwordof an earlier word in the sequence

(15)

Subword order

Λ := {A,B, . . . ,Z}

v := x v yifx = y

v is awqoas Λ isfinite

Induced monotone domination order4is the subword order HIGMAN 4HIGHMOUNTAIN

By Higman’s lemma,4is a wqo too

If we start writing aninfinite sequenceof words, we willeventually write down asuperwordof an earlier word in the sequence

(16)

Subword order

Λ := {A,B, . . . ,Z}

v := x v yifx = y

v is awqoas Λ isfinite

Induced monotone domination order4is the subword order HIGMAN 4HIGHMOUNTAIN

By Higman’s lemma,4is a wqo too

If we start writing aninfinite sequenceof words, we willeventually write down asuperwordof an earlier word in the sequence

(17)

Step 1:

A naive procedure for universality of one-clock

TA

(18)

Terminology

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

I Location: q0,q1,· · · ∈Q

I State: (q,u)whereu∈R≥0gives value of the clock

I Configuration: finiteset of states

{(q1,2.3),(q0,0)}

q0 q1

x<1,a

{x}

1x3,Σ

x2,b

(19)

Terminology

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

I Location: q0,q1,· · · ∈Q

I State: (q,u)whereu∈R≥0gives value of the clock

I Configuration: finiteset of states{(q1,2.3),(q0,0)}

q0 q1

x<1,a

{x}

1x3,Σ

x2,b

(20)

Transition between configurations:

{(q0,0)} −−−→0.2,a

{(q1,0.2)} −−−→ {(q2.1,b 1,2.3),(q0,0)}. . .

q0 q1

x<1,a

{x}

1x3,Σ

x2,b

C1 −−→δ,a C2if

C2={(q2,u2)| ∃(q1,u1)∈C1s. t.(q1,u1) −−→δ,a (q2,u2)}

(21)

Transition between configurations:

{(q0,0)} −−−→ {(q0.2,a 1,0.2)}

2.1,b

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

q0 q1

x<1,a

{x}

1x3,Σ

x2,b

C1 −−→δ,a C2if

C2={(q2,u2)| ∃(q1,u1)∈C1s. t.(q1,u1) −−→δ,a (q2,u2)}

(22)

Transition between configurations:

{(q0,0)} −−−→ {(q0.2,a 1,0.2)} −−−→2.1,b

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

q0 q1

x<1,a

{x}

1x3,Σ

x2,b

C1 −−→δ,a C2if

C2={(q2,u2)| ∃(q1,u1)∈C1s. t.(q1,u1) −−→δ,a (q2,u2)}

(23)

Transition between configurations:

{(q0,0)} −−−→ {(q0.2,a 1,0.2)} −−−→ {(q2.1,b 1,2.3),(q0,0)}. . .

q0 q1

x<1,a

{x}

1x3,Σ

x2,b

C1 −−→δ,a C2if

C2={(q2,u2)| ∃(q1,u1)∈C1s. t.(q1,u1) −−→δ,a (q2,u2)}

(24)

Transition between configurations:

{(q0,0)} −−−→ {(q0.2,a 1,0.2)} −−−→ {(q2.1,b 1,2.3),(q0,0)}. . .

q0 q1

x<1,a

{x}

1x3,Σ

x2,b

C1 −−→δ,a C2if

C2={(q2,u2)| ∃(q1,u1)∈C1s. t.(q1,u1) −−→δ,a (q2,u2)}

(25)

Labeled transition system ofconfigurations

...

...

0.4,a 3.6,b

. . .

. . . . . . . . .

Bad:all locationsnon-accepting

Is abadconfigurationreachablefrom someinitialconfiguration?

(26)

Labeled transition system ofconfigurations

...

...

0.4,a 3.6,b

. . .

. . . . . . . . .

Bad:all locationsnon-accepting

Is abadconfigurationreachablefrom someinitialconfiguration?

(27)

Labeled transition system ofconfigurations

...

...

0.4,a 3.6,b

. . .

. . . . . . . . .

Bad:all locationsnon-accepting

(28)

...

...

. . .

. . . . . . . . .

Need to handle two dimensions of infinity!

(29)

...

...

. . .

. . . . . . . . .

abstraction byequivalence∼

C1 C2

C1∼C2iff:

(30)

...

...

. . .

. . . . . . . . .

finitedominationorder4

C1

C2

C14C2iff:

C2goes to abadconfig ⇒ C1goes to abadconfig. too

No needto exploreC2!

(31)

...

...

. . .

. . . . . . . . .

finitedominationorder4

C1

C2

C14C2iff:

C2goes to abadconfig ⇒ C1goes to abadconfig. too

(32)

Step 2:

The equivalence

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

(33)

Equivalent configurations: Examples

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

q0

q0

. . .

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

C1 C2

q0 q1

x>1,Σ Σ

C2is universal, butC1rejects(a,0)

(34)

Equivalent configurations: Examples

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

q0

q0

. . .

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

C1 C2

q0 x>1,Σ q1 Σ

C2is universal, butC1rejects(a,0)

(35)

q0

q0

. . .

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

q0

q0

. . .

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

(36)

q0

q0

. . .

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

0.7 1.2

1.8 0.3

C1 C2

q0 q1

x<1x>2,Σ Σ

C2is universal, butC1rejects(a,0.5)

(37)

q0

q0

. . .

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

0.7 1.2

1.8 0.3

C1 C2

q0 q1

x<1x>2,Σ Σ

C2is universal, butC1rejects(a,0.5)

(38)

LetKbe the largest constant appearing inA DefineREG={r0,r10,r1, . . . ,rK,rK }

0

r0

1

r1 r10

2

r2 r12

K

rK rK

· · ·

C={(q1,0.0),(q1,0.3),(q1,1.2),(q2,1.0),(q3,0.8),(q3,1.3)} {(q1,r0,0),(q1,r01,0.3),(q1,r12,0.2),(q2,r1,0),(q3,r01,0.8),(q3,r12,0.3)} {(q1,r0,0),(q2,r1,0)} {(q1,r21,0.2)} {(q1,r10,0.3)(q3,r12,0.3)} {(q3,r01,0.8)}

H(C) ={(q1,r0),(q2,r1)} {(q1,r12)} {(q1,r01)(q3,r12)} {(q3,r01)}

(39)

LetKbe the largest constant appearing inA DefineREG={r0,r10,r1, . . . ,rK,rK }

0

r0

1

r1 r10

2

r2 r12

K

rK rK

· · ·

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

{(q1,r0,0),(q1,r01,0.3),(q1,r12,0.2),(q2,r1,0),(q3,r01,0.8),(q3,r12,0.3)} {(q1,r0,0),(q2,r1,0)} {(q1,r21,0.2)} {(q1,r10,0.3)(q3,r12,0.3)} {(q3,r01,0.8)}

H(C) ={(q1,r0),(q2,r1)} {(q1,r12)} {(q1,r01)(q3,r12)} {(q3,r01)}

(40)

LetKbe the largest constant appearing inA DefineREG={r0,r10,r1, . . . ,rK,rK }

0

r0

1

r1 r10

2

r2 r12

K

rK rK

· · ·

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

{(q1,r0,0),(q1,r01,0.3),(q1,r12,0.2),(q2,r1,0),(q3,r01,0.8),(q3,r12,0.3)}

{(q1,r0,0),(q2,r1,0)} {(q1,r21,0.2)} {(q1,r10,0.3)(q3,r12,0.3)} {(q3,r01,0.8)} H(C) ={(q1,r0),(q2,r1)} {(q1,r12)} {(q1,r01)(q3,r12)} {(q3,r01)}

(41)

LetKbe the largest constant appearing inA DefineREG={r0,r10,r1, . . . ,rK,rK }

0

r0

1

r1 r10

2

r2 r12

K

rK rK

· · ·

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

{(q1,r0,0),(q1,r01,0.3),(q1,r12,0.2),(q2,r1,0),(q3,r01,0.8),(q3,r12,0.3)}

{(q1,r0,0),(q2,r1,0)} {(q1,r21,0.2)} {(q1,r10,0.3)(q3,r12,0.3)} {(q3,r01,0.8)}

H(C) ={(q1,r0),(q2,r1)} {(q1,r12)} {(q1,r01)(q3,r12)} {(q3,r01)}

(42)

LetKbe the largest constant appearing inA DefineREG={r0,r10,r1, . . . ,rK,rK }

0

r0

1

r1 r10

2

r2 r12

K

rK rK

· · ·

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

{(q1,r0,0),(q1,r01,0.3),(q1,r12,0.2),(q2,r1,0),(q3,r01,0.8),(q3,r12,0.3)}

{(q1,r0,0),(q2,r1,0)} {(q1,r21,0.2)} {(q1,r10,0.3)(q3,r12,0.3)} {(q3,r01,0.8)}

H(C) ={(q1,r0),(q2,r1)} {(q1,r12)} {(q1,r01)(q3,r12)} {(q3,r01)}

(43)

LetKbe the largest constant appearing inA REG:={r0,r10,r1, . . . ,rK,rK}

Λ :=P(Q×REG)

We can give H:C7→Λ that remembers:

I integralpart of the clock value (moduloK) in each state ofC,

I orderoffractionalparts of the clock among different states inC

(44)

Equivalence

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

It can be shown that∼is abisimulation

C1goes to abadconfig. ⇔ C2goes to abadconfig.

(45)

Equivalence

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

It can be shown that∼is abisimulation

C1goes to abadconfig. ⇔ C2goes to abadconfig.

(46)

...

...

. . .

. . . . . . . . .

abstraction byequivalence∼

C1 C2

C1∼C2iff:

(47)

Step 3:

The domination order

(48)

...

...

. . .

. . . . . . . . .

finitedominationorder4

C1

C2

C14C2iff:

(49)

Look atH(C1)andH(C2), the words overΛ Λ =P(Q×REG)

Let⊆be theinclusion(quasi-)order onΛ

Consider the induced monotone domination order4overΛ

{(q0,r0)} {(q1,r10),(q0,r23)}

4

{(q0,r0),(q1,r1)} {(q2,r23)} {(q1,r01),(q0,r23),(q2,r21)} Theorem:IfH(C1)4H(C2), then∃C20 ⊆C2s.t.C1∼C2

⊆is a wqo asΛisfinite. Therefore,4is awqodue toHigman’s lemma

(50)

Look atH(C1)andH(C2), the words overΛ Λ =P(Q×REG)

Let⊆be theinclusion(quasi-)order onΛ

Consider the induced monotone domination order4overΛ

{(q0,r0)} {(q1,r10),(q0,r23)}

4

{(q0,r0),(q1,r1)} {(q2,r23)} {(q1,r01),(q0,r23),(q2,r21)} Theorem:IfH(C1)4H(C2), then∃C20 ⊆C2s.t.C1∼C2

⊆is a wqo asΛisfinite. Therefore,4is awqodue toHigman’s lemma

(51)

Look atH(C1)andH(C2), the words overΛ Λ =P(Q×REG)

Let⊆be theinclusion(quasi-)order onΛ

Consider the induced monotone domination order4overΛ

{(q0,r0)} {(q1,r01),(q0,r23)}

4

{(q0,r0),(q1,r1)} {(q2,r23)} {(q1,r01),(q0,r23),(q2,r21)}

Theorem:IfH(C1)4H(C2), then∃C20 ⊆C2s.t.C1∼C2

⊆is a wqo asΛisfinite. Therefore,4is awqodue toHigman’s lemma

(52)

Look atH(C1)andH(C2), the words overΛ Λ =P(Q×REG)

Let⊆be theinclusion(quasi-)order onΛ

Consider the induced monotone domination order4overΛ

{(q0,r0)} {(q1,r01),(q0,r23)}

4

{(q0,r0),(q1,r1)} {(q2,r23)} {(q1,r01),(q0,r23),(q2,r21)}

Theorem:IfH(C1)4H(C2), then∃C20 ⊆C2s.t.C1∼C2

⊆is a wqo asΛisfinite. Therefore,4is awqodue toHigman’s lemma

(53)

Look atH(C1)andH(C2), the words overΛ Λ =P(Q×REG)

Let⊆be theinclusion(quasi-)order onΛ

Consider the induced monotone domination order4overΛ

{(q0,r0)} {(q1,r01),(q0,r23)}

4

{(q0,r0),(q1,r1)} {(q2,r23)} {(q1,r01),(q0,r23),(q2,r21)}

Theorem:IfH(C1)4H(C2), then∃C20 ⊆C2s.t.C1∼C2

⊆is a wqo asΛisfinite. Therefore,4is awqodue toHigman’s lemma

(54)

Final algorithm

I

Start from H (C

0

), where C

0

is the initial configuration

I

Successor computation is effective

I

Termination guaranteed as domination order is wqo

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

(55)

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?

(56)

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?

(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?

(58)

Two clocks

State: (q,u,v)

Configuration:{(q1,u1,v1),(q2,u2,v2), . . . ,(qn,un,vn)}

At theleast, the following should be remembered while abstracting:

I relative ordering between fractional parts ofx

I relative ordering between fractional parts ofy

Currentencoding can rememberonly oneof them

(59)

Other encodings possible?

Consider some domination order4

C164C2if for allC20 ⊆C2:

I either relative order of clockxdoes not match

I or relative order of clockydoes not match

In the next slide:No wqopossible!

(60)

An infinite non-saturating sequence C

1

, C

2

, C

3

, . . .

x y

C3

x y

C4

x y

C5

(61)

An infinite non-saturating sequence C

1

, C

2

, C

3

, . . .

x y

C3 x

y

C4

x y

C5

(62)

An infinite non-saturating sequence C

1

, C

2

, C

3

, . . .

x y

C3 x

y

C4

x y

(63)

Conclusion

I

An algorithm for universality when A has one clock

I

Can be extended for L(B) ⊆ L(A) when A has one-clock

Referensi

Dokumen terkait