We should propagate the EvaluateContext into the inner expression.
The missing 'ec' led to exceptions in model construction for exact/parametric mode, as variable valuations are then not available, e.g., when used in guards ('-s' where 's' is a state variable).
Checked the other evaluateExact calls, those are fine.
For the evaluation of integer math operations, use the ...Exact methods from
java.lang.Math to catch integer under-/overflows and throw PrismLangExceptions.
(adapted by Joachim Klein from https://github.com/prismmodelchecker/prism/pull/91)
Tag: performance
During the evaluate calls, the code previously used 'new Boolean' and 'new
Integer' constructors for the result values. By removing these allocations
and simply letting Java take care of boxing the resulting primitive
values, the integrated caching of Java can avoid creating objects in a
lot of cases (always for Boolean, and often for Integers in a certain
range).
(adapted by Joachim Klein from https://github.com/prismmodelchecker/prism/pull/91)
Tag: performance