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
Dave Parker
37543a928d
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@11791 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
f4bae778ce
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@11790 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
d126a8ae21
prism/Makefile: remove lib/prism.jar on clean
If lib/prism.jar exists (built by 'binary' target), it takes
precedence over newly compiled .class files. This is confusing, as
changing some sources, running 'make clean all' and then running PRISM
results in the "old" behaviour contained in lib/prism.jar.
Now, we remove lib/prism.jar on 'make clean'.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11789 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
5fcf8f50e6
Makefile: compile ngprism with CFLAGS instead of CPPFLAGS options (calls C compiler)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11788 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
72d08b9407
hybrid engine: consistently use delete[] when destroying solution vectors
Technically, using 'plain' delete for deleting objects allocated with
new[] is undefined behaviour. In practice, this didn't appear to be a
problem.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11787 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
9850ae3c71
sparse engine: consistently use delete[] when destroying solution vectors
Technically, using 'plain' delete for deleting objects allocated with new[] is
undefined behaviour. In practice, this didn't appear to be a problem.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11786 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
08482e9f0d
ExpressionReward: provide static variants of getRewardStructByIndexObject and getRewardStructIndexByIndexObject
Allows resolving of reward structure index objects when they occur outside of R operators.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11785 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
6935798edf
explicit.ProbModelChecker: provide constructRewards(model, rewardStructureIndex)
Deprecate the previous methods using RewardStruct, as those don't work with
arbitrary model generators.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11784 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
9890d74315
Various improvements focused on the ModelGenerator interface:
- Extended functionality available through the prism.Prism API when using ModelGenerators
- Improvements to ModelGenerator interface wrt handling of rewards (and also labels)
- Explicit engine model checkers now build rewards from a ModelGenerator, not a RewardStruct.
This is now (optionally) attached with the setModulesFileAndPropertiesFile method.
- New code to generate symbolic models from ModelGenerators (useful, if not super efficient)
- Move createVarList() method from ModelGenerator up to ModelInfo
- Some code tidying in LabelList
Code was previously at https://github.com/prismmodelchecker/prism-svn/tree/model-generator
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11772 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
4ad8e43e9f
Deal with module/model alphabets properly in PTAs, in particular when storing PTAs internally using pta.PTA. The definition of the alphabet of a PTA from a PRISM model is now correct and inline with the defition for other models.
Fixes https://github.com/prismmodelchecker/prism/issues/10
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11770 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
e38ea63e89
Fix U>=t computations for CTMC, explicit engine [with Marcus Daum]
The unbounded until computation has to be carried out on the embedded DTMC.
Fixes issue prismmodelchecker/prism#9 .
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11768 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
7615d9fcd8
Fix handling of PRISM_DEBUG and PRISM_DEBUG_ARG variables in launch scripts so that the scripts work when they are not set.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11767 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
241547abe9
Add PRISM_DEBUG and PRISM_DEBUG_ARG variables to launch scripts, which allow debugging of C++ code, as described at http://www.prismmodelchecker.org/wiki/Developers/Debugging .
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11766 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
338ef64bb6
Revert SVN 11756 "add jltl2ba.MyBitSet.clone()", breaks LTL->NBA generation
Sorry about that.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11762 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
3b68b5e0a9
Bug fix: respect disable_selfloop setting during adversary generation in LP-based multi-objective model checking.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11761 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
3b4cb29c2c
parser.Values: use PrismUtils.formatDouble for double formatting
Fixes issue #1 .
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11760 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
ee4f2d2941
ExpressionTemporal: static constructors for the temporal operators
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11759 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
04bf278fd3
ExpressionTemporal: add Javadoc comments, fix getNumOperands() (is not used)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11758 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
f64be5223a
ExpressionTemporal: convenience methods for testing for the various top-level temporal operators
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11757 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
7317c5f066
add jltl2ba.MyBitSet.clone()
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11756 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
a4536fef48
add NBA.getSuccessors
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11755 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
3d51fd0f8f
ExpressionUnaryOp, ExpressionBinaryOp: setOperator from symbol (string), for convenience
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11754 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
c076b3e005
explicit.ModelTransformation: remove unnecessary Exception [from Steffen Märcker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11753 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
9a2d757554
explicit.ConstructRewards: error on negative rewards, use automatic close for BufferedReader
Optionally, negative rewards can also be accepted to allow dealing with weights in other branches.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11752 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
3d1ee7a66f
LTL2DA.convertLTLFormulaToDAWithExternalTool: honor PRISM_NO_DA_SIMPLIFY setting
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11751 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
5c68cf3c2b
param.BigRational: fix BigRational.MONE definition
MONE is not used in the current code base.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11750 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
494f61adeb
PrismSTPGAbstractRefine: cleanup refactoring from SVN 11747
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11749 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
890620fd5f
PrismSTPGAbstractRefine: set initial states from the label file
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11748 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
0667019a05
explicit: Make calls to StateModelChecker.loadLabelsFile static
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11747 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago