25.12.2014 Views

On improving efficiency of model checking through systematically ...

On improving efficiency of model checking through systematically ...

On improving efficiency of model checking through systematically ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

(init0)<br />

init_0<br />

((not p2 and p1)<br />

or (p2 and not p1))<br />

(ok and not init0) and<br />

(y>=0 and x>=0<br />

and -y+x+1>=0)<br />

good_0<br />

(y-x-1>=0)<br />

and ((not p2 and p1)<br />

or (p2 and not p1))<br />

(not ok and not init0) and<br />

(y+x-2>=0 and -y+x+2>=0<br />

and y-x>=0);<br />

bad_0<br />

(not y-x-1>=0)<br />

and ((not p2 and p1)<br />

or (p2 and not p1))<br />

Figure 3.5: A transformed automaton<br />

1. The existence <strong>of</strong> if-then-else statement in Nbac dataflow<br />

equations. A dataflow equation (assignment) in an Nbac <strong>model</strong> can<br />

be as follows:<br />

x’ = if (init0) then 0<br />

else if (not init0) and ((not b1 and not b0) or (b1 and b0))<br />

then x+1<br />

else if (not init0) and true<br />

and ((b1 and not b0) or (not b1 and b0))<br />

then x<br />

else 0;<br />

Figure 3.6: A dataflow equation in Nbac <strong>model</strong><br />

where x: Integer; init0,b0,b1:Boolean.<br />

Since PMC/Uppaal does not support if-then-else statement in assignments,<br />

we have to <strong>model</strong> such statements in a reasonable way<br />

in an XTG <strong>model</strong>. We remove the if-then-else statement from the<br />

assignment by transforming it to a value expression containing only<br />

numerical operators. Consider the following assignment:<br />

x:= if a then x1<br />

else if b then x2<br />

else x3;<br />

where x,x1,x2,x3: Boolean or Integer; a,b :Boolean.<br />

Although there is else-if syntax, the Boolean conditions associated<br />

with else-if component are already exclusive (this only holds for the<br />

Nbac output <strong>model</strong>) 2 . The last else part is a fake just to fulfill the<br />

2 claimed by the author <strong>of</strong> Nbac<br />

26

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

Saved successfully!

Ooh no, something went wrong!