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.

The safety property to prove is x ≥ y. It is readily seen that the system<br />

meets the safety property.<br />

We choose this example as one <strong>of</strong> our case study in order to get an insight<br />

on its <strong>model</strong>s due to the simplicity <strong>of</strong> the system. Thus, we can trace the<br />

output <strong>model</strong> manually to check whether or not the transformation tool<br />

works properly.<br />

The tiny example is originally specified in Nbac input language. Therefore,<br />

the meaning <strong>of</strong> the <strong>model</strong> is very straightforward. See Appendix A.1<br />

Two input variables p1,p2 was added just to see how assertion is generated<br />

and the impact <strong>of</strong> input variable in the <strong>model</strong>.<br />

This example is categorized as infinite system caused by unbounded Integer<br />

variables. If we let the system run for a long time, x, y will exceed the<br />

bounded Integer value.<br />

4.2 Asynchronous Reader/Writer Algorithm<br />

In [11] J. Chen and A. Burns describe an algorithm that implements a<br />

fully asynchronous reader/writer algorithm which addresses the problems<br />

<strong>of</strong> blocking and priority inversion within multi processor real-time systems.<br />

The approach is conceived from the concept <strong>of</strong> process consensus in which<br />

the writer and the reader come to an agreement on accessing the shared<br />

data before proceeding to carry out their respective data operations. The<br />

PMC/Uppaal <strong>model</strong> <strong>of</strong> this algorithm for one reader and the writer is presented<br />

in Figure 4.2.<br />

In Figure 4.2, there are two graphs: one for the Reader process and<br />

one for the Writer process. The algorithm uses shared variables L1, L2,<br />

P refer1, P refer2, Precon between Reader and Writer to control these<br />

processes.<br />

The safety property states that whenever the writer and the reader are<br />

actually in the state <strong>of</strong> writing and reading simultaneously the writer and the<br />

reader index must be unequal. This property is specified in Uppaal as “A[ ]<br />

not (Reader.reading and Writer.writing and Reader.ridx==Writer.widx)”.<br />

This algorithm is originally <strong>model</strong>ed in PMC. It is then transformed manually<br />

to make it an Nbac input <strong>model</strong>. This step increases the physical size<br />

<strong>of</strong> the <strong>model</strong> significantly. Then Nbac generates an output <strong>model</strong> from its<br />

input and thus increases the size <strong>of</strong> the <strong>model</strong> even more.<br />

This case study is categorized as finite system because all variables are<br />

39

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

Saved successfully!

Ooh no, something went wrong!