30.04.2013 Views

Timed CTL Model Checking in Real-Time Maude⋆ - IfI

Timed CTL Model Checking in Real-Time Maude⋆ - IfI

Timed CTL Model Checking in Real-Time Maude⋆ - IfI

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong><strong>Time</strong>d</strong> <strong>CTL</strong> <strong>Model</strong> <strong>Check<strong>in</strong>g</strong> <strong>in</strong> <strong>Real</strong>-<strong>Time</strong> Maude 29<br />

w.r.t. the selected time sampl<strong>in</strong>g strategy σ. This assumption also implies that<br />

the transition relation T<br />

−→R σ <strong>in</strong> the timed Kripke structure T K(Rσ , t0)Π is total.<br />

The current implementation of the model checker assumes that time values<br />

are either <strong>in</strong> NAT-TIME-DOMAIN-WITH-INF or POSRAT-TIME-DOMAIN-WITH-INF,<br />

and provides the user with two possible model-check<strong>in</strong>g strategies:<br />

(i) The basic strategy, which performs the model check<strong>in</strong>g on the model obta<strong>in</strong>ed<br />

by apply<strong>in</strong>g the user-def<strong>in</strong>ed time sampl<strong>in</strong>g strategy on the orig<strong>in</strong>al model.<br />

As we expla<strong>in</strong>ed <strong>in</strong> section 4.1, this strategy provides a sound analysis for<br />

TETCL and a complete analysis for TATCL.<br />

(ii) The gcd strategy, which extends the maximal time sampl<strong>in</strong>g strategy with<br />

the “gcd” transformation to perform the model check<strong>in</strong>g for the satisfaction<br />

problem R gcd(t0,r,ϕ) , LΠ, t0 |=p ϕ.<br />

Soundness and completeness of the gcd strategy might come at the cost of<br />

a larger state space due to the application of the gcd transformation. When the<br />

gcd strategy is impractical, the user can still perform model check<strong>in</strong>g with the<br />

generally faster basic strategy, which does not <strong>in</strong>crease the system state space<br />

and can still be very useful to discover potential bugs, as illustrated below.<br />

<strong>Real</strong>-<strong>Time</strong> Maude, and hence our model checker, is implemented <strong>in</strong> Maude,<br />

mak<strong>in</strong>g extensive use of Maude’s meta-programm<strong>in</strong>g capabilities. Therefore, our<br />

model checker gets as <strong>in</strong>put the meta-representation R of the <strong>Real</strong>-<strong>Time</strong> Maude<br />

model R to analyze, as well as the meta-representations t0 and ϕ of, respectively,<br />

the <strong>in</strong>itial state t0 and the T<strong>CTL</strong> formula ϕ to check. The algorithm first applies<br />

the user selected time sampl<strong>in</strong>g strategy to R, and then explores the reachable<br />

state space to <strong>in</strong>crementally construct the timed Kripke structure T K(R σ , t0)Π,<br />

which is subsequently model checked (directly as it is <strong>in</strong> the default strategy,<br />

while, <strong>in</strong> the gcd strategy, it is further ref<strong>in</strong>ed by “splitt<strong>in</strong>g” the transitions <strong>in</strong>to<br />

smaller ones of duration equal to the computed greatest common divisor <strong>in</strong> the<br />

gcd strategy and then model checked). This is done by repeatedly us<strong>in</strong>g Maude’s<br />

meta-level descent functions metaSearch, to f<strong>in</strong>d all states reachable from a state<br />

<strong>in</strong> one rewrite step, and metaReduce, to check whether an atomic proposition<br />

holds <strong>in</strong> a state. S<strong>in</strong>ce the meta-representation of the states can be fairly large 9 ,<br />

perform<strong>in</strong>g the rest of the model check<strong>in</strong>g procedure on the generated timed<br />

Kripke structure is fairly <strong>in</strong>efficient. In our current implementation, we assign a<br />

unique natural number to each (meta-represented) state <strong>in</strong> the generated timed<br />

Kripke structure, and construct a more compact timed Kripke structure, where<br />

all the occurrences of these meta-represented states are replaced by their respective<br />

identifiers. We then perform the ma<strong>in</strong> part of the model check<strong>in</strong>g procedure,<br />

namely, the recursive computation of the satisfaction set of ϕ on this compact<br />

representation. This optimization led to a large performance improvement and<br />

made it feasible to apply our model checker to a number of case studies <strong>in</strong> reasonable<br />

time, whereas work<strong>in</strong>g directly on meta-represented terms made model<br />

check<strong>in</strong>g unfeasible even for simple case studies.<br />

9 For example, each state <strong>in</strong> the Maude representation of the Ptolemy II model <strong>in</strong><br />

Section 6 “conta<strong>in</strong>s” the entire Ptolemy II model.

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

Saved successfully!

Ooh no, something went wrong!