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

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

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

Note that although it is possible to explicitly specify a control structure<br />

(automaton) in an Nbac input <strong>model</strong>, we cannot map the automaton in an<br />

XTG <strong>model</strong> to a control structure in an Nbac <strong>model</strong> directly one-to-one. The<br />

reason is that a dataflow equation b ′ i = φ i( ⃗ b,⃗c, ⃗x, ⃗y) orx ′ k = ψ k( ⃗ b,⃗c, ⃗x, ⃗y)<br />

must be specified for every state variable in such a way that the equation<br />

expression remains the same for any edge (transition) in the resulting Nbac<br />

<strong>model</strong>, while it is not the case in an XTG <strong>model</strong>.<br />

We use Boolean variables to specify locations in Nbac. Every location<br />

loc i will be represented by a Boolean state variable l i . As such, if the system<br />

is in loc j , l j = true ∧ l i,i≠j = false. Boolean variables are used to <strong>model</strong><br />

locations for the reason that Booleans are handled exactly while Integers<br />

are abstracted in Nbac.<br />

In our example, lij ∈{l10,l11,l12,l13,l20,l21,l22,l23} is a Boolean<br />

variable representing a location loc j <strong>of</strong> process p i . This naming rule is just<br />

our convention.<br />

Transitions are <strong>model</strong>ed implicitly <strong>through</strong> dataflow equations in Nbac.<br />

The specification <strong>of</strong> transitions is best explained <strong>through</strong> a few cases in the<br />

Fischer’s protocol presented in Figure 2.4.<br />

l10’ = if p1<br />

then<br />

if l12 then not lock1<br />

else l13<br />

else l10;<br />

lock1’ = if p1 then<br />

if l11 then true<br />

else if l13 then false<br />

else lock1<br />

else if p2 then<br />

if l21 or l23 then false<br />

else lock1<br />

else lock1;<br />

c1’ = if tick then c1+1<br />

else if p1 and (l10 or l11) then 0<br />

else c1;<br />

Figure 2.4: Using dataflow equations to <strong>model</strong> transitions<br />

Consider the equation on l10. The purpose <strong>of</strong> the equation is to give<br />

the value for l10 at the next execution step. According to the external environment<br />

setting specified by the assertion on input variables p1,p2,tick,<br />

there are three possibilites: process 1 takes action (p1), process 2 takes action<br />

(p2), or time action (tick). In the two later cases, the value <strong>of</strong> l10 does<br />

17

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

Saved successfully!

Ooh no, something went wrong!