Browse Source

Miscellaneous code changes/tidies - trying to align with prism-games a bit.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6881 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 13 years ago
parent
commit
3f56c6668f
  1. 9
      prism/src/explicit/MDP.java
  2. 11
      prism/src/explicit/MDPModelChecker.java

9
prism/src/explicit/MDP.java

@ -26,12 +26,13 @@
package explicit;
import java.util.*;
import java.util.BitSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import prism.PrismException;
import explicit.rewards.*;
import explicit.rewards.MDPRewards;
/**
* Interface for classes that provide (read) access to an explicit-state MDP.
@ -61,7 +62,7 @@ public interface MDP extends Model
/**
* Get an iterator over the transitions from choice {@code i} of state {@code s}.
*/
public Iterator<Entry<Integer,Double>> getTransitionsIterator(int s, int i);
public Iterator<Entry<Integer, Double>> getTransitionsIterator(int s, int i);
/**
* Perform a single step of precomputation algorithm Prob0, i.e., for states i in {@code subset},

11
prism/src/explicit/MDPModelChecker.java

@ -1087,7 +1087,8 @@ public class MDPModelChecker extends ProbModelChecker
* @param known Optionally, a set of states for which the exact answer is known
* Note: if 'known' is specified (i.e. is non-null, 'init' must also be given and is used for the exact values.
*/
public ModelCheckerResult computeReachRewards(MDP mdp, MDPRewards mdpRewards, BitSet target, boolean min, double init[], BitSet known) throws PrismException
public ModelCheckerResult computeReachRewards(MDP mdp, MDPRewards mdpRewards, BitSet target, boolean min, double init[], BitSet known)
throws PrismException
{
ModelCheckerResult res = null;
BitSet inf;
@ -1166,7 +1167,8 @@ public class MDPModelChecker extends ProbModelChecker
* @param known Optionally, a set of states for which the exact answer is known
* Note: if 'known' is specified (i.e. is non-null, 'init' must also be given and is used for the exact values.
*/
protected ModelCheckerResult computeReachRewardsGaussSeidel(MDP mdp, MDPRewards mdpRewards, BitSet target, BitSet inf, boolean min, double init[], BitSet known) throws PrismException
protected ModelCheckerResult computeReachRewardsGaussSeidel(MDP mdp, MDPRewards mdpRewards, BitSet target, BitSet inf, boolean min, double init[],
BitSet known) throws PrismException
{
ModelCheckerResult res;
BitSet unknown;
@ -1251,7 +1253,8 @@ public class MDPModelChecker extends ProbModelChecker
* @param known Optionally, a set of states for which the exact answer is known
* Note: if 'known' is specified (i.e. is non-null, 'init' must also be given and is used for the exact values.
*/
protected ModelCheckerResult computeReachRewardsValIter(MDP mdp, MDPRewards mdpRewards, BitSet target, BitSet inf, boolean min, double init[], BitSet known) throws PrismException
protected ModelCheckerResult computeReachRewardsValIter(MDP mdp, MDPRewards mdpRewards, BitSet target, BitSet inf, boolean min, double init[], BitSet known)
throws PrismException
{
ModelCheckerResult res;
BitSet unknown;
@ -1353,7 +1356,7 @@ public class MDPModelChecker extends ProbModelChecker
* @param mdp The MDP
* @param adv The adversary
*/
public void restrictAdversaryToReachableStates(MDP mdp,int adv[])
public void restrictAdversaryToReachableStates(MDP mdp, int adv[])
{
BitSet restrict = new BitSet();
BitSet explore = new BitSet();

Loading…
Cancel
Save