Browse Source

fixup DigitalClock bounds

accumulation-v4.7
Joachim Klein 5 years ago
parent
commit
05d615fd2c
  1. 2
      prism/src/explicit/DTMCModelChecker.java
  2. 13
      prism/src/pta/DigitalClocks.java

2
prism/src/explicit/DTMCModelChecker.java

@ -41,6 +41,8 @@ import parser.VarList;
import parser.ast.Declaration;
import parser.ast.DeclarationIntUnbounded;
import parser.ast.Expression;
import parser.ast.ExpressionTemporal;
import parser.ast.TemporalOperatorBound;
import prism.AccuracyFactory;
import prism.ModelType;
import prism.OptionsIntervalIteration;

13
prism/src/pta/DigitalClocks.java

@ -721,11 +721,14 @@ public class DigitalClocks
// (so just evaluate directly)
// We also don't care about the max value - this is done elsewhere;
// we just want to make sure that the values is used to compute the GCD
if (e.bound.getLowerBound() != null) {
allClockVals.add(e.bound.getLowerBound().evaluateInt(constantValues));
}
if (e.bound.getUpperBound() != null) {
allClockVals.add(e.bound.getUpperBound().evaluateInt(constantValues));
if (e.getBounds().hasBounds() ) {
TemporalOperatorBound bound = e.getBounds().getTimeBoundForContinuousTime();
if (bound.getLowerBound() != null) {
allClockVals.add(bound.getLowerBound().evaluateInt(constantValues));
}
if (bound.getUpperBound() != null) {
allClockVals.add(bound.getUpperBound().evaluateInt(constantValues));
}
}
}

Loading…
Cancel
Save