Property Specification /

Properties Files

Files containing properties to be analysed by PRISM can also contain constants, as is the case for model files. These are defined in identical fashion, for example:

const int k = 7;
const double T = 9.5;
const double p = 0.01;

P<p [ true U<=T x=k ]

As before, these constants can actually be left undefined and then later assigned either a single value or a range of values using experiments.

In fact, probability bounds for the P or S operators (like P above) and upper or lower bounds for the U operator (like T above) can be arbitrary expressions, provided they are constant. Furthermore, expressions in the properties file can also refer to constants previous defined in the model file.

Another feature of properties files is labels. These are a way of defining sets of states that will be referred to in properties (they correspond to atomic propositions in a temporal logic setting). As described earlier, labels can be defined in either model files or property files.

Labels are defined using the keyword label, followed by a name (identifier) in double quotes, and then an expression which evaluates to a Boolean. Definition and usage of formulas are illustrated in the following example:

label "safe" = temp<=100 | alarm=true;
label "fail" = temp>100 & alarm=false;

P>=0.99 [ "safe" U "fail" ]

Two special cases are the "init" and "deadlock" labels which are always defined. These are true in initial states of the model and states where deadlocks were found (and fixed by adding self-loops), respectively. The former is useful if you only wish to to check whether a property is true in the initial states, e.g.:

"init" => P>=0.99 [ "safe" U "fail" ]

A PRISM properties file can contain any number of properties. Like model files, they can also include any amount of white space (spaces, tabs, new lines, etc.) and C-style comments, which are both ignored. By convention, files are given the extension .pctl for properties of DTMCs and MDPs and extension .csl for properties of CTMCs.

PRISM Manual

Property Specification

[ View all ]