|
|
|
@ -55,8 +55,25 @@ public class SamplerBoundedUntilCont extends SamplerBoolean |
|
|
|
throw new PrismException("Error creating Sampler"); |
|
|
|
left = expr.getOperand1(); |
|
|
|
right = expr.getOperand2(); |
|
|
|
|
|
|
|
lb = expr.getLowerBound() == null ? 0.0 : expr.getLowerBound().evaluateDouble(); |
|
|
|
ub = expr.getUpperBound() == null ? Double.POSITIVE_INFINITY : expr.getUpperBound().evaluateDouble(); |
|
|
|
if (lb < 0) { |
|
|
|
throw new PrismException("Invalid lower bound " + lb + " in time-bounded until formula"); |
|
|
|
} |
|
|
|
|
|
|
|
if (expr.getUpperBound() == null) { |
|
|
|
ub = Double.POSITIVE_INFINITY; |
|
|
|
} else { |
|
|
|
ub = expr.getUpperBound().evaluateDouble(); |
|
|
|
if (ub < 0 || (ub == 0 && expr.upperBoundIsStrict())) { |
|
|
|
String bound = (expr.upperBoundIsStrict() ? "<" : "<=") + ub; |
|
|
|
throw new PrismException("Invalid upper bound " + bound + " in time-bounded until formula"); |
|
|
|
} |
|
|
|
if (ub < lb) { |
|
|
|
throw new PrismException("Upper bound must exceed lower bound in time-bounded until formula"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Initialise sampler info |
|
|
|
reset(); |
|
|
|
resetStats(); |
|
|
|
|