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
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
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
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
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
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
Dave Parker
9729c78b3e
Inefficiency in precomputatino routines in explicit engine (spotted by Steffen Marcker).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9850 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
a18d28a17b
Refactor: use IterableStateSet to simplify loops [Joachim Klein].
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9543 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
5295b1a180
Bug fix in MDPSimple.mvMultJacSingle (from Joachim Klein).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9359 bbc10eb1-c90d-0410-af57-cb519fbb1720
11 years ago
Dave Parker
89fab7269a
Bug fix in getSuccessorsIterator(s) in SubNondetModel (showed up as regression test failure in prism-games-heuristics-merge), plus required missing method getSuccessorsIterator(s,i) in NondetModel.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@8935 bbc10eb1-c90d-0410-af57-cb519fbb1720
12 years ago
Dave Parker
4a29528714
Bug fix: missing state rewards in mvMultRewMinMaxSingleChoices methods (showed up on mdps/reach/mdp_simple.nm regression test).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@7773 bbc10eb1-c90d-0410-af57-cb519fbb1720
12 years ago
Dave Parker
4d3d52edaf
Policy iteration for reachability reward problems (explicit engine).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@7667 bbc10eb1-c90d-0410-af57-cb519fbb1720
12 years ago
Dave Parker
bb14cd09ab
Add areAllChoiceActionsUnique() method to NondetModel.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@7603 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
ff11760860
Update strategy generation in explicit engine to distinguish between: -1 (unknown), -2 (arbitrary), -3 (unreachable).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@7008 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
b06df8c756
Fixes in strategy generation for expected rewards in explicit engine (should only check for strict changes in max case).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@7005 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
1c42335bcf
Some refactoring of explicit model classes, to introduce NondetModel interface.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6998 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
5a1186c177
Strategy synthesis for reach rewards in the explicit engine: choices for inf states and do export.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6933 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
65a6464b32
Strategy synthesis for reach rewards in the explicit engine (no precomputation yet).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6932 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
8b6d5d17a8
Improvements to strategy generation for MDP reachability in explicit engine, notably algorithms for precomputation. Also split Prob1 into Prob1A and Prob1E for efficiency reasons.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6907 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
51bf20f1f6
Add strategy generation to MDP Gauss-Seidel (explicit).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6902 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
c02983ea26
Small code tidies.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6901 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
064356d11f
Rename adversary to strategy in explicit MDP model checking + align with prism-games.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6899 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
018c8c89d5
Miscellaneous code changes/tidies - trying to align with prism-games a bit.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6878 bbc10eb1-c90d-0410-af57-cb519fbb1720
13 years ago
Dave Parker
99d2139f55
Add getSuccessorsIterator to explicit Model interface.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@5331 bbc10eb1-c90d-0410-af57-cb519fbb1720
14 years ago
Dave Parker
a218d09b2b
* Continued major changes to PRISM API
- keeps track of model, builds when needed
- takes care of explicit engine stuff too
* Changes to deadlock handling:
- new option for "fix deadlocks" (defaults to *true*) (and new switch -fixdl)
- consistent deadlock handling everywhere, incl. GUI and experiments
- changes to model-level deadlock storage (symbolic and explicit)
* Explicit engine added as true engine, also available from GUI
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4562 bbc10eb1-c90d-0410-af57-cb519fbb1720
14 years ago
Dave Parker
a869bbeec0
Gauss-Seidel val iter for cumulative rewards in explicit engine.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4337 bbc10eb1-c90d-0410-af57-cb519fbb1720
14 years ago
Dave Parker
355032b5e3
Code tidy
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3711 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
9ba97fe1fc
Add MDPExplicit class to capture shared from MDPSimple/MDPSparse (also a few fixes to same thing done previously for DTMCs).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3709 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
d54e92533c
Another fix for adv gen in explicit engine: min probs should not be treated as for max probs.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3691 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
e24ee33442
Bug fix in explicit MDPs: actions added as 0.0 instead of null.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3646 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
0bb97718c1
Adv gen for rewards in explicit engine (from prism-games).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3641 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
f49ce60f1b
Fixes in explicit MDP adversary generation (min case can give wrong answer).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3629 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
bedfccb2ec
Re-arrangement of explicit model classes:
* merge ModelSimple and ModelSparse as ModelExplicit
* add ModelSimple as separate interface
* created DTMCExplicit to capture some common methods for DTMC classes
* (still need to do same for other models)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3514 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
6be5202551
Slight tweak in MDP interface (to match STPG).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3399 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
ea9463344b
Update to (explicit) MDP interface.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3394 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
16a8c710ae
More re-arranging of explicit rewards (from prism-qar).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3388 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
80b693fee8
Added state rewards into MDP model checking in explicit engine.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3372 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
a539e72e57
MDPSimple bug fix (from prism-qar).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3368 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
e5b7ad597e
Expansion of transition-matrix-export functionality for explicit engine.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3357 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
25b8626a51
Code tidy.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3331 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
3403e8b417
Some bugfixes and adds in explicit MDP classes, mainly relating to action labels.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3330 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
edab23b581
More updates to explicit library:
* removed some old rewards code from explicit models
* (and temporarily disabled a few things in PrismSTPGAbstractRefine accordingly)
* added method addActionLabelledChoice to MDPSimple
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3325 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
b8a78c4031
Updates to explicit engine from prism-qar (Vojta):
* new rewards code for STPGs
* additional utility methods
* strip out some old reward stuff
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3323 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
24caab6c97
Credit/copyright for Christian von Essen.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3290 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
e33c2b1301
Added action names to other MDP explicit exports (dot, PRISM lang).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3281 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
ac4eac3719
Action names included in explicit MDP export to tra file (from prism-qar).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3280 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
85147f1a71
Explicit engine improvements, mainly MDP rewards:
* Explicit engine gets MDP rewards (transition rewards only) from the model
* Rewards detached from MDPs (but attached ones still available, e.g. for A-R)
* Various bug fixes in MDPSparse, especially wrt rewards
* Few code tidies
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3215 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
1a21d7f342
Explicit engine handles "deadlock" and "init" labels, if not embedded in a (logical) expression.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3124 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
52d2d21447
Update to newest version of explicit code (from prism-qar) plus -explicit switch for command-line and MDP solution settings.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3047 bbc10eb1-c90d-0410-af57-cb519fbb1720
15 years ago
Dave Parker
993b33264c
Export to PRISM language from explicit models.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2148 bbc10eb1-c90d-0410-af57-cb519fbb1720
16 years ago