Browse Source

imported patch rewardcounter-IntegerBounds.getMaximalInterestingValueForConjunction.patch

tud-infrastructure-2018-10-12
Joachim Klein 7 years ago
parent
commit
6daac6fec2
  1. 21
      prism/src/prism/IntegerBound.java

21
prism/src/prism/IntegerBound.java

@ -26,6 +26,8 @@
package prism;
import java.util.List;
import parser.Values;
import parser.ast.ExpressionTemporal;
import parser.ast.TemporalOperatorBound;
@ -249,6 +251,25 @@ public class IntegerBound
}
}
/**
* Returns the maximal interesting value when considering the conjunction of {@code bounds}.
* @param bounds list of bounds
* @return the maximum over the maximal interesting values of {@code bounds}
*/
public static int getMaximalInterestingValueForConjunction(List<IntegerBound> bounds) {
int saturation = 0;
for (IntegerBound bound : bounds) {
int bound_saturation = bound.getMaximalInterestingValue();
if (bound_saturation > saturation) {
saturation = bound_saturation;
}
}
return saturation;
}
public static void main(String args[])
{
System.out.println(new IntegerBound(1, true, 3, false));

Loading…
Cancel
Save