Skip to content

Commit 17a47f8

Browse files
committed
Update manual.
1 parent a3475b9 commit 17a47f8

239 files changed

Lines changed: 2066 additions & 1552 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

manual/Appendices/AllOnOnePage.html

Lines changed: 82 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -244,41 +244,16 @@
244244
<div class='vspace'></div><h1><span class='big'>Appendices</span></h1>
245245
<hr />
246246
<h1>Explicit Model Files</h1>
247-
<p>This appendix details the (plain text) file formats used by PRISM for <a class='wikilink' href='../RunningPRISM/ExportingTheModel.html'>exporting</a> and <a class='wikilink' href='../RunningPRISM/ExplicitModelImport.html'>importing</a> models that have already been constructed, i.e., they comprise an explicit list of states, transitions, etc. making up the model, rather than a high-level model description in the <a class='wikilink' href='../ThePRISMLanguage/Main.html'>PRISM modelling language</a>.
247+
<p>This appendix details the plain text file formats used by PRISM for <a class='wikilink' href='../RunningPRISM/ExportingTheModel.html'>exporting</a> and <a class='wikilink' href='../RunningPRISM/ExplicitModelImport.html'>importing</a> models that have already been constructed, i.e., they comprise an explicit list of states, transitions, etc. making up the model, rather than a high-level model description in the <a class='wikilink' href='../ThePRISMLanguage/Main.html'>PRISM modelling language</a>.
248248
Below, we describe:
249249
</p>
250-
<div class='vspace'></div><ul><li><a href='AllOnOnePage.html#sta'>State (.sta) files</a>
251-
</li><li><a href='AllOnOnePage.html#tra'>Transitions (.tra) files</a>
250+
<div class='vspace'></div><ul><li><a href='AllOnOnePage.html#tra'>Transitions (.tra) files</a>
252251
</li><li><a href='AllOnOnePage.html#trarows'>Transitions (.tra) files (row form)</a>
253252
</li><li><a href='AllOnOnePage.html#lab'>Labels (.lab) files</a>
254253
</li><li><a href='AllOnOnePage.html#srew'>State rewards (.srew) files</a>
255254
</li><li><a href='AllOnOnePage.html#trew'>Transition rewards (.trew) files</a>
255+
</li><li><a href='AllOnOnePage.html#sta'>State (.sta) files</a>
256256
</li></ul><div class='vspace'></div><hr />
257-
<p class='vspace'><a name='sta' id='sta'></a>
258-
</p><h3>States (.sta) files</h3>
259-
<p>These contain an explicit list of the reachable states of a model. The first line is of the form <code>(v1,...,vn)</code>, listing the names of all the variables in the model in the order that they appear in the PRISM model. Subsequent lines list the values of the <code>n</code> variables in each state of the model. Each line is of the form <code>i:(x1,...,xn)</code>, where <code>i</code> is the index of the state (starting from 0) and <code>x1,...,xn</code> are the values of each variable in the state. States are ordered by their index (and, therefore, given PRISM's default behaviour, lexicographically according to the tuple of variable values).
260-
</p>
261-
<p class='vspace'>For the example PRISM model <a class='urllink' href='../uploads/poll2.sm.html'>poll2.sm</a>, the states file looks like:
262-
</p>
263-
<div class='vspace'></div>
264-
<div class='sourceblock ' id='sourceblock1'>
265-
<div class='sourceblocktext'><div class="text">(s,a,s1,s2)<br />
266-
0:(1,0,0,0)<br />
267-
1:(1,0,0,1)<br />
268-
2:(1,0,1,0)<br />
269-
3:(1,0,1,1)<br />
270-
4:(1,1,1,0)<br />
271-
5:(1,1,1,1)<br />
272-
6:(2,0,0,0)<br />
273-
7:(2,0,0,1)<br />
274-
8:(2,0,1,0)<br />
275-
9:(2,0,1,1)<br />
276-
10:(2,1,0,1)<br />
277-
11:(2,1,1,1)</div></div>
278-
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=1' type='text/plain'>[&#036;[Get Code]]</a></div>
279-
</div>
280-
281-
<div class='vspace'></div><hr />
282257
<p class='vspace'><a name='tra' id='tra'></a>
283258
</p><h3>Transitions (.tra) files</h3>
284259
<p>These contain an explicit list of the transitions making up a probabilistic model, i.e. they are essentially a sparse matrix representation of the transition probability/rate matrix. The first line of the file contains information about the size of the model, the remaining lines contain information about transitions, one per line.
@@ -294,7 +269,7 @@ <h1>Explicit Model Files</h1>
294269
<p class='vspace'>Here is an example, for the (DTMC) PRISM model <a class='urllink' href='../uploads/lec3.pm'>lec3.pm</a> (which looks like <a class='urllink' href='../uploads/lec3.dot.pdf'>this</a>):
295270
</p>
296271
<div class='vspace'></div>
297-
<div class='sourceblock ' id='sourceblock2'>
272+
<div class='sourceblock ' id='sourceblock1'>
298273
<div class='sourceblocktext'><div class="text">6 9<br />
299274
0 1 0.5<br />
300275
0 3 0.5<br />
@@ -305,13 +280,13 @@ <h1>Explicit Model Files</h1>
305280
3 3 1<br />
306281
4 4 1<br />
307282
5 2 1</div></div>
308-
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=2' type='text/plain'>[&#036;[Get Code]]</a></div>
283+
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=1' type='text/plain'>[&#036;[Get Code]]</a></div>
309284
</div>
310285

311-
<p class='vspace'>and here is one for the (CTMC) PRISM model <a class='urllink' href='../uploads/poll2.sm.html'>poll2.sm</a> (which looks like <a class='urllink' href='../uploads/poll2.dot.pdf'>this</a>):
286+
<p class='vspace'>and here is one for the (CTMC) PRISM model <a class='urllink' href='../uploads/poll2.sm'>poll2.sm</a> (which looks like <a class='urllink' href='../uploads/poll2.dot.pdf'>this</a>):
312287
</p>
313288
<div class='vspace'></div>
314-
<div class='sourceblock ' id='sourceblock3'>
289+
<div class='sourceblock ' id='sourceblock2'>
315290
<div class='sourceblocktext'><div class="text">12 22<br />
316291
0 1 0.5<br />
317292
0 2 0.5<br />
@@ -335,7 +310,7 @@ <h1>Explicit Model Files</h1>
335310
10 0 1<br />
336311
10 11 0.5<br />
337312
11 2 1</div></div>
338-
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=3' type='text/plain'>[&#036;[Get Code]]</a></div>
313+
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=2' type='text/plain'>[&#036;[Get Code]]</a></div>
339314
</div>
340315

341316
<p class='vspace'><strong>MDPs (or PAs)</strong>
@@ -351,7 +326,7 @@ <h1>Explicit Model Files</h1>
351326
<p class='vspace'>Here is an example, for the (MDP) PRISM model <a class='urllink' href='../uploads/lec12mdp.nm.html'>lec12mdp.nm</a> (which looks like <a class='urllink' href='../uploads/lec12mdp.dot.pdf'>this</a>):
352327
</p>
353328
<div class='vspace'></div>
354-
<div class='sourceblock ' id='sourceblock4'>
329+
<div class='sourceblock ' id='sourceblock3'>
355330
<div class='sourceblocktext'><div class="text">4 5 7<br />
356331
0 0 1 1 <br />
357332
1 0 0 0.7 <br />
@@ -360,13 +335,13 @@ <h1>Explicit Model Files</h1>
360335
1 1 3 0.5 <br />
361336
2 0 2 1 <br />
362337
3 0 3 1 </div></div>
363-
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=4' type='text/plain'>[&#036;[Get Code]]</a></div>
338+
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=3' type='text/plain'>[&#036;[Get Code]]</a></div>
364339
</div>
365340

366341
<p class='vspace'>and here is an action-labelled version of the same model, <a class='urllink' href='../uploads/lec12mdpa.nm.html'>lec12mdpa.nm</a> (which looks like <a class='urllink' href='../uploads/lec12mdpa.dot.pdf'>this</a>):
367342
</p>
368343
<div class='vspace'></div>
369-
<div class='sourceblock ' id='sourceblock5'>
344+
<div class='sourceblock ' id='sourceblock4'>
370345
<div class='sourceblocktext'><div class="text">4 5 7<br />
371346
0 0 1 1 a<br />
372347
1 0 2 0.5 c<br />
@@ -375,13 +350,56 @@ <h1>Explicit Model Files</h1>
375350
1 1 1 0.3 b<br />
376351
2 0 2 1 a<br />
377352
3 0 3 1 a</div></div>
353+
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=4' type='text/plain'>[&#036;[Get Code]]</a></div>
354+
</div>
355+
356+
<p class='vspace'><strong>POMDPs</strong>
357+
</p>
358+
<p class='vspace'>The format of a <code>.tra</code> file for a POMDP is similar to an MDP,
359+
but also contains information about observations.
360+
</p>
361+
<p class='vspace'>The first line of the file take the form "<code>n c m o</code>", where <code>n</code>, <code>c</code> and <code>m</code> are, as for MDPs, the numbers of states, choices and transitions,
362+
and <code>o</code> is the number of observations.
363+
The lines that list transitions contain an additional integer after the transition probability
364+
(and before the action, if present), giving the (deterministic) observation that is made
365+
when entering the target state of that transition.
366+
Currently, it is assumed that these are consistent for all states.
367+
</p>
368+
<p class='vspace'>In order to also specify the observation for the initial state,
369+
a dummy transition line of the form <code>- - s - o</code> is used,
370+
giving both the initial state <code>s</code> and its observation <code>o</code>.
371+
</p>
372+
<p class='vspace'>An example file is:
373+
</p>
374+
<div class='vspace'></div>
375+
<div class='sourceblock ' id='sourceblock5'>
376+
<div class='sourceblocktext'><div class="text">10 16 18 4<br />
377+
- - 0 - 0<br />
378+
0 0 1 0.1 1 toss<br />
379+
0 0 2 0.3 1 toss<br />
380+
0 0 3 0.6 1 toss<br />
381+
1 0 4 1 2 guess1<br />
382+
1 1 7 1 3 guess2<br />
383+
1 2 7 1 3 guess3<br />
384+
2 0 8 1 3 guess1<br />
385+
2 1 5 1 2 guess2<br />
386+
2 2 8 1 3 guess3<br />
387+
3 0 9 1 3 guess1<br />
388+
3 1 9 1 3 guess2<br />
389+
3 2 6 1 2 guess3<br />
390+
4 0 4 1 2 loop<br />
391+
5 0 5 1 2 loop<br />
392+
6 0 6 1 2 loop<br />
393+
7 0 7 1 3<br />
394+
8 0 8 1 3<br />
395+
9 0 9 1 3</div></div>
378396
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=5' type='text/plain'>[&#036;[Get Code]]</a></div>
379397
</div>
380398

381399
<div class='vspace'></div><hr />
382400
<p class='vspace'><a name='trarows' id='trarows'></a>
383401
</p><h3>Transitions (.tra) files (row form)</h3>
384-
<p>There is alternative format for transition matrices (see the <a class='wikilink' href='../RunningPRISM/ExportingTheModel.html#formats'>-exportrows</a> switch) where transitions for each state/choice are collated on a single line.
402+
<p>There is alternative format for transition matrices (see the <a class='wikilink' href='../RunningPRISM/ExportingTheModel.html#other'>rows</a> option for <code>-exportmodel</code>) where transitions for each state/choice are collated on a single line.
385403
</p>
386404
<p class='vspace'>Here is the result for the <a class='urllink' href='../uploads/lec3.pm'>lec3.pm</a> example from above (a DTMC):
387405
</p>
@@ -500,6 +518,32 @@ <h1>Explicit Model Files</h1>
500518
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=12' type='text/plain'>[&#036;[Get Code]]</a></div>
501519
</div>
502520

521+
<div class='vspace'></div><hr />
522+
<p class='vspace'><a name='sta' id='sta'></a>
523+
</p><h3>States (.sta) files</h3>
524+
<p>These contain an explicit list of the reachable states of a model. The first line is of the form <code>(v1,...,vn)</code>, listing the names of all the variables in the model in the order that they appear in the PRISM model. Subsequent lines list the values of the <code>n</code> variables in each state of the model. Each line is of the form <code>i:(x1,...,xn)</code>, where <code>i</code> is the index of the state (starting from 0) and <code>x1,...,xn</code> are the values of each variable in the state. States are ordered by their index (and, therefore, given PRISM's default behaviour, lexicographically according to the tuple of variable values).
525+
</p>
526+
<p class='vspace'>For the example PRISM model <a class='urllink' href='../uploads/poll2.sm'>poll2.sm</a>, the states file looks like:
527+
</p>
528+
<div class='vspace'></div>
529+
<div class='sourceblock ' id='sourceblock13'>
530+
<div class='sourceblocktext'><div class="text">(s,a,s1,s2)<br />
531+
0:(1,0,0,0)<br />
532+
1:(1,0,0,1)<br />
533+
2:(1,0,1,0)<br />
534+
3:(1,0,1,1)<br />
535+
4:(1,1,1,0)<br />
536+
5:(1,1,1,1)<br />
537+
6:(2,0,0,0)<br />
538+
7:(2,0,0,1)<br />
539+
8:(2,0,1,0)<br />
540+
9:(2,0,1,1)<br />
541+
10:(2,1,0,1)<br />
542+
11:(2,1,1,1)</div></div>
543+
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/Appendices/AllOnOnePage?action=sourceblock&amp;num=13' type='text/plain'>[&#036;[Get Code]]</a></div>
544+
</div>
545+
546+
<div class='vspace'></div>
503547
</div>
504548

505549

@@ -510,7 +554,7 @@ <h1>Explicit Model Files</h1>
510554
</p>
511555

512556
</div>
513-
<div id='prism-man-lastmod'>Page last modified on November 13, 2013, at 11:23 AM</div>
557+
<div id='prism-man-lastmod'>Page last modified on November 13, 2013, at 11:23 am</div>
514558
</div>
515559
<!--/PageFooterFmt-->
516560

manual/Appendices/AllOnOnePage@action=edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
</p>
227227

228228
</div>
229-
<div id='prism-man-lastmod'>Page last modified on November 13, 2013, at 11:23 AM</div>
229+
<div id='prism-man-lastmod'>Page last modified on November 13, 2013, at 11:23 am</div>
230230
</div>
231231
<!--/PageFooterFmt-->
232232

manual/Appendices/AllOnOnePage@action=login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
</p>
225225

226226
</div>
227-
<div id='prism-man-lastmod'>Page last modified on November 13, 2013, at 11:23 AM</div>
227+
<div id='prism-man-lastmod'>Page last modified on November 13, 2013, at 11:23 am</div>
228228
</div>
229229
<!--/PageFooterFmt-->
230230

0 commit comments

Comments
 (0)