Joachim Klein
aec833edfd
explicit.MDP: move mvMultMinMax, mvMultGSMinMax, mvMultRewMinMax, mvMultRewGSMinMax from MDPExplicit to default methods in MDP
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12099 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
1dd339ede5
explicit.DTMC: mvMultRewGS for Gauss-Seidel style reward computations
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12098 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
a89228dff1
explicit.DTMC: provide mv... methods for Jacobi-style iteration
mvMultJac, mvMultRewJac, mvMultRewJacSingle
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12097 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
a29887d36d
explicit.DTMC: provide variants for mvMult, mvMultGS, mvMultRew, taking OfInt iterators
This allows finer grained control over the iteration order.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12096 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
11fde2c393
explicit.DTMC: provide default implementations for mvMultSingle, mvMultJacSingle, mvMultRewSingle, vmMult (based on forEachTransition / sumOverTransition)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12095 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
3fbc7903dc
explicit.DTMCFromMDPAndMDStrategy: simplify getTransitionsIterator, provide forEachTransition specialization
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12094 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
0c08af644d
explicit.DTMCEmbeddedSimple: simplify getTransitionsIterator, provide forEachTransition specialization
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12093 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
f669ac11d9
explicit.DTMC/MDP: provide forEachTransition and sumOverTransitions methods
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12092 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
2bd70172ce
explicit.DTMC, refactor: move mvMult, mvMultGS, mvMultRew from DTMCExplicit to default methods in DTMC
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12091 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
ae1bbd379e
explicit.MDPSimple: remove specializations for prob0/prob1, use default methods from explicit.MDP
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12090 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
cd9b1f4285
explicit.MDP, refactor: provide default prob0 / prob1 related methods
prob0step, prob1Astep, prob1Estep, prob1step, prob1stepSingle
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12089 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
2bcdab29a5
explicit.NondetModel: provide default successorsSafeAndCanReach methods
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12088 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
1a12114f30
explicit.DTMC, refactor: remove specialized prob0step, prob1step in sub-classes in favor of default methods in DTMC
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12087 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
ed6c0a1cfb
explicit.DTMC, refactor: provide default implementation for prob0step and prob1step, as well as new single state prob0step, prob1step methods
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12086 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
985a939102
refactor explicit.Model/NondetModel, getSuccessorsIterator: new abstract method getSuccessors, getSuccessorsIterator becomes default method
The getSuccessorsIterator provides an iterator over the set of successors,
i.e., deduplication is sometimes required (e.g. for MDPs).
We introduce here a SuccessorsIterator class that allows to make deduplication
optional, which may have benefits in performance. Additionally, SuccessorsIterator
implements a primitive OfInt iterator, which can avoid auto-boxing.
Subclasses of explicit.Model now have to provide an implementation for getSuccessors(int s),
getSuccessorsIterator(int s) is provided via a default method that automatically
requests deduplication.
Subclasses of explicit.NondetModel now have to provide an implementation for getSuccessors(int s, int).,
getSuccessorsIterator(int s, int i) is provided via a default method that automatically
requests deduplication.
Adapt the existing subclasses of explicit.Model.
Provides additional default methods and removes unneeded specializations in sub-classes:
boolean isSuccessor(int s1, int s2)
boolean allSuccessorsInSet(int s, BitSet set)
boolean someSuccessorsInSet(int s, BitSet set)
boolean allSuccessorsMatch(int s, IntPredicate p)
boolean someSuccessorsMatch(int s, IntPredicate p)
and for NondetModel:
boolean allSuccessorsInSet(int s, int i, BitSet set)
boolean someSuccessorsInSet(int s, int i, BitSet set)
boolean allSuccessorsMatch(int s, int i, IntPredicate p)
boolean someSuccessorsMatch(int s, int i, IntPredicate p)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12085 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
1fc8dfa9c4
(export-iterations) Explicit engine (DTMC/MDP): If enabled, export iterations to HTML file
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12077 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
30f7def86c
(export-iterations) introduce --exportiterations option, ExportIterations helper classes for C and Java
Generates HTML file with the individual steps of the iterative procedures.
Relies on external JavaScript and CSS.
Is already prepared for exporting interval iteration steps (possibility
to export multiple vectors with type flag per iteration step)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12073 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
37dff4f997
explicit: Use LTL2WDBA construction to obtain DFA for co-safe LTL reward computations
The DFA needed for co-safe LTL reward computation need to have a
specific structure, i.e., all states that satisfy Sigma^omega have
to be already goal states.
The previous approach did not necessarily ensure this.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12065 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
9ef03e0c11
LTLModelCheckers: constructDFAForCosafetyRewardLTL
This method constructs a DFA for a co-safe LTL formula
with appropriate semantics for co-safe LTL reward computations.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12064 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
1071b362e7
explicit LTL, DTMC/MDP product: report product construction time, product statistics
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12046 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
c2fa14a35b
explicit DTMC LTL checker: support all acceptance types
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12045 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
c809c66ae9
explicit.MDPModelChecker: Rmax[ C ] (total reward) computation
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12030 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
c4ed300c01
Add state reward export for explicit engine; also some refactoring of reward exporting
(in particular, move logic for splitting into multiple reward files up to prism.Prism)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12001 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
885ae560a7
explicit: Improve error message for unsupported multi-objective model checking
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11994 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
0ee323ea6a
explicit.MDPModelChecker: implement instantaneous reward computation (Rmax/min [I=x])
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11979 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
01a398bbc0
explicit.DTMCModelChecker.computeTotalRewards: use predecessor-relation-based computations for prob0
Previous behavior available via -noprerel switch.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11978 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
c7c8c8a7ff
explicit.DTMCModelChecker.computeReachRewards: use predecessor-relation-based computation for prob1
Previous behavior available using -noprerel switch.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11977 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
28b741819d
Optimise computation of expected instantaenous rewards (R[I=k]) for DTMCs when the value is only required for one state (explicit engine).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11975 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
b9a8cada88
Add DTMC transient probability computation for explicit engine.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11974 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Dave Parker
700a13f030
Refactoring in explicit CTMC model checker to reuse existing methods.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11973 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
10 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
10 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
10 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
10 years ago
Dave Parker
3f7c3c57c8
Comment typo
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11807 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 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
10 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
10 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
10 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
10 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
10 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
10 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
10 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
10 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
10 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
10 years ago
Joachim Klein
55c0034a18
explicit model import: some more minor fixes to set correct initial states
Followup to SVN 11744.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11746 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Dave Parker
81451753d1
Bug fix for explicit engine model import - we should not assume that the initial state is 0. This also highlights a bug that ModelExplicit should store initial states as a state, not a list, but that issue is not fixed here.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11744 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
541e995741
explicit.ExplicitFiles2Model: explicit model import
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11733 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
d4ffeac654
explicit.MDPSimple: more flexible buildFromPrismExplicit() [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11732 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago
Joachim Klein
edbb99fdb4
explicit.DTMSimple: use auto-close in buildFromPrismExplicit(), better error message (with Steffen Maercker)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11731 bbc10eb1-c90d-0410-af57-cb519fbb1720
10 years ago