indian institute of technology bombaymanasa/phd_seminar_pres.pdf · created date: 12/1/2008...

54
Model Checking Weighted Timed Automata Lakshmi Manasa.G Roll Number: 08405002 Under the guidance of Prof. Krishna .S Doctor of Philosophy Indian Institute of Technology,Bombay Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 1 / 49

Upload: others

Post on 01-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Model Checking

Weighted Timed Automata

Lakshmi Manasa.GRoll Number: 08405002

Under the guidance ofProf. Krishna .S

Doctor of PhilosophyIndian Institute of Technology,Bombay

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 1 / 49

Page 2: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Motivation

Formal verification of systems - model checking

Model-checking problem is verifying whether a given formula issatisfied by a given structure.

WTA model is particularly relevant for modelling resourceconsumption in real-time systems.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 2 / 49

Page 3: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Overview of the talk

1 Introduction :◮ Timed automata◮ Region automata◮ Weighted timed automata

2 Weighted integer reset timed automata

3 Clock reduction in WIRTA

4 Undecidability result

5 Conclusion and future work

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 3 / 49

Page 4: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Introduction - Valuations

Clock valuation of set X - ν : X → R+

Set of clock valuations : RX+

Clock guards : G(X ) :: x ∼ cwhere x ∈ X , c ∈ N and ∼∈ {<,≤, >,≥,=}.

clock resets : φ ∈ U0(X ) is φ ⊆ X .

ν + τ , ν |= ψ and ν[φ := 0] defined as usual.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 4 / 49

Page 5: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Timed Automata

Timed automaton [1] A = (L,L0,Σ,X ,E ,F )

L is a set of locations;

L0 ⊆ L is a set of initial locations;

Σ is a set of symbols; X is a set of clocks;

G(X ) and U0(X ) are the set of constraints and resets.

E ⊆ L × L × Σ × G(X ) × U0(X ). An edge e = (l , l ′, a, ϕ, φ) is atransition from l to l ′ on symbol a, with the valuation ν ∈ RX

+

satisfying the guard ϕ, and then φ gives the resets of certain clocks.

Path :

(l0, ν′0)

t1−→ (l0, ν1)(σ1,ϕ1,φ1)−→ (l1, ν

′1)

t2−→ (l1, ν2)(σ2,ϕ2,φ2)−→ (l2, ν

′2) · · · (ln, ν

′n)

such that νi = ν ′i−1 + (ti − ti−1), νi |= ϕi , and ν ′i = νi [φi := 0], i ≥ 1.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 5 / 49

Page 6: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Regions of Timed Automata

R-finite set of partitions (α) of TX .α = {ν|ν inTX} (pos. infinite)

Succ(α): α′ ∈ R if ∃ν ∈ R,∃t ∈ T s.t ν + t ∈ α′

set of regions [Time elapse consistency] iffα′ ∈ Succ(α) ⇐⇒ ∀ν ∈ α,∃t ∈ T s.t ν + t ∈ α′.

α |= ϕ : ∀ν ∈ α, ν |= ϕ.

α[φ := 0] = {α′|∃ν ∈ α,α′ ∩ ν[φ := 0] 6= ∅}.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 6 / 49

Page 7: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Compatability of Regions

Set of regions R is compatabile [equivalence] with

1 C(X ) iff for every constraint ϕ ∈ C(X ) and for every region α ∈ Rexactly one of the following holds(1) α |= ϕ or (2) α |= ¬ϕ.

2 U0(X ) iff α′ ∈ α[φ := 0] =⇒ ∀ν ∈ α,∃ν ′ ∈ α′ such thatν ′ ∈ ν[φ := 0].

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 7 / 49

Page 8: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Region Automaton

For A = (L,L0,Σ,X ,E ,F )Region Automaton is R(A) = (Q,Q0,Σ,E

′,F ′) where

1 R set of regions compatible with C(X ) and U0(X ),

2 Q = L ×R - set of locations

3 Q0 ⊆ Q - set of initial locations

4 F ′ ⊆ Q - set of final locationswhere (l , α) ∈ F ′ s.t l ∈ F ∧ α ∈ R.

5 E ′ ⊆ (Q × Σ × Q) - set of edges s.t

(l , α)a→ (l ′, α′) ∈ E ′ if ∃α′′ ∈ R and (l , l ′, a, ϕ, φ) ∈ E s.t

◮ α′′ ∈ Succ(α)◮ α′′ |= ϕ◮ α′ ∈ α′′[φ := 0]

L(R(A)) = Untime(L(A)).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 8 / 49

Page 9: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Weighted Timed Automata

A = (L,L0,X ,Z ,E , θ, η,C ) where

L is a set of locations,

L0 ⊆ L is a set of initial locations,

X is a set of clocks,

Z is a set of costs where |Z | = m,

E ⊆ L × G(X ) × U0(X ) × L is the set of transitions.e = (l , ϕ, φ, l ′) ∈ E is a transition from l to l ′ with valuation ν |= ϕ,and φ is the set of clock resets.

θ : L → 2Σ is the labelling function.

η : L → G(X ) invariant function.

C : L ∪ E → Nm is the cost function.

stopwatches if C : L ∪ E → {0, 1}m.Stopwatches are restricted costs.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 9 / 49

Page 10: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Semantics of WTA

Given by labelled timed transition system TA = (S ,→) where S= L × RX

+ × RZ+ and → is composed of transitions

Time elapse t in l : (l , ν, µ)t

−→ (l ′, ν ′, µ′), t ∈ R+.Then l ′ = l , ν ′ = ν + t, µ′ = µ+ C (l) ∗ t and for all 0 ≤ t ′ ≤ t,ν + t ′ |= η(l).

Location switch: (l , ν, µ)(ϕ,φ)−→ (l ′, ν ′, µ′) if there exists

e = (l , ϕ, φ, l ′) ∈ E , such that ν |= ϕ, ν ′ = ν[φ := 0] andµ′ = µ+ C (e). Here, ν |= η(l), ν ′ |= η(l ′).

ρ = (l0, ν′0, µ

′0)

t1−→ (l0, ν1, µ1)(ϕ1,φ1)−→ (l1, ν

′1, µ

′1)

t2−→ (l1, ν2, µ2)(ϕ2,φ2)−→

(l2, ν′2, µ

′2) · · · (ln, ν

′n, µ

′n).

νi = ν ′i−1 + (ti − ti−1), νi |= ϕi , ν′i = νi [φ := 0] and

µi = µ′i−1 + C (li−1) ∗ (ti − ti−1), µ′i = µi + C (li−1, ϕi , φi , li ).

ρ[i ] and ρ[≤ i ] indicates the prefix of the path till position i .

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 10 / 49

Page 11: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

WCTL

WCTL2 as defined in [16]ψ ::= true | σ |π | z .ψ | ¬ψ | ψ ∨ ψ | E(ψUψ) | A(ψUψ)

WCTL1 as defined in [15]ψ ::= true | σ | ¬ψ | ψ1 ∨ ψ2 | Eψ1Uz∼cψ2 | Aψ1Uz∼cψ2

where z ∈ Z , σ ∈ Σ, and π is a cost constraint of the form zi ∼ c orzi − zj ∼ cThe freeze quantifiers z . allows us to reset costs, while the costconstraints z ∼ c allows us to test them.

If π is only of the form zi ∼ c , then logic is WCTL2r

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 11 / 49

Page 12: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Interpretation of WCTL

The satisfication relation A,(l , ν, µ) |= ψ is:

A,(l , ν, µ) |= σ iff σ ∈ θ(l)

A,(l , ν, µ) |= π iff µ |= π

A,(l , ν, µ) |= ¬ψ iff A,(l , ν, µ) 6|= ψ

A,(l , ν, µ) |= ψ1 ∨ ψ2 iff A,(l , ν, µ) |= ψ1 or A,(l , ν, µ) |= ψ2.

A,(l , ν, µ) |= z .ψ iff A,(l , ν, µ[z := 0]) |= ψ where µ[z := 0] standsfor µ with z reset to zero.

A,(l , ν, µ) |= Eψ1Uψ2 iff there exists a run ρ starting at (l , ν, µ), suchthat ∃i , ρ[i ] = (li , νi , µi) |= ψ2 and forall j < i , ρ[j] |= ψ1.

A,(l , ν, µ) |= Eψ1Uz∼cψ2 iff there exists a run ρ starting at (l , ν, µ),such that ∃i , ρ[i ] = (li , νi , µi ) |= ψ2 and forall j < i , ρ[j] |= ψ1, withµi(z) − µ(z) ∼ c .

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 12 / 49

Page 13: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Expresiveness

Lemma

WCTL2r is more expressive than WCTL1.

Proof.

We only give a proof sketch. Consider the WCTL2r formulaψ = z .EF([a ∧ z ≤ 1] ∧ EG[z ≤ 1 ⇒ ¬b]), where a, b ∈ Σ. It can provedthat there is no WCTL1 formula equivalent to ψ using an argument similarto the one used for showing that TPTL is more expressive than MTL [14].

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 13 / 49

Page 14: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Model Checking results

Logic Clocks Stopwatches Result

WCTL1 1 ≥ 1 (costs) Decidable [15]

WCTL1 ≥3 ≥1 Undecidable [12]

WCTL1 ≥2 ≥1 Undecidable [21]

WCTL2 ≥1 ≥3 Undecidable [16]

WCTL2 ≥0 ≥3 Undecidable [16] (costs on edges)

WCTL2r ≥1 ≥2 Infinite Bisimulation [16]

WCTL2r ≥2 ≥1 Infinite Bisimulation [16]

WCTL2r 1 1 Decidable [16]

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 14 / 49

Page 15: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

WIRTA

Definition

A Weighted Integer Reset Timed Automaton (WIRTA) is a WTA A =(L,L0,X ,Z ,E , θ, η,C ) with the restriction that for all e = (l , ϕ, φ, l ′) ∈ Eif φ 6= ∅ then ϕ consists of atleast one atomic clock constraint x = c forsome x ∈ X , c ∈ N.

Lemma

Let A = (L,L0,Σ,X ,E ,F ) be an IRTA and ν be a clock valuation in anygiven run in A. Then ∀x , y ∈ X , frac(ν(x)) = frac(ν(y)). [27]

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 15 / 49

Page 16: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

WIRTA example

s(0, 1)

t(1, 0)

x = 1?x := 0

(0, 1)

y ≥ 2?

(2, 2)

Figure: W-IRTA A.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 16 / 49

Page 17: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

WIRTA regions

Let cm ∈ N be the maximum constant in G(X ).For every clock x ∈ X , define a set of intervals Ix , as

Ix = {[c]|0 ≤ c ≤ cm} ∪ {(c , c + 1)|0 ≤ c < cm} ∪ {(cm,∞)}

Let α be a tuple ((Ix)x∈X ) where Ix ∈ Ix

α is integral, non-integral or saturated.

R is {α} and it partitions RX+ .

R is a set of regions.

R is compatible with G(X ).

R is compatible with U0(X ).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 17 / 49

Page 18: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Some definitions

dt(τ) given int(τ) = k.

dt(τ) ,

{

(δX)k if τ is integral,

(δX)kδ if τ is non-integral.

dte(τ1, τ2) - δX-pattern to be right concatenated to dt(τ1) to getdt(τ2).

For a path ρ ∈ TA visiting location li at time tig(ρ) to bew = (l0, t0)(l0, t1)(l1, t1)(l1, t2) . . . (ln−1, tn−1)(ln−1, tn)(ln, tn).

f (w) = l0 dte(t1, t0) l1 dte(t2, t1)l2 . . . ln−1 dte(tn, tn−1)ln.

Two words w ,w ′ are said to be f -equivalent iff f (w) = f (w ′).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 18 / 49

Page 19: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Path equivalence in TA

Two paths ρ and ρ′ in TA, are said to be equivalent (ρ ∼= ρ′) ifff (g(ρ)) = f (g(ρ′)).

Proposition

Let A be a WIRTA. Let ρ ∼= ρ′ be paths visiting the sequence of locationsl0l1 . . . ln in order, such that li is visited at time ti and t ′i resply, witht0 = t ′0 = 0. Then ρ is a path in TA iff ρ′ is a path in TA.

Corollary

The above result is not true if A is a WTA but not a WIRTA.

l1

m1

n1

y := 0 y < 1?

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 19 / 49

Page 20: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Clock Reduction - Marked WTA

Given a WIRTA A= (L,L0,X ,Z ,E , θ,C )its marked weighted timed automaton MA isMA = (Q,Q0, {f },Z ,Em, θm,Cm) where

Q = L ×R where R are regions for X ∪ {n},

Q0 = L0 × {α0} where α0 = 0|X∪{n}|,

Z is the set of costs,

θm : Q → 2Σ such that θm(q) = θ(l) for q = (l , α),

Cm : Q ∪ Em → N |Z | such that1 Cm(q) = C (l) if q = (l , α),2 Cm(em) = C (e) if em = (q, ǫ, ϕm, φm, q

′), e = (l , ϕ, φ, l ′), q = (l , α)and q′ = (l ′, α′),

3 Cm(em) = 0 if em = (q, δ, ϕm, φm, q′) or em = (q,X, ϕm, φm, q

′) whereq = (l , α) and q′ = (l , α′).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 20 / 49

Page 21: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Marked weighted timed automaton II

Em ⊆ Q × {δ,X, ǫ} × G({f }) × U0({f }) × Q is the set of edges. Forq = (l , α) and q′ = (l ′, α′), an edge em = (q, a, ϕm, φm, q

′) ∈ Em issuch that

1 if α(x) = (cm,∞) for all x ∈ X ∪ {n}, then q = q′, a ∈ {δ,X},ϕm :: true and φm = φ,

2 if l = l ′, α is integral and α′ = αi , then a = δ, ϕm :: 0 < f < 1 andφm = ∅,

3 if l = l ′, α′ is integral and α′ = αi , then a = X, ϕm :: f = 1 andφm = {f },

4 For a discrete transition (l , ϕ, φ, l ′) ∈ E , ((l , α), ǫ, ϕm, ∅, (l′, α′)) ∈ Em

such that(1) α |= ϕ, (2) α′ = α[φ ∪ {n}] if φ 6= ∅, else α′ = α, and (3)ϕm :: f = 0 if α is integral, else ϕm :: 0 < f < 1,

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 21 / 49

Page 22: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 22 / 49

Page 23: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Path in TM

r = ((l0, α0), γ0, χ0)t1,1−→ ((l0, α0), γ1, χ1)

δ−→ ((l0, α1), γ1, χ1)

t1,2−→

((l0, α1), γ2, χ2)X−→ ((l0, α2), 0, χ2) . . .

t1,k+1−→ ((l0, αk), γk+1, χk+1)

a−→

((l0, αk+1), γ′k+1, χk+1)

ǫ−→ ((l1, α

′k+1), γ

′k+1, χ

′k+1) . . .

ǫ−→

((ln, α′m), γ′m, χ

′m), where a = δ iff 0 < γk+1 < 1 and a = X iff γ′k+1 = 0.

For ((li , αj−1), γj−1, χj−1)ti+1,j−→ ((li , αj−1), γj , χj )

χj = χj−1 + Cm(li , αj−1) ∗ (ti+1,j − ti+1,j−1) andγj = γj−1 + ti+1,j − ti+1,j−1.

For ((li , αj ), γj , χj)ǫ

−→ ((li+1, α′j), γ

′j , χ

′j),

χ′j = χj + Cm((li , αj ), ǫ, (li+1, α

′j)) and γ′j = γj .

During transitions, γj changes (to zero) iff transition is X.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 23 / 49

Page 24: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Paths chosen in TM

We consider only those paths in which

All the ǫ transitions immediately follow the δ or X transitions.ǫ after X will follow it immediatelyTime elapse (< 1) between δ and ǫ can be pushed before δ.

δ and X alternate.

h(ρ)=l0w1l1w1 . . . ln−1wnln where wi+1 is {δ,X} word between (li , α) and(li , αki +1).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 24 / 49

Page 25: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

path between (l , α) and (l , α′)

Proposition

Let (l , α) and (l , α′) be two locations in MA. Let (l , α′) be reachable inMA from (l , α) by a sequence of time elapse and δ,X transitions. Thenfor a word w ∈ {δ,X}∗ leading (l , α) to (l , α′), we have

1 δ,X strictly alternate in w,

2 w = dte(t ′, t) such that t ∈ α(n), t ′ ∈ α′(n).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 25 / 49

Page 26: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Paths in A and MA

Lemma

Let A=(L,L0X ,Z ,E , θ,C ) be a WIRTA and letMA=(Q,Q0, {f },Z ,Em, θm,Cm) be its marked automaton.

1 For every path ρ of TA, there exists a path ρm of TM such thatf (g(ρ)) = h(ρm).

2 For every path ρm of TM where the δ,X strictly alternate, thereexists a path ρ of TA such that f (g(ρ)) = h(ρm).

3 Let ρ be a path in TA such that f (g(ρ)) = h(ρ′) for a path ρ′ in TM.Then all paths ρ′′ in TA such that ρ′′ ∼= ρ, f (g(ρ′′)) = h(ρ′).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 26 / 49

Page 27: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

δ − X sequence

Let (l , α) be a location in MA.A δ − X sequence is lα = (l , α0)(l , α1) . . . (l , αn)such that α0 = α and ∀j ≥ 0, αj+1 = αi

j

and any path in TM consisting of only these locations is of the form

((l , α0), γ0, χ0)t1,1−→ ((l , α0), γ1, χ1)

a−→ ((l , α1), γ1, χ1)

t1,2−→

((l , α1), γ2, χ2)a′−→ ((l , α2), γ2, χ2) . . .

t1,k+1−→ ((l , αk), γk+1, χk+1)

δ−→

((l , αk+1), γk+1, χk+1) where

1 a, a′ ∈ {δ,X},

2 δ and X strictly alternate,

3 (l , αk+1) has a self loop on δ,X in MA.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 27 / 49

Page 28: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

One clock WIRTA

Let MA = (Q,Q0, {f },Z ,Em, θm,Cm) correspond to a WIRTA A.The one clock WIRTA is A′=(L′,L′0,X

′ = {n},Z ,E ′, θ′,C ′) where

L′ = {lα | (l , α) ∈ Q},

L′0 = {sα | (s, α) ∈ Q0},

Z= the set of costs as in MA,

E ′ ⊆ L′ × G(X ′) × U0(X′) × L′ is set of transitions

e = (lα, ϕ, φ, l′α′) ∈ E ′ iff there exists em = ((l , αi ), ǫ, (l

′, α′j)) ∈ Em

with ϕ is n ∈ αi (n) and φ = {n} iff α′j(n) = 0, lα[i ] = (l , αi ) and

l ′α′[j] = (l ′, α′j )

θ′ : L′ → 2Σ is given as θ(lα) = θm(l , α), where (l , α) ∈ Q,

C ′ : L′ ∪ E ′ → N |Z | is defined as C ′(lα) = Cm(l , α) where (l , α) ∈ Q,C ′(e) = Cm(em) where e ∈ E ′ corresponds to em of Em.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 28 / 49

Page 29: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

One clock WIRTA example

s(0,0,0)

(0, 1)

t(0,1,0)

(1, 0)

s(1,2,1)

(0, 1)

t(0,2,0)

(1, 0)

s(0,2,0)

(0, 1)

t(0,2+,0)

(1, 0)

s(0,2+,0)

(0, 1)

(1, 1)n = 1?

n := 0

n ≥ 1?

(2, 2)

(1, 1)n = 1?

n := 0

n ≥ 0?(2, 2)(1, 1)n = 1?

n := 0

n ≥ 0?

(2, 2)

(1, 1)n = 1?

n := 0

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 29 / 49

Page 30: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Path in TA′

A path ρ in TA′ is

(lα, ν0, µ0)t1−→ (lα, ν1, µ1)

(ϕ,φ)−→ (l ′α′ , ν2, µ2) . . .

(ϕ′,φ′)−→ (lnβ , νm, µm)

g(ρ) = (lα, t0)(lα, t1)(l′α′ , t1) . . . (l

nβ , tn).

Simplifying notation, we say g(ρ) = (l , t0)(l , t1)(l′, t1) . . . (l

n, tn).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 30 / 49

Page 31: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Paths in TM and TA′

Lemma

Let MA=(Q,Q0, {f },Z ,Em, θm,Cm) be the marked automaton forWIRTA A and let A′=(L′,L′0, {n},Z ,E

′, θ′,C ′) be its one clock WIRTA.

1 For every path ρm of TM where the δ,X strictly alternate, thereexists a path ρ of TA′ such that f (g(ρ)) = h(ρm).

2 For every path ρ of TA′ , there exists a path ρm of TM such thatf (g(ρ)) = h(ρm).

3 Let ρ be a path in TA′ such that f (g(ρ)) = h(ρ′) for a path ρ′ in TM.Then all paths ρ′′ in TA′ such that ρ′′ ∼= ρ, f (g(ρ′′)) = h(ρ′).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 31 / 49

Page 32: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Complexity

Theorem

Let A be a WIRTA and let A′ be the one clock WIRTA obtained fromMA. Then for every path ρ ∈ TA, there is a path ρ′ in TA′ such thatρ ∼= ρ′. Further, the accumulated costs in the corresponding locations ofρ, ρ′ are identical.

Complexity

Given WIRTA A = (L,L0,X ,Z ,E , θ,C ).

The number of regions of A is (2 ∗ (cm + 1))|X |.

The number of locations in the marked automaton MA is|L| × (2 ∗ cm + 2)|X |+1.

The number of δ − X sequences is |L′| = |L| × (2 ∗ cm + 2)|X |+1.

Single clock WIRTA A′ has |L| × (2 ∗ cm + 2)|X |+1 locations. (Eachδ − X sequence lα is a location in A′.)

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 32 / 49

Page 33: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Undecidability - Deterministic Two Counter Machine

M consists of a two counters C1 and C2 and a finite sequence of labelledinstructions.For a counter C ∈ {C1,C2}, the permitted instructions are as follows :

1 li : goto lk2 li : C = C + 1

3 li : C = C − 1

4 li : if C = 0 goto l1i else goto l2i5 li : halt

Behavior of M is a possibly infinite sequence of configurations〈l1, 0, 0〉, 〈l1,C

11 ,C

12 〉, . . . 〈lk ,C

k1 ,C

k2 〉 . . .

C k1 and C k

2 are counter values and lk is label of kth instruction.The halting problem of such a machine is undecidable. [24].

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 33 / 49

Page 34: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Model checking WCTL2 over WIRTA

Lemma

Model checking WCTL2 on WIRTA with 1 clock and 3 stopwatch costs isundecidable.

The proof given in [17] holds for a WRITA with minimal modifications.The constraint x = 1? is replaced by x = 1?x := 0 while x = 0? is theconstraint over all the other edges.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 34 / 49

Page 35: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

WCTL2r over WIRTA 3 stopwatches and 1 clock

A WIRTA A=(L, {l1},X ,Z ,E , θ,C ) and a WCTL2r formula Ψsimulate M.

Each instruction li of M is simulated by a sub-automaton Ai and aWCTL2r formula.

X = {x}, Z = {z1, z2, z3} where zi , 1 ≤ i ≤ 3 is a stopwatch andθ(li) = li .

The normal form in li is x = 0, z3 = 0, z1 = 1 − 12n1∗3n2 and

z2 = 1 − 12n3∗3n4 where 1 ≤ i ≤ 4, ni ≥ 0 encode the counters of M as

C1 = n1 − n2 and C2 = n3 − n4.

For ln :: HALT , the sub-automata has a single state with the labelHALT .

Ψ :: z1.z2.z3.E ψall U (HALT ∧ z3 = 0), ψall will be given later.

The final WIRTA A is obtained connecting all Ai such that li in Ai−1

and Ai coincide.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 35 / 49

Page 36: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Overview of simulation

The instructions of M are simulated as follows.

1 Increment C1 : Increment n1 by adding 12n1+1∗3n2

to z1 = 1 − 12n1∗3n2 .

2 Decrement C2 : Increment n2 by adding 23 ∗ 1

2n1∗3n2 toz1 = 1 − 1

2n1∗3n2 .

3 Checking if C1 is zero : C1 = 0 iff n1 = n2. This is achieved bymultipying the value 1

2n1∗3n2 by 6 an integral number of times till itbecomes 1.

4 For counter C2 - reverse the roles of z1 and z2 in all the modules.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 36 / 49

Page 37: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Increment n1

entering li leaving li+1

x 0 0

z1 1 − 12n1∗3n2

1 − 12n1∗3n2

+ t

z2 1 − 12n3∗3n4 1 − 1

2n3∗3n4

z3 0 0 (due to Ψ)

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 37 / 49

Page 38: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Helper modules I

ψA :: (A ∧ z3 = 0) =⇒ E ¬AF U (AF ∧ z1 = 1 ∧ z3 = 0)ensures that time spent in location a2 is the same as the value in z1.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 38 / 49

Page 39: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Helper modules II

ψC2:: C2 =⇒ E ¬C2F U (C2F ∧ z2 = 1 ∧ z1 = 2 ∧ z3 = 2)

If initial values were z1 = 1 − α+ t, z2 = t3 and z3 = t then ψC2holds iff

t3 = α.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 39 / 49

Page 40: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Module check z 2c : (t = 12n1+1∗3n2

)

z2.z3. E ¬C1 U [C1 ∧ z2 = 1

∧ z2. E ¬C2 U {C2 ∧ ψC2

∧ z3. E (¬CF ∧ ψA) U (CF ∧ z2 = 2 ∧ z3 = 0)}]

entering z1 z2 z3 x

q1 1 − α+ t 0 0 t

C1 1 − α+ t 1 t -

C2 1 − α+ t 1 − α t → 0 -

CF 1 − α+ t α+ 1 − α+ t + 1 − α+ t 0 -

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 40 / 49

Page 41: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Check if C1 = 0

ψZ1:: (l11 =⇒ ψcheck n1=n2

) ∧ (l21 =⇒ ¬ψcheck n1=n2)

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 41 / 49

Page 42: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

ψM1:: M1 =⇒ E ¬M1FU(M1F ∧ z2 = 1 ∧ z3 = 1 ∧ z1 = 1)

ψDn1:: Dn1 =⇒ E Dn2U(¬Dn2 ∧ z3 = 0 ∧ ψcheck 2∗x=z2

)ψDn2

:: Dn2 =⇒ E Dn1U(¬Dn1 ∧ z3 = 0 ∧ ψcheck 3∗x=2∗z2)

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 42 / 49

Page 43: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Check if n1 = n2

ψcheck n1=n2:: z2.z3. E (¬MF ∧ ψM1

∧ ψDn1∧ ψDn2

)U(MF ∧ z3 = 0 ∧ z2 = 1).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 43 / 49

Page 44: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Check if 2 ∗ x = z2

ψcheck 2∗x=z2:: z1.z3. E ¬B1 U [B ∧ z1 = 1

∧ z1. E(¬BF ∧ ψcheck x=z3) U (BF ∧ z1 = 1 ∧ z2 = 1 ∧ z3 = 1)]

ψcheck x=z3:: (B3 ∧ z1 = 0) =⇒ E ¬B3F U (B3F ∧ z3 = 1 ∧ z1 = 0).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 44 / 49

Page 45: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

ψcheck 3∗x=2∗z2:: z1.z3.E¬H1 U [H1 ∧ z1 = 1

∧z1.E¬H4 U {H4 ∧ ψcheck z1=z2−z3

∧z2.E(¬HF ∧ ψcheck x=z1) U (HF ∧ z1 = 1 ∧ z2 = 1 ∧ z3 = 1)}].

ψcheck z1=z2−z3:: H4 ⇒ E¬H4F U (H4F ∧ z1 = 1 ∧ z2 = 1 ∧ z3 = 1)

ψcheck x=z1:: (H5 ∧ z2 = 0) ⇒ EH5U(H5F ∧ z1 = 1 ∧ z2 = 0).

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 45 / 49

Page 46: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Correctness

Ψ :: z1.z2.z3.E ψall U (HALT ∧ z3 = 0) whereψall ::

i=1,2 ψIi ∧ ψDi∧ ψZi

.

Theorem

If M is the two counter machine represented by A and Ψ thenA, (l1, 0, 〈0, 0, 0〉) |= Ψ iff M halts.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 46 / 49

Page 47: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Conclusion

Number of clocks reduced to 1 for WIRTA.

Hence, model checking WCTL1 is decidable for WIRTA.

Model checking WCTL2 over WIRTA with 3 stopwatches isundecidable.

Model checking WCTL2r over WIRTA with 3 stopwatches isundecidable.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 47 / 49

Page 48: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Future work

WCTL2 over WIRTA.

WCTL2r over WIRTA with costs.

WCTL1 with multi constrained modalities.

Reducing the number of stopwatches in the undecidability result.

Relation between costs and stopwatches.

Investigate other interesting subclasses of WTA and variations ofWCTL.

Extend model checking study to other logics.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 48 / 49

Page 49: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

THANK YOU

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 49 / 49

Page 50: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

R. Alur and D. L. Dill, A Theory of Timed Automata, TheoreticalComputer Science, 126(2), 1994.

R. Alur, L. Fix and T. Henzinger, Event-clock automata, adeterminizable class of timed automata, Theoretical ComputerScience, 211, 253-273, 1999.

R. Alur, Salvatore La Torre, and George Pappas, Optimal paths inweighted timed automata. In Proceedings of HSCC’01, LNCS 2034,49-62, 2001.

R. Alur, Salvatore La Torre and P.Madhusudan, Perturbed TimedAutomata, Proceedings of HSCC’05, 70-85, 2005.

R. Alur, T.A. Henzinger, and P.-H. Ho, Automatic SymbolicVerification of Embedded Systems, IEEE Transactions on SoftwareEngineering, 22:181-201, 1996.

R. Alur, C. Courcoubetis and D. L. Dill, Model-checking in dense realtime, Information and Computation, 104(1), 2-34, 1993.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 49 / 49

Page 51: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Eugene Asarin, Oded Maler and Amir Pnueli, Reachability analysis ofdynamical sytems having piecewise-constant derivatives, TheoreticalComputer Science 138, 35-65, 1995.

Beatrice Berard and Catherine Duford, Timed automata and additiveclock constraints, Information Processing Letters, 75(1-2): 1-7 2000.

Beatrice Berard, Paul Gastin and Antoine Petit, On the power of nonobservable actions in timed automata, Proceedings of STACS’96,LNCS 1046, 257-268, 1996.

Gerd Behrmann, Alexandre David, Kim G. Larsen, Oliver Mller, PaulPettersson, and Wang Yi, Uppaal - Present and Future, Proceedingsof the 40th IEEE Conference on Decision and Control, Orlando,Florida, USA, December 4 to 7, 2001.

Gerd Behrmann, Ansgar Fehnkar, Thomas Hune, Kim Larsen, PaulPetterson, Judi Romijn and Frits Vaandrager. Minimum-costreachability for priced timed automata. In Proceedings of HSCC’01,LNCS 2034, 147-161, 2001.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 49 / 49

Page 52: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Patricia Bouyer, Thomas Brihaye and Nicolas Markey, Improvedundecidability results on weighted timed automata, InformationProcessing Letters, 98(5), 188-194, 2006.

Patricia Bouyer, Catherine Duford, Emmanuel Fleury, and AntoinePetit, Updatable Timed Automata, Theoretical Computer Science,321(2-3): 291-345, 2004.

Patricia Bouyer, Fabrice Chevalier and Nicolas Markey, On theExpressiveness of TPTL and MTL, Proceedings of FST&TCS’05,LNCS 3821, 432-443, 2005.

Patricia Bouyer, Kim G. Larsen and Nicolas Markey, Model CheckingOne-clock Priced Timed Automata, Logical Methods in ComputerScience, 4(2:9),2008.

Thomas Brihaye, Veronique Bruyere, Jean-Francois Raskin,Model-Checking for Weighted Timed Automata, Proceedings ofFORMATS/FTRTFT 2004, 277-292, 2004.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 49 / 49

Page 53: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

Thomas Brihaye, Veronique Bruyere, Jean-Francois Raskin, Onmodel-checking timed automata with stopwatch observers,Information and Computation, 204(3), 408-433, 2006.

Christian Choffrut, Massimiliano Goldwur,: Timed Automata withPeriodic Clock Constraints, Journal of Automata, Languages andCombinatorics, 5(4): 371-404, 2000.

Conrado Daws, Alfredo Olivero, Stavros Tripakis, Sergio Yovine, TheTool KRONOS, Hybrid Systems 1995, 208-219.

Francois Demichelis and Wieslaw Zielonka, Controlled TimedAutomata, Proceedings of CONCUR’98, LNCS 1466, 455-469, 1998.

Chinmay Jain, Decidability results on weighted timed automata,Bachelor’s thesis, Indian Institute of Technology, Bombay, July 2008.

T. Henzinger, Z. Manna and A. Pnueli, What good are digital clocks?,Proceedings of ICALP’92, LNCS 623, 545-558, 1992.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 49 / 49

Page 54: Indian Institute of Technology Bombaymanasa/phd_seminar_pres.pdf · Created Date: 12/1/2008 11:56:16 AM

L. Manasa, S. N. Krishna and Kumar Nagaraj, Updatable TimedAutomata with Additive and Diagonal Constraints, Proceedings ofCiE’08, LNCS 5028, 407-416, 2008.

M. L.Minsky, Computation: finite and infinite machines, Prentice-HallInc, USA, 1967.

Kumar Nagaraj, Topics in Timed Automata, Master’s Thesis,Department of Computer Science & Engineering, Indian Institute ofTechnology, Bombay, July 2006.

Joel Ouaknine and James Worrell, On the language inclusion problemfor timed automata : Closing a decidability gap, Proceedings ofLICS’04, 54-63, 2004.

P. V. Suman, P. K. Pandya, S. N. Krishna and L. Manasa, TimedAutomata with Integer Resets: Language Inclusion and Expressiveness,Proceedings of FORMATS’08, LNCS 5215, 78-92, 2008.

Lakshmi Manasa.G (PhD,CSE,IITB ) Model Checking WTA 49 / 49