23.08.2013 Views

An on-the-fly tableau construction for a real-time temporal logic

An on-the-fly tableau construction for a real-time temporal logic

An on-the-fly tableau construction for a real-time temporal logic

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<str<strong>on</strong>g>An</str<strong>on</strong>g> <strong>on</strong>-<strong>the</strong>-<strong>fly</strong> <strong>tableau</strong> c<strong>on</strong>structi<strong>on</strong> <strong>for</strong> a<br />

<strong>real</strong>-<strong>time</strong> <strong>temporal</strong> <strong>logic</strong><br />

Marc Geilen<br />

In<strong>for</strong>mati<strong>on</strong> and Communicati<strong>on</strong> Systems Group<br />

Faculty of Electrical Engineering<br />

Eindhoven University of Technology<br />

P.O.Box 513, 5600 MB Eindhoven<br />

The Ne<strong>the</strong>rlands<br />

E-mail: M.C.W.Geilen@tue.nl<br />

November 29, 2001


Overview<br />

1. Introducti<strong>on</strong><br />

2. Modelling Timed Systems<br />

3. Real-Time Temporal Logic<br />

4. Efficient Tableau C<strong>on</strong>structi<strong>on</strong>s<br />

5. C<strong>on</strong>clusi<strong>on</strong>s<br />

A 1


1. Introducti<strong>on</strong>: Real-<strong>time</strong> Systems<br />

• Real-<strong>time</strong> systems must adhere to<br />

quantitative timing c<strong>on</strong>straints<br />

• Embedded systems, c<strong>on</strong>trol systems,<br />

etcetera<br />

• Hard <strong>real</strong>-<strong>time</strong>, soft <strong>real</strong>-<strong>time</strong><br />

A 2


1. Introducti<strong>on</strong>: LTL Model-checking<br />

System<br />

S<br />

Büchi Automat<strong>on</strong><br />

A S<br />

Product Automat<strong>on</strong><br />

A S £A ¡<br />

• Automata-<strong>the</strong>oretic approach<br />

LTL Property<br />

'<br />

Büchi Automat<strong>on</strong><br />

A ¡<br />

S satisfies '<br />

iff<br />

L(A S )\L(A :' )=∅<br />

iff<br />

L(A S £A ' )=∅<br />

• Tableau c<strong>on</strong>structi<strong>on</strong> relates <strong>temporal</strong> <strong>logic</strong> and automata<br />

A 3


1. Introducti<strong>on</strong>: Related Work<br />

• This approach has not yet been applied to <strong>time</strong>d linear <strong>temporal</strong><br />

<strong>logic</strong>s<br />

• TCTL model-checking<br />

• ‘proof of c<strong>on</strong>cept’ <strong>tableau</strong> c<strong>on</strong>structi<strong>on</strong> by Alur<br />

No implementati<strong>on</strong>, not practical<br />

• Tools DT-Spin/UPPAAL/Kr<strong>on</strong>os use LTL model-checking or<br />

reachability analysis <strong>on</strong>ly<br />

A 4


1. Introducti<strong>on</strong>: Goals<br />

• Goal: an efficient <strong>tableau</strong> c<strong>on</strong>structi<strong>on</strong> <strong>for</strong> a (dense) <strong>time</strong> linear<br />

<strong>temporal</strong> <strong>logic</strong><br />

• Enabling <strong>the</strong> automata <strong>the</strong>oretic approach to <strong>time</strong>d <strong>temporal</strong> <strong>logic</strong><br />

model-checking<br />

• (Enabling <strong>the</strong> m<strong>on</strong>itoring of <strong>time</strong>d <strong>temporal</strong> <strong>logic</strong> properties during<br />

simulati<strong>on</strong>s)<br />

A 5


2. Modelling Timed Systems<br />

A 6


2. Labelled Transiti<strong>on</strong> Systems<br />

F G F G<br />

F G<br />

F G<br />

System can be viewed as LTS (or Kripke structure)<br />

Set Prop of observable (boolean) propositi<strong>on</strong>s (p, q)<br />

F G<br />

Observable states are subsets of Prop.<br />

A 7<br />

F G<br />

F G<br />

F G


2. Exploring a Labelled Transiti<strong>on</strong> System<br />

F G<br />

F G F G<br />

F G<br />

The (linear) view <strong>on</strong> behaviour of <strong>the</strong> system is a path through <strong>the</strong> LTS.<br />

A trace ¯σ ∈ (2 Prop ) ω is an infinite sequence of states<br />

A 8<br />

F G<br />

F G<br />

F G<br />

F G


2. Timed Transiti<strong>on</strong> Systems<br />

F <br />

G<br />

F G<br />

F G<br />

N #<br />

F G<br />

N F G<br />

For quantitative timing aspects, <strong>the</strong> LTS is augmented with <strong>time</strong>rs to<br />

express c<strong>on</strong>straints <strong>on</strong> <strong>the</strong> timing of a run.<br />

A<br />

We use interval automata to model such systems<br />

9<br />

F G<br />

N #<br />

F G<br />

F G


3. Real-Time Temporal Logic<br />

A 10


3. Linear Temporal Logic<br />

To specify properties of reactive systems, <strong>on</strong>e often uses LTL <strong>for</strong>mulas<br />

(in positive <strong>for</strong>m, p ∈ Prop):<br />

ϕ ::= true | false | p | ¬p | ϕ1 ∨ ϕ2 | ϕ1 ∧ ϕ2 | ○ ϕ | ϕ1Uϕ2 | ϕ1Vϕ2.<br />

LTL <strong>for</strong>mulas are interpreted <strong>on</strong> infinite traces in <strong>the</strong> standard way<br />

A 11


3. Real-<strong>time</strong> Temporal Logic<br />

To deal with quantitative timing requirements, <strong>temporal</strong> <strong>logic</strong>s are<br />

extended.<br />

The un<strong>time</strong>d Until operator ϕ1Uϕ2 states that some<strong>time</strong> in <strong>the</strong> future, ϕ2<br />

must hold, but cannot express hard c<strong>on</strong>straints <strong>on</strong> that moment.<br />

The extended operator ϕ1UIϕ2 adds an interval I that denotes that <strong>the</strong><br />

occurrence of ϕ2 must be within I.<br />

A 12


3. Model-checking of Timed Systems<br />

Timed System<br />

S<br />

Timed Automat<strong>on</strong><br />

A S<br />

Product Automat<strong>on</strong><br />

A S £A ¡<br />

MITL Property<br />

'<br />

Timed Automat<strong>on</strong><br />

A ¡<br />

S satisfies '<br />

iff<br />

L(A S )\L(A :' )=∅<br />

iff<br />

L(A S £A ' )=∅<br />

Tableau procedure <strong>for</strong> <strong>real</strong>-<strong>time</strong> <strong>temporal</strong> <strong>logic</strong> is required.<br />

Must be efficient to make model-checking feasible in practice.<br />

⇒ On-<strong>the</strong>-<strong>fly</strong> c<strong>on</strong>structi<strong>on</strong><br />

A 13


3. Real-<strong>time</strong> Temporal Logic<br />

To specify properties, we use MITL≤ <strong>for</strong>mulas (in positive <strong>for</strong>m)<br />

(p ∈ Prop):<br />

ϕ ::= true | false | p | ¬p | ϕ1 ∨ ϕ2 | ϕ1 ∧ ϕ2 | ○ ϕ | ϕ1UIϕ2 | ϕ1VIϕ2.<br />

Let’s keep it simple!<br />

I is an interval of <strong>the</strong> <strong>for</strong>m [0, d] with d some integer.<br />

MITL≤ <strong>for</strong>mulas are interpreted <strong>on</strong> <strong>time</strong>d state sequences.<br />

¯ρ = (I0I1I2 . . . ,σ0σ1σ2 . . . )<br />

A 14


4. Efficient Tableau C<strong>on</strong>structi<strong>on</strong>s<br />

A 15


4. On-<strong>the</strong>-<strong>fly</strong> <strong>tableau</strong> c<strong>on</strong>structi<strong>on</strong><br />

<br />

<br />

<br />

<br />

• Separating now and <strong>the</strong> <strong>the</strong> future<br />

• Disjunctive <strong>for</strong>m mapped to n<strong>on</strong>deterministic<br />

choice<br />

• Normal <strong>for</strong>m<br />

ϕ = (Π1 ∧ ○Φ1) ∨ (Π2 ∧ ○Φ2) ∨ . . .<br />

• Rewriting procedure NF<br />

E.g. pUq ≡ q ∨ (p ∧ ○pUq)<br />

ϕ1 ∧ (ϕ2 ∨ ϕ3) ≡ (ϕ1 ∧ ϕ2) ∨ (ϕ1 ∧<br />

ϕ3)<br />

A 16


4. On-<strong>the</strong>-<strong>fly</strong> <strong>tableau</strong> c<strong>on</strong>structi<strong>on</strong><br />

pUq<br />

q<br />

p<br />

°pUq<br />

true<br />

• E.g.<br />

pUq ≡ q(∧ ○ true) ∨ (p ∧ ○pUq)<br />

• true ≡ true ∧ ○true<br />

• incremental / <strong>on</strong>-<strong>the</strong>-<strong>fly</strong><br />

A 17


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

To obtain a similar normal <strong>for</strong>m <strong>for</strong> <strong>time</strong>d <strong>temporal</strong> <strong>logic</strong> we extend <strong>the</strong><br />

<strong>logic</strong> with <strong>time</strong>rs.<br />

ψ ::= ϕ | TS.ψ | x > 0 | x ≥ 0 | x < 0 | x ≤ 0 |<br />

○ψ | ϕ1U≤xϕ2 | ϕ1U≤x+ɛϕ2 | ϕ1V≤xϕ2 | ϕ1V


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

• Unfolding<br />

ϕ1U≤xϕ2 ≡ ϕ2 ∨ (x > 0 ∧ ϕ1 ∧ ○ϕ1U≤xϕ2<br />

ϕ1V≤yϕ2 ≡ y ≤ 0 ∨ (ϕ2 ∧ (ϕ1 ∨ ○ϕ1V≤yϕ2))<br />

(but what does ○ mean in dense <strong>time</strong>?)<br />

• We cannot create a new <strong>time</strong>r every <strong>time</strong> we must check a <strong>time</strong>d<br />

sub<strong>for</strong>mula<br />

ϕ1U≤dϕ2 ∧ ϕ1U≤xϕ2 ≡ ϕ1U≤xϕ2 (if x ≤ d)<br />

A 19


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

x:=5<br />

pU ≤5 q<br />

q<br />

p<br />

x>0<br />

pU≤5q ≡ q ∨ {x := 5}.(p ∧ x > 0∧<br />

○pU≤xq)<br />

A 20


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

x:=5<br />

pU ≤5 q<br />

pU ≤x q<br />

q<br />

p<br />

x>0<br />

pU≤5q ≡ q ∨ {x := 5}.(p ∧ x > 0∧<br />

○pU≤xq)<br />

pU≤xq ≡ q ∨ (p ∧ x > 0 ∧ ○pU≤xq)<br />

A 21


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

TS 1<br />

TS 2<br />

TS 3<br />

'<br />

¦ 1<br />

¥ 1<br />

¦ 2<br />

¥ 2<br />

¦ k<br />

¥ k<br />

© 2<br />

• Normal <strong>for</strong>m<br />

ϕ = (Π1 ∧ Ξ1 ∧ ○Φ1)∨<br />

(Π2 ∧ Ξ2 ∧ ○Φ2) ∨ . . .<br />

• Propositi<strong>on</strong>al part Πi<br />

• Timer C<strong>on</strong>diti<strong>on</strong>s Ξi<br />

• Future part Φi<br />

A 22


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

Two similar <strong>time</strong>d state sequences . . .<br />

[<br />

0 2<br />

4<br />

[<br />

:p<br />

:p<br />

:p<br />

0 2<br />

4<br />

A 23<br />

:p<br />

](<br />

)[<br />

p<br />

p


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

Looking at <strong>the</strong> <strong>for</strong>mula ♦≤2p . . .<br />

[<br />

0 2<br />

4<br />

[<br />

: ≤ p<br />

:p<br />

: ≤ p<br />

:p<br />

](<br />

)[<br />

≤ p<br />

:p<br />

0 2<br />

4<br />

A 24<br />

≤ p<br />

:p<br />

](<br />

)[<br />

p<br />

p


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

Checking <strong>the</strong> <strong>for</strong>mula using <strong>time</strong>rs . . .<br />

[<br />

0 2<br />

4<br />

[<br />

: ≤£ p<br />

:p<br />

: ≤ ¡ p<br />

:p<br />

¤ :=¥<br />

](<br />

¢ :=£<br />

)[<br />

≤ ¡ ¢ p<br />

≤£ p<br />

:p<br />

≤ p<br />

≤ ¡ p<br />

:p<br />

0 2<br />

4<br />

♦≤2p s ⇒ {x := 2}.♦≤xp ♦≤2p o ⇒ {x := 2}.♦≤x+ɛp<br />

A 25<br />

](<br />

)[<br />

p<br />

p


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

As <strong>the</strong> type of interval transiti<strong>on</strong> influences <strong>the</strong> c<strong>on</strong>straints to be verified.<br />

It is c<strong>on</strong>trolled by en<strong>for</strong>cing alternati<strong>on</strong> of open and singular intervals.<br />

x:=0 x:=0<br />

x=0<br />

t 0 ) {t 0 } (t 0 ,<br />

t 0<br />

open<br />

singular<br />

x=0<br />

t 1 ) {t 1 } (t 1<br />

A 26<br />

t 1


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

⇒ Two sets of normal <strong>for</strong>m rewrite rules!<br />

Normal <strong>for</strong>m procedure NFs<br />

Normal <strong>for</strong>m procedure NFo<br />

¯ρ |=ν NFs(ψ) iff ¯ρ |=ν ψ<br />

¯ρ t |=ν NFo(ψ) iff ¯ρ t |=ν ψ <strong>for</strong> all t in <strong>the</strong> first open interval<br />

A 27


4. Real-<strong>time</strong> On-<strong>the</strong>-<strong>fly</strong> Tableaux<br />

TS 1<br />

TS 2<br />

TS 3<br />

singular<br />

¢<br />

¢<br />

¢<br />

£<br />

£<br />

£<br />

1<br />

1<br />

2<br />

2<br />

k<br />

k<br />

TS a<br />

TS b<br />

§ ¨©<br />

open<br />

¢<br />

¡<br />

¢<br />

£<br />

£<br />

¢¥¤<br />

£¦¤<br />

2<br />

a<br />

a<br />

b<br />

b<br />

singular<br />

A 28<br />

¡<br />

b


4. The Tableau Algorithm<br />

L0 := {((s, Now, Next), TS(¯0)) | (TS, Now, Next) ∈ NFs({ϕ})}<br />

LNew := {(s, Now, Next) | ((s, Now, Next), TS) ∈ L0 }<br />

L := ∅, E := ∅<br />

while LNew = ∅ do<br />

Let (it, Now, Next) ∈ LNew<br />

LNew := LNew\{(it, Now, Next)}<br />

L := L ∪ {(it, Now, Next)}<br />

<strong>for</strong> every (TS ′ , Now ′ , Next ′ ) ∈ NF it (Next) do<br />

E := E ∪ {((it, Now, Next), TS ′ , (it, Now ′ , Next ′ ))}<br />

if (it, Now ′ , Next ′ ) /∈ L <strong>the</strong>n<br />

LNew := LNew ∪ {(it, Now ′ , Next ′ )}<br />

od<br />

od<br />

A 29


4. Example<br />

Tableau automat<strong>on</strong> of <strong>the</strong> <strong>for</strong>mula ≤100♦≤5p<br />

<br />

<br />

©<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

¥ <br />

<br />

¦ § ¡¢¤¨ ¥ ¥ ¡¢¤£<br />

0 §<br />

<br />

¥ §<br />

<br />

¥<br />

<br />

<br />

¥ §<br />

<br />

¥ §<br />

<br />

¥<br />

§ ¥<br />

<br />

<br />

<br />

¥ ¦<br />

§ ¥<br />

<br />

<br />

¥ §<br />

¥ §<br />

singular<br />

open<br />

sing.+open<br />

A 30


5. O<strong>the</strong>r Issues and C<strong>on</strong>clusi<strong>on</strong>s<br />

A 31


5. C<strong>on</strong>structing M<strong>on</strong>itors <strong>for</strong> Run<strong>time</strong><br />

Verificati<strong>on</strong><br />

• Deterministic and incremental<br />

• On-<strong>the</strong>-<strong>fly</strong> determinisati<strong>on</strong><br />

• Localise updates (stutter-closed <strong>for</strong>mulas)<br />

• Instrumenting programs and models<br />

• Specificati<strong>on</strong> language <strong>for</strong> properties and<br />

atomic propositi<strong>on</strong>s<br />

A 32


5. Optimising <strong>the</strong> <strong>tableau</strong>x<br />

Results can still be optimised<br />

• Joining locati<strong>on</strong>s <strong>for</strong> open and singular intervals<br />

• Using techniques applied to LTL <strong>tableau</strong>x<br />

– Rewriting <strong>for</strong>mulas be<strong>for</strong>e c<strong>on</strong>structi<strong>on</strong><br />

– Optimising automata after c<strong>on</strong>structi<strong>on</strong><br />

– Identify equivalent locati<strong>on</strong>s<br />

A 33


5. C<strong>on</strong>clusi<strong>on</strong>s and Future Work<br />

• On-<strong>the</strong>-<strong>fly</strong> <strong>tableau</strong> c<strong>on</strong>structi<strong>on</strong> <strong>for</strong> a linear <strong>real</strong>-<strong>time</strong> <strong>temporal</strong> <strong>logic</strong><br />

• Weakly m<strong>on</strong>ot<strong>on</strong>e <strong>time</strong><br />

• Observers <strong>for</strong> simulati<strong>on</strong>s<br />

• Implementati<strong>on</strong><br />

A 34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!