Browse Source

accumulation: fix behaviour for step 0

accumulation
Sascha Wunderlich 7 years ago
parent
commit
99d91a5f9d
  1. 7
      prism/src/explicit/AccumulationProductCounting.java

7
prism/src/explicit/AccumulationProductCounting.java

@ -153,8 +153,11 @@ public class AccumulationProductCounting<M extends Model> extends AccumulationPr
throws PrismException {
boolean isFinal = false;
if ( track != null ) {
IntegerBound stepBound = IntegerBound.fromTemporalOperatorBound(accexp.getBoundExpression(), mc.getConstantValues(), true);
isFinal = stepBound.isInBounds(track.getComponent());
Integer step = track.getComponent();
if ( step > 0 ) { // if the step is 0, we cannot have a goal state.
IntegerBound stepBound = IntegerBound.fromTemporalOperatorBound(accexp.getBoundExpression(), mc.getConstantValues(), true);
isFinal = stepBound.isInBounds(step);
}
}
return isFinal;
}

Loading…
Cancel
Save