Property Specification /

Quantitative Properties

It is very often useful to take a quantitative approach to probabilistic model checking, computing the actual probability that some behaviour of a model is observed, rather than just verifying whether or not the probability is above or below a given bound. Hence, PRISM allows the P operator to take the following form:

P=? [ pathprop ]

These properties return a numerical rather than a Boolean value. The S and R operators, discussed later, can also be used in this way.

Note that the probability bound on a P operator can only be replaced with =? if it is the outermost operator of the property in which it appears; otherwise the semantics are not well defined. Note also that, for MDPs, the situation is slightly more complex. Probabilities for an MDP can only be computed once the nondeterminism has been resolved. Hence, PRISM actually computes either the minimum or maximum probability of a path property being satisfied, quantifying over all possible resolutions (i.e. the best and worst cases). Therefore, for MDPs we have two possible types of property:

Pmin=? [ pathprop ]
Pmax=? [ pathprop ]

which return the minimum and maximum probabilities, respectively.

All of these operators return a single numerical value. In the simplest case, where the model being verified has a single initial state, the numerical value returned is the one corresponding to that state. Hence, for example:

P=? [ F x=5&y=5 ]

returns the probability of, from the initial state, reaching a state satisfying x=5&y=5. It is also possible, however, to obtain the probability for an arbitrary state, by specifying an atomic proposition, true only in that state, inside braces ({...}) before the closing ] bracket. This is known as a filter. For example, if the model contains two variables, X and y, then:

P=? [ F x=5&y=5 {x=1&y=2} ]

returns the probability of, from the state (1,2) (i.e. x=1 and y=2), reaching a state satisfying x=5&y=5. It is possible of course that the expression in the filter satisfies more than one state. If this the case, by default the first such state (lexicographically) is chosen. In this situation, PRISM will display a warning to notify you that the expression in the filter matched multiple states and will display what the first matching state is. The same approach is taken in the situation where no filter is given but the model contains multiple initial states. In this case, the numerical result obtained is for the first (lexicographically speaking) of the set of initial states. Note that if the expression in the filter is not satisfied by any states of the model, an error is reported.

It is also possible to possible to request either the minimum and maximum value from a set of values. For example:

P=? [ F x=5&y=5 {y=2}{min} ]
P=? [ F x=5&y=5 {y=2}{max} ]

return the minimum and maximum probability, respectively, of reaching a state satisfying x=5&y=5 from all the states satisfying y=2. In addition, PRISM will report the states of the model in which the minimum or maximum probability is attained. You can in fact also request that both the minimum and maximum value are computed simultaneously using, for example, {y=2}{min}{max}. In this case, both values will be reported, but the actual return value of the property will be the minimum value.

Finally, note that filters can also be used for classical (bounded) P properties. This has no bearing on the result of model checking a property; it simply causes the probabilities (where non-zero) for all states satisfying the expression in the filter to be printed during model checking (in the log, if using the GUI, or to the screen, if using the command-line). For example:

P>0.5 [ F x=5&y=5 {y=2} ]

will return a Boolean value, depending whether the property is true in all states of the model or not, but the probability (where non-zero) of path property F x=5&y=5 being satisfied will be displayed for all states where y=2.

PRISM Manual

Property Specification

[ View all ]