Now we are ready to create a new session and to check whether the property we specified above holds for this program. When creating a new session, we have the choice of creating a new session file or adding the session to the existing session file. Let's add a new session to the existing session file.
Untitled1
by default. You can rename it by positioning the
cursor in the Name field and typing the name you like as if
you were working with a text editor. For simplicity, let's call this
session MyPipeInt
. Before you can proceed, you need to
Activate this session.PipeInt.java
, then click on the Select
option at the bottom of the window. You are done with choosing the file.
Note: In order to build the database of declared predicates,
Bandera first needs to load the .java
source files containing
the declared prediates. This will cause the predicates to be parsed
and type-checked.
Accordingly, close the Session Manager window by clicking on OK at the bottom. If you look at the top tool-bar of the main frame, you should see that only JJJC option is enabled. To load the source file, click on the RUN option. You are now ready to use the BUI Property Manager to create a specification to be checked.
Untitled1
. After activating the property by clicking on the
Activate/Deactivate you can rename it by editing the Name field of
the window. Let's call this property stage1ShutdownProp
.run
method of thread
Stage1
. We need to quantify this predicate for all instances
of Stage1
, therefore, enter the following line in the
Quantifications field:
forall[s:Stage1].The property we want to check is a response property with a global scope, so under the Pattern Name choose Response. Under the Pattern Scope choose Globally.
Figure 11: Property Manager Window
Choose
PipeInt.main.c1StopCall
out of the list of predicates. Now you
need to specify S. Follow the same steps as for P,
only choose
Stage1.run.stage1Shutdown
predicate out of the list of predicates. Once this predicate
name appears in the text box, add (s)
at the end of the predicate name to reflect that
we are working with a predicate for all instances of Stage1
.
After you are done with defining S, the field you edited should look like:
Stage1.run.stage1Shutdown(s)
It is always a good idea to click on Expand option to check whether your formula is valid. Go ahead and expand the formula, it should be valid.