|
|
@ -602,6 +602,19 @@ public class ProbModelChecker extends NonProbModelChecker |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected StateValues checkProbPathFormulaAccumulationExpression(Model model, Expression expr, MinMax minMax, BitSet statesOfInterest) throws PrismException |
|
|
|
|
|
{ |
|
|
|
|
|
// Do a transformation and a projection |
|
|
|
|
|
AccumulationTransformation<?> accTrans = new AccumulationTransformation<ModelExplicit>(this, (ModelExplicit)model, expr, statesOfInterest); |
|
|
|
|
|
StateValues transValues = this.checkProbPathFormula(accTrans.getTransformedModel(), accTrans.getTransformedExpression(), minMax, accTrans.getTransformedStatesOfInterest()); |
|
|
|
|
|
//this.getLog().println("TransValues"); |
|
|
|
|
|
//transValues.print(this.getLog()); |
|
|
|
|
|
StateValues projectedValues = accTrans.projectToOriginalModel(transValues); |
|
|
|
|
|
//this.getLog().println("ProjectedValues"); |
|
|
|
|
|
//projectedValues.print(this.getLog()); |
|
|
|
|
|
return projectedValues; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Compute probabilities for the contents of a P operator. |
|
|
* Compute probabilities for the contents of a P operator. |
|
|
* @param statesOfInterest the states of interest, see checkExpression() |
|
|
* @param statesOfInterest the states of interest, see checkExpression() |
|
|
@ -623,10 +636,8 @@ public class ProbModelChecker extends NonProbModelChecker |
|
|
if (useSimplePathAlgo) { |
|
|
if (useSimplePathAlgo) { |
|
|
return checkProbPathFormulaSimple(model, expr, minMax, statesOfInterest); |
|
|
return checkProbPathFormulaSimple(model, expr, minMax, statesOfInterest); |
|
|
} else if (Expression.containsAccumulationExpression(expr)) { |
|
|
} else if (Expression.containsAccumulationExpression(expr)) { |
|
|
if (model.getModelType() == ModelType.DTMC) { |
|
|
|
|
|
return ((DTMCModelChecker)this).checkProbPathFormulaAccumulationExpression(model, expr, statesOfInterest); |
|
|
|
|
|
} else if (model.getModelType() == ModelType.MDP) { |
|
|
|
|
|
return ((MDPModelChecker)this).checkProbPathFormulaAccumulationExpression(model, expr, minMax, statesOfInterest); |
|
|
|
|
|
|
|
|
if (model.getModelType() == ModelType.DTMC || model.getModelType() == ModelType.MDP) { |
|
|
|
|
|
return this.checkProbPathFormulaAccumulationExpression(model, expr, minMax, statesOfInterest); |
|
|
} else { |
|
|
} else { |
|
|
throw new PrismException("Model checking of accumulation expressions formulas is not supported for "+model.getModelType().name()); |
|
|
throw new PrismException("Model checking of accumulation expressions formulas is not supported for "+model.getModelType().name()); |
|
|
} |
|
|
} |
|
|
|