You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

205 lines
15 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
PRISM Manual | RunningPRISM / ParametricModelChecking
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="prism, probabilistic, symbolic, model, checker, verification, birmingham, oxford, parker, norman, kwiatkowska">
<link rel="icon" href="../pub/skins/offline/images/p16.ico" type="image/x-icon">
<link rel="shortcut icon" href="../pub/skins/offline/images/p16.ico" type="image/x-icon">
<!--HTMLHeader--><style type='text/css'><!--
ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
code.escaped { white-space: nowrap; }
.vspace { margin-top:1.33em; }
.indent { margin-left:40px; }
.outdent { margin-left:40px; text-indent:-40px; }
a.createlinktext { text-decoration:none; border-bottom:1px dotted gray; }
a.createlink { text-decoration:none; position:relative; top:-0.5em;
font-weight:bold; font-size:smaller; border-bottom:none; }
img { border:0px; }
.editconflict { color:green;
font-style:italic; margin-top:1.33em; margin-bottom:1.33em; }
table.markup { border:2px dotted #ccf; width:90%; }
td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
table.vert td.markup1 { border-bottom:1px solid #ccf; }
table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; }
table.markup caption { text-align:left; }
div.faq p, div.faq pre { margin-left:2em; }
div.faq p.question { margin:1em 0 0.75em 0; font-weight:bold; }
div.faqtoc div.faq * { display:none; }
div.faqtoc div.faq p.question
{ display:block; font-weight:normal; margin:0.5em 0 0.5em 20px; line-height:normal; }
div.faqtoc div.faq p.question * { display:inline; }
.frame
{ border:1px solid #cccccc; padding:4px; background-color:#f9f9f9; }
.lfloat { float:left; margin-right:0.5em; }
.rfloat { float:right; margin-left:0.5em; }
a.varlink { text-decoration:none; }
.sourceblocklink {
text-align: right;
font-size: smaller;
}
.sourceblocktext {
padding: 0.5em;
border: 1px solid #808080;
color: #000000;
background-color: #f1f0ed;
}
.sourceblocktext div {
font-family: monospace;
font-size: small;
line-height: 1;
height: 1%;
}
.sourceblocktext div.head,
.sourceblocktext div.foot {
font: italic medium serif;
padding: 0.5em;
}
--></style> <meta name='robots' content='index,follow' />
<link type="text/css" rel="stylesheet" href="../pub/skins/offline/css/base.css">
<link type="text/css" rel="stylesheet" href="../pub/skins/offline/css/prism.css">
<link type="text/css" rel="stylesheet" href="../pub/skins/offline/css/prismmanual.css">
</head>
<body text="#000000" bgcolor="#ffffff">
<div id="layout-maincontainer">
<div id="layout-main">
<div id="prism-mainbox">
<!-- ============================================================================= -->
<!--PageHeaderFmt-->
<!--/PageHeaderFmt-->
<!--PageTitleFmt-->
<div id="prism-man-title">
<p><a class='wikilink' href='Main.html'>Running PRISM</a> /
</p><h1>Parametric Model Checking</h1>
</div>
<!--PageText-->
<div id='wikitext'>
<p>Often, PRISM models contain <a class='wikilink' href='../ThePRISMLanguage/Constants.html'>constants</a>, representing parameters of the system being modelled, which define for example the transition probabilities in the model. In order to perform model checking, these constants have to be assigned concrete values. PRISM also allows <a class='wikilink' href='Experiments.html'>experiments</a>, where model checking is performed for a range of different values for the constants.
</p>
<p class='vspace'>PRISM's <em>parametric model checking</em> [<a class='wikilink' href='../Main/References.html#HHZ11b'>HHZ11b</a>],[<a class='wikilink' href='../Main/References.html#HHZ11'>HHZ11</a>] functionality, however, provides a more powerful method for analysing probabilistic models whose transition probabilities are specified as functions over a set of parameters. Depending on the property under consideration, the result is then given as either a rational function over the parameters or as a mapping from regions of these parameters to rational functions or truth values. This function (or functions) can then be used to, for example:
</p>
<div class='vspace'></div><ul><li>plot a graph showing how the parameter affects the result of the property; or
<div class='vspace'></div></li><li>use optimisation methods to find parameter values that minimise or maximise the result.
</li></ul><p class='vspace'>PRISM's implementation of parametric model checking [<a class='wikilink' href='../Main/References.html#CHH+13'>CHH+13</a>] re-implements the techniques previously included in the <a class='urllink' href='http://depend.cs.uni-sb.de/tools/param/'>PARAM</a> tool.
</p>
<p class='vspace'>Parameters are specified as undefined constants in the model file, e.g.:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock1'>
<div class='sourceblocktext'><div class="prism"><span class="prismkeyword">const</span> <span class="prismkeyword">double</span> <span class="prismident">x</span>;<br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/RunningPRISM/ParametricModelChecking?action=sourceblock&amp;num=1' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>These parameters can only be used to describe probabilities (or rates). For example:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock2'>
<div class='sourceblocktext'><div class="prism">[] <span class="prismident">s</span>=<span class="prismnum">0</span> -&gt; <span class="prismident">x</span> : (<span class="prismident">s</span>'=<span class="prismnum">1</span>) + <span class="prismnum">1</span>-<span class="prismident">x</span> : (<span class="prismident">s</span>'=<span class="prismnum">2</span>);<br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/RunningPRISM/ParametricModelChecking?action=sourceblock&amp;num=2' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>They may not be used in guards or updates. The parametric definitions of probabilities or rates (e.g. <code>x</code> and <code>1-x</code> in the above) must be rational functions (fractions of polynomials). PRISM currently supports parametric versions of discrete-time Markov chains (DTMCs), continuous-time Markov chains (CTMCs) and Markov decision processes (MDPs). The classes of properties that be checked on these models are as follows:
</p>
<div class='vspace'></div><ul><li>parametric DTMCs/CTMCs: unbounded until, steady-state probabilities, reachability reward and steady-state reward;
<div class='vspace'></div></li><li>parametric MDPs: unbounded until and reachability rewards.
</li></ul><p class='vspace'>Currently, parametric model checking can only be performed from the command-line. This is done by using the switch <code>-param &lt;vals&gt;</code>, where <code>&lt;vals&gt;</code> lists the undefined constants that should be treated as parameters. A range of possible values should also be provided for each parameter, in the form <code>&lt;parameter&gt;=&lt;lower-bound&gt;:&lt;upper-bound&gt;</code>. For example:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock3'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;">prism model.pm model.props -param x=0.2:0.4,y=-2:2</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/RunningPRISM/ParametricModelChecking?action=sourceblock&amp;num=3' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>would specify a parameter <code>x</code> with lower bound 0.2 and upper bound 0.4, and a parameter <code>y</code> with values between -2 and 2. You can also omit the bounds for a parameter, in which case it will be assumed to have range 0 to 1.
</p>
<p class='vspace'>The result of parametric model checking will be a mapping from regions (subsets of parameter valuations) to functions over the parameters. The regions are given as hyper-rectangles, e.g. "[ [0.2,0.3],[-2,0] ]" would represent the region of parameter valuations in which the first parameter is between 0.2 and 0.3 and the second is between -2 and 0. The results obtained are exact, that is no rounding errors are made during computation. Here is an example of the output of model checking:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock4'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;">prism model.pm model.props -param x=0:1</span><br/>
<span style="font-style:italic;">...</span><br/>
<span style="font-style:italic;">Result: ([0.0,1.0]): { 2 x - 5 | 8 x - 12 }</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/RunningPRISM/ParametricModelChecking?action=sourceblock&amp;num=4' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>which indicates that, for the full range ([0,1]) of the parameter <code>x</code>, the result of model checking is the expression <code>(2x-5)/(8x-2)</code>.
</p>
<p class='vspace'>Parametric model checking can be configured with the following options:
</p>
<div class='vspace'></div><ul><li><code>-paramprecision &lt;x&gt;</code>: PRISM uses regions in the form of hyper-rectangles to subsume parameter valuations with the same rational function or truth value. Because it is not always possible to cover the whole parameter space with hyper-rectangles, this option can be used to specify a <em>precision</em>, that is, an amount of the parameter space which may remain undecided. The default is 5/100.
<div class='vspace'></div></li><li><code>-paramsplit &lt;name&gt;</code>: During model checking, undecided regions may have to be split into several parts, because there might not exist a single rational function or truth value to which all parameter valuations of the original regions can be mapped. When a region is split, it can either be split at only its longest side (<code>&lt;name&gt;=longest</code>) or at all all sides at once (<code>&lt;name&gt;=all</code>). The default is <code>longest</code>.
<div class='vspace'></div></li><li><code>-parambisim &lt;name&gt;</code>: The parametric analysis is costly in terms of time and memory, so it can help to perform bisimulation minimisation to speed up the analysis and use less memory. The possible options here are to use weak bisimulation (<code>&lt;name&gt;=weak</code>), strong bisimulation (<code>&lt;name&gt;=strong</code>) or none at all (<code>&lt;name&gt;=none</code>). The default is <code>weak</code>. In case an analysis is to be performed for which the current bisimulation type does not maintain validity of the results (e.g. weak bisimulation and a steady state analysis), an appropriate bisimulation engine is chosen automatically.
<div class='vspace'></div></li><li><code>-paramfunction &lt;name&gt;</code>: Sets the way rational functions are represented. Currently, only <a class='urllink' href='http://krum.rz.uni-mannheim.de/jas/'>Java Algebra System (JAS)</a> is supported. The options are to use JAS directly (<code>&lt;name&gt;=jas</code>) or to use a version in which results of some previous mathematical operations performed during the analysis are cached (<code>&lt;name&gt;=jas-cached</code>). This can speed up computation, but also needs more memory. The default is to use the cached version.
<div class='vspace'></div></li><li><code>-paramelimorder &lt;name&gt;</code>: In the parametric engine, computations are performed by "eliminating" one state after the other, that is completely treating a state together with its incoming and outgoing transitions, rather than performing iterative methods. This option sets the order in which states are eliminated. The values currently available are: arbitrary order (<code>&lt;name&gt;=arbitrary</code>), forward starting from the initial states (<code>&lt;name&gt;=forward</code>), reversed forward order (<code>&lt;name&gt;=forward-reversed</code>), starting with target/unsafe states and then going backward (<code>&lt;name&gt;=backward</code>), the reverse of this order (<code>&lt;name&gt;=backward-reversed</code>) or random order (<code>&lt;name&gt;=random</code>). The default is the backward order.
<div class='vspace'></div></li><li><code>-paramrandompoints &lt;n&gt;</code>: Under some conditions, it has to be decided whether certain properties hold for all parameter valuations of a given region. This is the case for instance when computing truth values of properties for parametric DTMCs, CTMCs and MDPs, and also when computing any value for MDPs. At the moment, the truth values are only computed approximately, by evaluating and checking values at the edges of regions (as they are hyper-rectangles) and some random points. The exact number of random points to use is given with this option. The default is 5.
<div class='vspace'></div></li><li><code>-paramsubsumeregions &lt;b&gt;</code>: During the parametric analysis, quite a number of different regions might be created, which have to be stored in memory. If this option is used (<code>&lt;b&gt;=true</code>), PRISM tries to subsume neighbouring regions with the same value. The default is to use it.
</li></ul>
</div>
<!--PageFooterFmt-->
<div id='prism-man-footer'>
</div>
<!--/PageFooterFmt-->
<!-- ============================================================================= -->
</div> <!-- id="prism-mainbox" -->
</div> <!-- id="layout-main" -->
</div> <!-- id="layout-maincontainer" -->
<div id="layout-leftcol">
<div id="prism-navbar2">
<h3><a class='wikilink' href='../Main/Main.html'>PRISM Manual</a></h3>
<p><strong><a class='wikilink' href='Main.html'>Running PRISM</a></strong>
</p><ul><li><a class='wikilink' href='Main.html'>Starting PRISM</a>
</li><li><a class='wikilink' href='LoadingAndBuildingAModel.html'>Loading And Building a Model</a>
</li><li><a class='wikilink' href='DebuggingModelsWithTheSimulator.html'>Debugging Models With The Simulator</a>
</li><li><a class='wikilink' href='ExportingTheModel.html'>Exporting The Model</a>
</li><li><a class='wikilink' href='ModelChecking.html'>Model Checking</a>
</li><li><a class='wikilink' href='ApproximateModelChecking.html'>Statistical Model Checking</a>
</li><li><a class='wikilink' href='ComputingSteady-stateAndTransientProbabilities.html'>Computing Steady-state And Transient Probabilities</a>
</li><li><a class='wikilink' href='Experiments.html'>Experiments</a>
</li><li><a class='wikilink' href='Adversaries.html'>Adversaries</a>
</li><li><a class='wikilink' href='SupportForPEPAModels.html'>Support For PEPA Models</a>
</li><li><a class='wikilink' href='SupportForSBML.html'>Support For SBML</a>
</li><li><a class='wikilink' href='ExplicitModelImport.html'>Explicit Model Import</a>
</li><li><a class='selflink' href='ParametricModelChecking.html'>Parametric Model Checking</a>
</li></ul><p>[ <a class='wikilink' href='AllOnOnePage.html'>View all</a> ]
</p>
</div> <!-- id="prism-navbar2" -->
</div> <!-- id="layout-leftcol" -->
</body>
</html>