Browse Source

Additions to prism-ar code.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1773 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 16 years ago
parent
commit
5f3732401d
  1. 26
      prism/src/explicit/PrismSTPGAbstractRefine.java
  2. 10
      prism/src/explicit/STPGAbstractRefine.java

26
prism/src/explicit/PrismSTPGAbstractRefine.java

@ -108,8 +108,10 @@ public class PrismSTPGAbstractRefine extends STPGAbstractRefine
throw new PrismException("Unknown label \"" + targetLabel + "\"");
// If the 'exact' flag is set, just do model checking on the concrete model (no abstraction)
if (exact)
if (exact) {
doExactModelChecking();
throw new PrismException("Terminated early after exact verification");
}
// Build a mapping between concrete/abstract states
// Initial abstract states: 0: initial, 1: target, 2:rest
@ -367,6 +369,19 @@ public class PrismSTPGAbstractRefine extends STPGAbstractRefine
case CTMC:
break;
case MDP:
MDPModelChecker mcTmp = new MDPModelChecker();
mcTmp.inheritSettings(mcOptions);
switch (propertyType) {
case PROB_REACH:
res = mcTmp.probReach((MDP) modelConcrete, targetConcrete, min);
break;
case PROB_REACH_BOUNDED:
break;
case EXP_REACH:
break;
default:
throw new PrismException("Property type " + propertyType + " not supported");
}
break;
default:
String s = "Cannot do exact model checking for";
@ -382,6 +397,15 @@ public class PrismSTPGAbstractRefine extends STPGAbstractRefine
mainLog.println();
}
// Override this to also print out concrete model details at the end
@Override
protected void printFinalSummary(String initAbstractionInfo, boolean canRefine)
{
mainLog.println("\nConcrete " + modelType + ": " + modelConcrete.infoString());
super.printFinalSummary(initAbstractionInfo, canRefine);
}
public static void main(String args[])
{
PrismSTPGAbstractRefine abstractRefine;

10
prism/src/explicit/STPGAbstractRefine.java

@ -1010,10 +1010,10 @@ public abstract class STPGAbstractRefine
if (sanityChecks && (lbStrat.isEmpty() || ubStrat.isEmpty()))
throw new PrismException("Empty strategy generated for state " + refineState);
// Check if lb/ub are identical (just use equals() since lists are sorted)
if (lbStrat.equals(ubStrat)) {
if (lbStrat.equals(ubStrat) && lbStrat.size() == abstraction.getNumChoices(refineState)) {
if (verbosity >= 1)
mainLog.println("Warning: Skipping refinement of #" + refineState
+ " for which lb/ub strategy sets are equal.");
+ " for which lb/ub strategy sets are equal and covering.");
return 1;
}
if (verbosity >= 1)
@ -1028,8 +1028,10 @@ public abstract class STPGAbstractRefine
} else {
ubStrat.removeAll(lbStrat);
}
choiceLists.add(lbStrat);
choiceLists.add(ubStrat);
if (!lbStrat.isEmpty())
choiceLists.add(lbStrat);
if (!ubStrat.isEmpty())
choiceLists.add(ubStrat);
break;
case 2:
// Remove intersection of lb/ub from both

Loading…
Cancel
Save