Joachim Klein
2fe2f918b3
explicit.MDPSparse: add constructor from arbitrary MDP [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12124 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
265e827391
explicit.ZeroRewardECQuotient
Quotient of an MDP where the zero-reward maximal end components
are collapsed to single states.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12123 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
03dafaa170
explicit.modelviews: Various helpers for providing modified views of a given DTMC / MDP [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12122 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
ec4e55d708
IteratorTools [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12121 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
61701b9f1b
some more helpers for iterators / predicates [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12120 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
86f75d975a
explicit.BasicModelTransformation [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12119 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
7073b3bc4e
explicit.StateValues: getType()
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12118 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
798dd1e859
Distribution: provide constructor from Iterator over the transitions (Entry<Integer, Double>)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12117 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
20ae1aa61d
(for trunk) PeriodicTimer
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12116 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
881a571870
explicit DOT export: support decorators
This commit refactors the exportToDotFile infrastructure of
the explicit engine to allow the flexible decoration of the
nodes and edges in the DOT file, e.g., for annotating rewards,
marking certain states, etc.
We provide default implementations in explicit.Model for most methods,
only exportTransitionsToDotFile needs to be provided in derived classes
to allow DOT export.
Note that the abstract method in ModelExplicit
abstract void exportTransitionsToDotFile(int i, PrismLog out);
has been removed, which will lead to errors in derived classes
where implementations of this method have been marked with the
@Override annotation.
To fix this, simply replace the signature of your implementation of
void exportTransitionsToDotFile(int i, PrismLog out);
by
void exportTransitionsToDotFile(int i, PrismLog out, Iterable<explicit.graphviz.Decorator> decorators)
(as defined in explicit.Model). You can simply ignore the decorators
parameter at first. Later on, if you want to support decoration,
have a look at the implementations of this method in DTMCExplicit
and MDPExplicit for the proper handling.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12115 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
59745d025c
explicit.graphviz: infrastructure for more flexible DOT exports
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12114 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
0cc16c1f9f
explicit.SCCComputer: convenience method forSCCs for functional-style iteration over the SCCs of a model
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12113 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
7d5105c8c1
explicit.SCCInfo, SCCComputer: method for obtaining topological ordering (SCCInfo)
An SCCInfo provides IntSet-based access to the various SCCs. This storage option
can be more efficient than to store BitSets for each individual SCC, in particular
if trivial SCCs are not filtered and there are lots of states.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12112 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
3d8c4e1ff8
explicit.SCCComputer: provide variant of computeSCCs where the state space is restricted with an IntPredicate
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12111 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
97074f5d58
Refactor explicit SCC computation, splitting SCCConsumer from SCCComputer.
To obtain the previous behaviour, change
SCCComputer sccs = SCCComputer.createSCCComputer(parent, model);
sccs.computeSCCs();
... = sccs.getSCCs();
to
SCCConsumerStore sccs = new SCCConsumerStore();
SCCComputer sccComp = SCCComputer.createSCCComputer(parent, model, sccs);
sccComp.computeSCCs();
... = sccs.getSCCs();
This additional flexibility in how SCCs can be consumed can be used
in the future for example to handle SCCs on-the-fly, without
having to store all of them at the same time.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12110 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
fe5d031751
SCCTarjan: use SuccessorsIterator
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12109 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
810f149e88
PrismUtils: findMaxFinite
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12108 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
a11d7c9797
JDD, prism.StateValues: find max finite value
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12107 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
95283773a9
explicit: StateValues, implement maxFiniteOverBitSet
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12106 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
f4fdac9baa
add common.IntSet: interface for an ordered set of integers, providing fast membership test
Wrappers for BitSet and singleton values are provided.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12105 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
9b5245f04f
explicit DTMCSimple, MDPSimple refactor: remove mv... specialisations so the default methods from DTMC/MDP are used
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12104 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
dc8e331a36
explicit.MDP: provide OfInt-based variants for mvMultMinMax, mvMultGSMinMax, mvMultRewMinMax, mvMultRewGSMinMax
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12103 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
803f856ca9
explicit.MDP: default implementations for several mvMult methods
mvMultMinMaxSingle
mvMultMinMaxSingleChoices
mvMultSingle
mvMultJacMinMaxSingle
mvMultJacSingle
mvMultRewMinMaxSingle
mvMultRewSingle
mvMultRewJacMinMaxSingle
mvMultRewJacSingle
mvMultRewMinMaxSingleChoices
mvMultRight
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12102 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
a216904acb
explicit.MDP: use OfInt based iterator in default implementations of mv... methods
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12101 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
3c691c980a
explicit.DTMC/NondetModel: add default method getNumTransitions(OfInt states)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12100 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
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
7a106e9f0d
IterableStatSet: slight refactoring, support reverse iteration [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12084 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
285ccd52e2
common.IterableBitSet: return a primitive OfInt iterator, allow reverse iteration [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12083 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
85281b2f2a
common.iterable: add several helper classes [with Steffen Maercker]
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12082 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
0f94f49a11
PrismUtils: doublesAreClose with OfInt, measureSupNorm helpers
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12081 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
522adb9b57
PH iteration methods: use MeasureSupNorm.
Uses common code that was refactored to Measures.h
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12080 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
7c612640da
PS iteration methods: use MeasureSupNorm. MultiObjective remains todo.
Uses common code that was refactored to Measures.h
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12079 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
b96f9ca13b
add prism/include/Measures.h (refactor common code in PS and PH engines)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12078 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
00a5721cbe
(export iterations) MTBDD engine: If enabled, export iterations to HTML file
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12076 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago
Joachim Klein
06e23c9b4f
(export iterations) Hybrid engine: If enabled, export iterations to HTML file
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12075 bbc10eb1-c90d-0410-af57-cb519fbb1720
9 years ago