You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: manual/Appendices/AllOnOnePage.html
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -256,7 +256,7 @@ <h1>Explicit Model Files</h1>
256
256
</li></ul><divclass='vspace'></div><hr/>
257
257
<pclass='vspace'><aname='sta' id='sta'></a>
258
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, or, equivalently, lexicographically according to the tuple of variable values.
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
260
</p>
261
261
<pclass='vspace'>For the example PRISM model <aclass='urllink' href='../uploads/poll2.sm.html'>poll2.sm</a>, the states file looks like:
262
262
</p>
@@ -285,9 +285,11 @@ <h1>Explicit Model Files</h1>
285
285
</p>
286
286
<pclass='vspace'><strong>DTMCs and CTMCs</strong>
287
287
</p>
288
-
<pclass='vspace'>For Markov chains the first line take the form "<code>n m</code>", giving the number of states (<code>n</code>) and the number of transitions (<code>m</code>). The remaining lines are of the form "<code>i j x</code>", where <code>i</code> and <code>j</code> are the row (source) and column (destination) indices of the transition, and <code>x</code> is the probability (for a DTMC) or rate (for a CTMC) of the transition. Row/column state indices are zero-indexed (i.e. between <code>0</code> and <code>n-1</code>). Probability/rate values are written as (positive) floating point numbers (examples: <code>0.5</code>, <code>.5</code>, <code>5.6e-6</code>, <code>1</code>).
288
+
<pclass='vspace'>For Markov chains the first line take the form "<code>n m</code>", giving the number of states (<code>n</code>) and the number of transitions (<code>m</code>). The remaining lines are of the form "<code>i j x</code>" or "<code>i j x a</code>", where <code>i</code> and <code>j</code> are the indices of the source state (row) and destination state (column) of the transition, and <code>x</code> is the probability (for a DTMC) or rate (for a CTMC) of the transition. State indices are zero-indexed (i.e. between <code>0</code> and <code>n-1</code>). Probability/rate values are written as (positive) floating point numbers (examples: <code>0.5</code>, <code>.5</code>, <code>5.6e-6</code>, <code>1</code>). <code>a</code> is optional and gives the action label for the transition. Action labels can be present for some, all or no transitions.
289
289
</p>
290
-
<pclass='vspace'>Often, the transition lines in the file are ordered by row index and then column index, but this is optional. For a DTMC, the probabilities for the outgoing transitions of each state should sum to 1.
290
+
<pclass='vspace'>It is assumed that source states (rows) are in ascending order, but there is no assumption about the ordering of destination states (columns) within the transitions for each source state.
291
+
</p>
292
+
<pclass='vspace'>For a DTMC, the probabilities for the outgoing transitions of each state should sum to 1.
291
293
</p>
292
294
<pclass='vspace'>Here is an example, for the (DTMC) PRISM model <aclass='urllink' href='../uploads/lec3.pm'>lec3.pm</a> (which looks like <aclass='urllink' href='../uploads/lec3.dot.pdf'>this</a>):
293
295
</p>
@@ -341,9 +343,10 @@ <h1>Explicit Model Files</h1>
341
343
<pclass='vspace'>For MDPs, the format is an extension of the above
342
344
To clarify terminology: each <em>state</em> of the MDP contains (nondeterministic) <em>choices</em>, each of which is essentially a probability distribution over successor states that we can view as a set of <em>transitions</em>. Optionally, each choice can be labelled with an <em>action</em>.
343
345
</p>
344
-
<pclass='vspace'>The first line of the file take the form "<code>n c m</code>", giving the number of states (<code>n</code>), the total number of choices (<code>c</code>) and the total number of transitions (<code>m</code>). The remaining lines are of the form "<code>i k j x</code>" or "<code>i k j x a</code>", where <code>i</code> and <code>j</code> are the row (source) and column (destination) indices of the transition, <code>k</code> is the index of the choice that it belongs to, and <code>x</code> is the probability of the transition. <code>a</code> is optional and gives the action label for the choice of the transition. Action labels can be present for some, all or no states but, in slightly redundant fashion, the action labels, if present, must be the same for all transitions belonging to the same choice.
346
+
<pclass='vspace'>The first line of the file take the form "<code>n c m</code>", giving the number of states (<code>n</code>), the total number of choices (<code>c</code>) and the total number of transitions (<code>m</code>). The remaining lines are of the form "<code>i k j x</code>" or "<code>i k j x a</code>", where <code>i</code> and <code>j</code> are the indices of the source state (row) and destination state (column) of the transition, <code>k</code> is the index of the choice that it belongs to, and <code>x</code> is the probability of the transition. <code>a</code> is optional and gives the action label for the choice of the transition. Action labels can be present for some, all or no states but, in slightly redundant fashion, the action labels, if present, must be the same for all transitions belonging to the same choice.
345
347
</p>
346
-
<pclass='vspace'>Row/column state indices and choice indices are all zero-indexed. Probability values (as above) are written as (positive) floating point numbers and should sum to 1 for each choice. Often, the transition lines in the file are ordered by row index, then choice index and then column index, but this is optional.
348
+
<pclass='vspace'>State indices and choice indices are all zero-indexed. Probability values (as above) are written as (positive) floating point numbers and should sum to 1 for each choice.
349
+
It is assumed that source states (rows) and choices within states are in ascending order, but there is no assumption about the ordering of destination states (columns) within the transitions for each choice.
347
350
</p>
348
351
<pclass='vspace'>Here is an example, for the (MDP) PRISM model <aclass='urllink' href='../uploads/lec12mdp.nm.html'>lec12mdp.nm</a> (which looks like <aclass='urllink' href='../uploads/lec12mdp.dot.pdf'>this</a>):
Copy file name to clipboardExpand all lines: manual/Appendices/AllOnOnePage@action=print.html
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ <h1>Explicit Model Files</h1>
128
128
</li></ul><divclass='vspace'></div><hr/>
129
129
<pclass='vspace'><aname='sta' id='sta'></a>
130
130
</p><h3>States (.sta) files</h3>
131
-
<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, or, equivalently, lexicographically according to the tuple of variable values.
131
+
<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).
132
132
</p>
133
133
<pclass='vspace'>For the example PRISM model <aclass='urllink' href='../uploads/poll2.sm.html'>poll2.sm</a>, the states file looks like:
134
134
</p>
@@ -157,9 +157,11 @@ <h1>Explicit Model Files</h1>
157
157
</p>
158
158
<pclass='vspace'><strong>DTMCs and CTMCs</strong>
159
159
</p>
160
-
<pclass='vspace'>For Markov chains the first line take the form "<code>n m</code>", giving the number of states (<code>n</code>) and the number of transitions (<code>m</code>). The remaining lines are of the form "<code>i j x</code>", where <code>i</code> and <code>j</code> are the row (source) and column (destination) indices of the transition, and <code>x</code> is the probability (for a DTMC) or rate (for a CTMC) of the transition. Row/column state indices are zero-indexed (i.e. between <code>0</code> and <code>n-1</code>). Probability/rate values are written as (positive) floating point numbers (examples: <code>0.5</code>, <code>.5</code>, <code>5.6e-6</code>, <code>1</code>).
160
+
<pclass='vspace'>For Markov chains the first line take the form "<code>n m</code>", giving the number of states (<code>n</code>) and the number of transitions (<code>m</code>). The remaining lines are of the form "<code>i j x</code>" or "<code>i j x a</code>", where <code>i</code> and <code>j</code> are the indices of the source state (row) and destination state (column) of the transition, and <code>x</code> is the probability (for a DTMC) or rate (for a CTMC) of the transition. State indices are zero-indexed (i.e. between <code>0</code> and <code>n-1</code>). Probability/rate values are written as (positive) floating point numbers (examples: <code>0.5</code>, <code>.5</code>, <code>5.6e-6</code>, <code>1</code>). <code>a</code> is optional and gives the action label for the transition. Action labels can be present for some, all or no transitions.
161
161
</p>
162
-
<pclass='vspace'>Often, the transition lines in the file are ordered by row index and then column index, but this is optional. For a DTMC, the probabilities for the outgoing transitions of each state should sum to 1.
162
+
<pclass='vspace'>It is assumed that source states (rows) are in ascending order, but there is no assumption about the ordering of destination states (columns) within the transitions for each source state.
163
+
</p>
164
+
<pclass='vspace'>For a DTMC, the probabilities for the outgoing transitions of each state should sum to 1.
163
165
</p>
164
166
<pclass='vspace'>Here is an example, for the (DTMC) PRISM model <aclass='urllink' href='../uploads/lec3.pm'>lec3.pm</a> (which looks like <aclass='urllink' href='../uploads/lec3.dot.pdf'>this</a>):
165
167
</p>
@@ -213,9 +215,10 @@ <h1>Explicit Model Files</h1>
213
215
<pclass='vspace'>For MDPs, the format is an extension of the above
214
216
To clarify terminology: each <em>state</em> of the MDP contains (nondeterministic) <em>choices</em>, each of which is essentially a probability distribution over successor states that we can view as a set of <em>transitions</em>. Optionally, each choice can be labelled with an <em>action</em>.
215
217
</p>
216
-
<pclass='vspace'>The first line of the file take the form "<code>n c m</code>", giving the number of states (<code>n</code>), the total number of choices (<code>c</code>) and the total number of transitions (<code>m</code>). The remaining lines are of the form "<code>i k j x</code>" or "<code>i k j x a</code>", where <code>i</code> and <code>j</code> are the row (source) and column (destination) indices of the transition, <code>k</code> is the index of the choice that it belongs to, and <code>x</code> is the probability of the transition. <code>a</code> is optional and gives the action label for the choice of the transition. Action labels can be present for some, all or no states but, in slightly redundant fashion, the action labels, if present, must be the same for all transitions belonging to the same choice.
218
+
<pclass='vspace'>The first line of the file take the form "<code>n c m</code>", giving the number of states (<code>n</code>), the total number of choices (<code>c</code>) and the total number of transitions (<code>m</code>). The remaining lines are of the form "<code>i k j x</code>" or "<code>i k j x a</code>", where <code>i</code> and <code>j</code> are the indices of the source state (row) and destination state (column) of the transition, <code>k</code> is the index of the choice that it belongs to, and <code>x</code> is the probability of the transition. <code>a</code> is optional and gives the action label for the choice of the transition. Action labels can be present for some, all or no states but, in slightly redundant fashion, the action labels, if present, must be the same for all transitions belonging to the same choice.
217
219
</p>
218
-
<pclass='vspace'>Row/column state indices and choice indices are all zero-indexed. Probability values (as above) are written as (positive) floating point numbers and should sum to 1 for each choice. Often, the transition lines in the file are ordered by row index, then choice index and then column index, but this is optional.
220
+
<pclass='vspace'>State indices and choice indices are all zero-indexed. Probability values (as above) are written as (positive) floating point numbers and should sum to 1 for each choice.
221
+
It is assumed that source states (rows) and choices within states are in ascending order, but there is no assumption about the ordering of destination states (columns) within the transitions for each choice.
219
222
</p>
220
223
<pclass='vspace'>Here is an example, for the (MDP) PRISM model <aclass='urllink' href='../uploads/lec12mdp.nm.html'>lec12mdp.nm</a> (which looks like <aclass='urllink' href='../uploads/lec12mdp.dot.pdf'>this</a>):
0 commit comments