If we are solving the transposed equation system, the solution vector
is over the column vars, not the row vars. This has to be taken into
account when exporting the iterations using -exportiterations.
install.sh attempts to replace PRISM_DIR=... with the actual PRISM directory
in the startup scripts contained in bin/ using a call to sed.
On MacOS, the system sed fails with 'RE error: illegal byte sequence' for binary
files, such as the .DS_Store files created by the Finder.
So, we exclude all files starting with a dot (.*) as well. Additionally,
we use `-iname` instead of `-name` in the find command for the matches
against '*.bat' and 'ngprism' to match insensitive to the case of the filename.
[adapted by @kleinj from PR #59]
In attachLabels(), avoid unnecessarily exploring the state space again
when the ModelGenerator indicates that labels aren't used (i.e. when
getNumLabels() == 0).
As noted in #48, DTMCUniformisedSimple does not implement the full range of ModelExplicit methods. Trying to use it outside of the areas where it's currently used in PRISM can then lead to NullPointerExceptions etc.
We add here accessors for the deadlock states, passing through the method calls to the underlying CTMC.
Additionally, point to the fully-featured uniformised DTMC object / construction method.
The location of the PRISM configuration file is now OS-dependent. On UNIX-like systems, following the XDG base directory specification, it is prism.settings in ~/.config (or in $XDG_CONFIG_HOME if that overrides it). On OS X, it is prism.settings in ~/Library/Preferences. On anything else it remains in ~/.prism.
If an existing configuration file exists in ~/.prism, that file is still used regardless of the OS.
Closes#38.
If there are exceptions during the iteration, we want to have a working HTML file with the iterations up to that point.
By flushing after each vector, we can ensure that the HTML is in a working state.
Switch from
... took X iterations, Y MV-multiplications and Z seconds.
to
... took X iterations, Y multiplications and Z seconds.
as MV-multiplications does not have a terribly intuitive meaning.
Previously, we'd print an 'Approximate result' in addition to the
exact rational number in exact mode:
Result (probability): 1/6
Approximate result: 0.16666666666666666
Result (probability): 1/6
Approximate result: 0.16666666666666666
Now, we rename that to 'As floating point' and
use BigRational.toApproximateString to print an
approximate result with ~ prefix, and an exact
floating point result without ~:
Result (probability): 1/6
As floating point: ~0.16666666666666666
Result (probability): 1/2
As floating point: 0.5
Now aligns with the default implementation in explicit.MDP: If there is a choice consisting of a self-loop,
produces value 0 for zero-reward state/choice and infinite value for positive-reward state/choice
(should be catched before in precomputations).
The previous behaviour (self-loops have infinite value) messes with maximal total reward computations with
Gauss-Seidel, e.g.
prism functionality/verify/mdps/rewards/total-reward-2.nm functionality/verify/mdps/rewards/total-reward-2.nm.props -explicit -gs -test -prop 3
for the PRISM test suite fails.
Also, align comments in MDP.mvMultRewJacMinMaxSingle.
For numerical results, support e.g.
// RESULT: ~0.1244123
to indicate that the result is known to be imprecise.
For the exact engine, provide better error reports:
- If result is not exactly as expected, check if it's numerically close
- If the expected result is marked as imprecise, don't consider as an error