Running PRISM /

Approximate Computation Of Quantitative Properties

The discrete-event simulator built in to PRISM (see the section "Debugging Models With The Simulator") can also be used to generate approximate values for PRISM properties which give quantitative results, namely properties of the form P=?[...] and R=?[...]. This is achieved by sampling: generating a large number of random runs through the model, evaluating the result of the given properties on each run, and then averaging the results. This approach is particularly useful on very large models when normal model checking is infeasible. This is because discrete-event simulation is performed using the PRISM language model description, without actually constructing the probabilistic model.

To use this functionality, load a model and some properties into PRISM, as described in the previous sections. To generate an approximate value for one or more properties, select them in the list, right-click and select "Simulate" (as opposed to "Verify"). As usual, it is first necessary to provide values for any undefined constants. Subsequently, a dialog appears. Here, the state for which values are to be computed (i.e. from which the paths will be generated) can be selected. By default, this is initial state of the model. The number of paths (samples) and the maximum length of each path which will be generated by PRISM to compute approximate values can be modified as required. The related parameters of confidence and approximation can also be viewed or edited. Informally, for a given number of paths, the probability that the difference between computed and actual answers is bigger than the approximation parameter is at most equal to the confidence parameter. See for example [HLMP04] for a more in-depth discussion of these concepts. By default in PRISM the approximation parameter is 0.01 and the confidence parameter is 1e-10. In this case, the number of paths/samples required is 402,412.

Finally, approximate generation of results can also be activated from the command-line using the -sim switch. To change the approximation parameter, confidence parameter, number of samples and maximum path length, respectively, use the switches -simapprox, -simconf, -simsamples and -simpathlen. Here is an example of activating the simulator from the command-line:

prism dice.pm dice.pctl -sim -simconf 1e-1

Currently, the simulator does not support every part of the PRISM modelling and property languages. For example, it does not handle models with multiple initial states or with system...endsystem definitions and it does not handle properties containing LTL-style path properties or arithmetic combinations of P=?[...] and R=?[...] properties.

PRISM Manual

Running PRISM

[ View all ]