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.

When applying the abovementioned procedure to implement nbac2xtgxml,<br />

we faced the following problems:<br />

1. As explained in Section 3.2, expressions have to be split into atomic<br />

elements in PMC <strong>model</strong>s. In the implementation, we had to write procedures<br />

to parse expressions obeying the precedent rule on operators.<br />

2. PMC does not support Boolean operations on Boolean type variables.<br />

Therefore, Nbac Boolean variables are saved as integer variables in<br />

PMC <strong>model</strong>. The Boolean expression “b and not c”, in which b,c are<br />

Boolean variables, is specified in PMC <strong>model</strong> as “b==1 and c==0”.<br />

3. Since PMC neither supports Boolean type variables nor returns Boolean<br />

values for comparison expressions, if-then-else statement in assignments<br />

cannot be <strong>model</strong>ed as described in Section 3.3. A number <strong>of</strong><br />

extra locations and transitions have to be added to <strong>model</strong> assignments.<br />

Consider a set <strong>of</strong> assignments for a transition in the following example:<br />

x:= if a then x1 else if b then x2 else 0;<br />

y:= if c then y1 else if d then y2 else 0;<br />

z:= if e then z1 else if f then z2 else 0;<br />

Figure 3.11 shows how the transition is <strong>model</strong>ed in Uppaal.<br />

x := a*x1 + b*x2;<br />

y:=c*y1+d*y2;<br />

z:=e*z1+f*z2;<br />

s 0 s 1<br />

Figure 3.11: Modeling assignments in Uppaal<br />

Figure 3.12 shows how the transition is <strong>model</strong>ed in PMC.<br />

a==1<br />

c==1<br />

e==1<br />

x:=x1 y:=y1 z:=z1<br />

s 0 s 1<br />

b==1<br />

x:=x2<br />

d==1<br />

y:=y2<br />

f==1<br />

z:=z2<br />

Figure 3.12: Modeling assignments in PMC<br />

Modeling assignments this way adds a large amount <strong>of</strong> transitions and<br />

locations to the PMC <strong>model</strong>. However, we had no other choice to solve<br />

this problem.<br />

33

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

Saved successfully!

Ooh no, something went wrong!