Joachim Klein
33ab0a4ecd
Modules2MTBDD: comment typo
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11942 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
f155656282
JDDVars: add method allZero() for obtaining a cubeset with all the variables negated
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11940 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
42c18cdfc0
prism.NondetModel: cleanup import
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11939 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
4e23441d17
ProbModel/NondetModel: add doReachability with seed states
Sometimes, we have additional knowledge which states of the model
(apart from the initial states) are guaranteed to be reachable.
The added method then provides a way to start the reachability computation
with those states as the seed, which can speed up the computation as less
unknown states have to be discovered.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11938 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
87e0da357d
prism.NondetModel: cody tidy in doReachability, set the result of reachability computation via setReach()
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11937 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
e7cd227ae7
Code documentation.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11930 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
c0e99cea6b
Error message typo.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11913 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
1e5d779cb3
prism-auto: In test mode, cleanup the temporary files used for capturing PRISM output
Due to the use of NamedTemporaryFile(delete=False) we actually have to
delete the log files ourselves.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11881 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
b203d6438d
prism-auto: Use line ending agnostic file compare
The previously used filecmp.cmp opens the files to be compared in 'rb'
mode, i.e., it will tell us that two files that differ only in the
line-ending encoding (CRLF vs LF) are not equivalent. However, we'd
like to get the export tests to succeed on Windows, regardless of the
line endings. So, we provide our own file comparison method that opens
the file in 'rU' mode (universal newline mode), which converts all the
newline encodings to '\n' transparently.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11880 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
fe533db326
prism-auto: Fix test-mode on Windows
Somehow, PRISM can not open a NamedTemporaryFile created on Windows
(see issue prismmodelchecker/prism#11 ) when passed the filename via
the -mainlog parameter.
So, on Windows, we fall back on the old method of capturing stdout
directly via the Popen call. As this does not work with nailgun (the
C printfs go to the nailgun server stdout), we currently don't allow
nailgun use on Windows.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11879 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
559c970ef7
NativeIntArray.cc: use ptr_to_jlong instead of a simple (long) cast
On Win64 long is 32bit.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11878 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
9ea91f2dd2
PrismUtils.formatDouble: Improve previous commit, strip trailing zeros for .xxx0000 as well
We want to strip trailing zeros (after the .) as well. This commit, together with the
previous one should provide the previous functionality, but fixing the issue with trailing
zeros for integers.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11860 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
d960f4b513
Fix in PrismUtils.formatDouble methods: Only remove trailing .000 not trailing zeros for integers [with Linda Leuschner]
The regular expression for identifying the trailing .0* part of the string
did not require the . to actually occur, which would also strip the zeros from
integers ending with zeros.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11859 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
ebd19aa9d6
Fix bug (two bugs, actually) in Gauss-Seidel solution of MDP expected reward to a target for models with self-loops.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11841 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
93c2138383
TestModelGenerator: correctly setup and tear down CUDD
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11831 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
526b0e7d8d
ModelGenerator2MTBDD: fix use of ModelVariablesDD, actually allocate variables via ModelVariablesDD
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11829 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
937a6c2a43
VarList: add getIndexFromDeclaration()
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11828 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
994b6207d9
AcceptanceGeneric: add toRabin() and toStreett() methods
These methods work for the case where the generic acceptance condition
has the required structure or can be easily padded to have the required
structure for Rabin / Streett.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11827 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
30ed75086f
AcceptanceGeneric: add and() and or() methods
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11826 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
16bbd0b24b
Prism: reset currentModel and currentModelExpl to null in clearBuiltModel()
Generally, as soon as clearBuiltModel is called, the models should not be
touched anymore. In doBuildModel, keep the null assignments for the
model storage variable for the unused engine.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11825 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
3d48780b8d
Refactor: Switch MTBDD variable handling for symbolic models to ModelVariablesDD infrastructure
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11824 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
a69f3d2e3f
prism/ModelVariablesDD: for handling the MTBDD variable related logic for symbolic models
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11823 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
0fb6ab0a53
JDDVars: add mergeVarsFrom(), sortByIndex() and removeVar() methods
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11822 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
8b07176df3
ModelGenerator2MTBDD: simplify reference handling, use JDDNode.copy(), JDD.DerefArray()
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11821 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
410b38ab30
Modules2MTBDD: simplify reference handling, use JDDNode.copy(), JDD.DerefArray()
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11820 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
4340969f70
JDD: Add DerefArray convenience method
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11819 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
d7c915394c
JDDVars: deprecate addVars() and refAll(), instead use copy() or copyVarsFrom()
Methods addVars and refAll are not used anymore on trunk. Using the copy methods
improves debugging of the reference counting.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11818 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
c8d545b4f2
ast.RelOp: for negate, optionally keep the strictness of the operator [with Steffen Maercker and Marcus Daum]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11817 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
f54feb473b
symbolic ProbModel: add method addUniqueLabelDD()
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11816 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
502faa6a26
explicit/symbolic: refactor checkExpressionLabel to use getLabelList()
For symbolic checkExpressionLabel, additionally ensure that no NullPointerException
is thrown if propertiesFile is null.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11815 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
b80f41d5bc
ModelExplicit: refactor addUniqueLabel to ensure that already defined label names are avoided
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11814 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
5a06f212a5
explicit/symbolic StateModelChecker: add methods getLabelList() and getDefinedLabelNames() to provide access to label namespace
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11813 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
eb5028dbf8
prism-auto: add --dd-warnings mode for printing the CUDD reference leak warnings
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11812 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
6bc5aefa50
Extend ModelGenerator2MTBDD to generate/store label info too.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11810 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
a7efdff3ca
Ignore "deadlock" label when loading from explicit files into symbolic engines (consistent with recent update to explicit engine import).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11809 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
3f7c3c57c8
Comment typo
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11807 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
79ce4075b3
Add a default implementation of ModelInfo.rewardStructHasTransitionRewards in DefaultModelGenerator (which returns true), plus some notes about this in the JavaDoc for related methods.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11806 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
a2ab087a55
Explicit model import via the explicit engine now respects the "fix deadlocks" setting and adds self-loops in deadlock states if needed.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11805 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
f1ce3e4fa8
Unbreak ModelGenerator2MTBDD: max number of nondet choices had been set to 1 for testing purposes.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11803 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
e113bff2c7
ModelInfo: add method to query the existence of transition rewards, add check for explicit DTMC/CTMC reward construction
During reward construction in the explicit engine using the new ModelGenerator
functionality (see SVN 11772), the check for transition rewards was missing
(he explicit engine currently does not support transition rewards for DTMCs and CTMCs).
This commit adds functionality to ModelInfo to determine whether a reward structure
defines transition rewards and adds a corresponding check during reward construction.
Example: prism-examples/dice/dice.pm with R=?[ F s=7 ] and -explicit returns 0 instead
of an error message.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11802 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
002257286d
Align parametric model construction with the non-parametric a little more.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11801 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
048017bb24
NondetModelChecker.checkExpressionMultiObjective(): BDD cleanup when computeMultiReachProbs throws Exception
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11800 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
28f66c6c69
BigRational: extend static BigRational from(Object value) to accept String value
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11799 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
8b569b9e4e
BigRational: Make the static final constants (ONE, INF, NAN, etc) public
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11798 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
1f9fb4d505
BigRational: When canceling, preserve NaN instead of converting to ZERO
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11797 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
97c72b534e
prism.UndefinedConstants: provide additional method removeConstants(Collection<String> constNames)
Refactor removeConstants(String[] constNames) to use that method as well.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11796 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
7e51a56157
Code tidy
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11795 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
544c1cbe65
Missing part of previous bigfix.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11794 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
19ec2f0a76
Refactor parametric model construction to use an extension of ModelGenerator instead of reading specifically from a ModulesFile. Needs further refactoring.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11793 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
4f491f9e07
Bug fix in test mode comparisons where expected result is an expression comprising a single constant.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11792 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago