This pull request fixes two bugs in the evaluation of model-level evaluable expressions:
ST6RI-695 Integer division is implemented incorrectly. The org.omg.sysml.expressions.functions.DivideFunction class implemented the division of two integers using truncating Java integer division. However, the KerML IntegerFunctions::'/' function returns a Rational number is intended to not be truncating.
ST6RI-696 Unary Real operator evaluation is implemented incorrectly. The org.omg.sysml.expressions.functions.ArithmeticFunction::invoke made the call unaryRealOp((Integer)y) to evaluate a unary Real operator. This should instead have been unaryRealOp((Double)x).
This pull request fixes two bugs in the evaluation of model-level evaluable expressions:
org.omg.sysml.expressions.functions.DivideFunction
class implemented the division of two integers using truncating Java integer division. However, the KerMLIntegerFunctions::'/'
function returns aRational
number is intended to not be truncating.org.omg.sysml.expressions.functions.ArithmeticFunction::invoke
made the callunaryRealOp((Integer)y)
to evaluate a unaryReal
operator. This should instead have beenunaryRealOp((Double)x)
.