use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.
the class ArithmeticVM method DNEG.
@Override
public void DNEG() {
RealValue param = env.topFrame().operandStack.popFp64();
double param_concrete_value = ((Double) param.getConcreteValue()).doubleValue();
if (!param.containsSymbolicVariable()) {
param = ExpressionFactory.buildNewRealConstant(param_concrete_value);
}
double con = -param_concrete_value;
RealValue realExpr = new RealUnaryExpression(param, Operator.NEG, con);
env.topFrame().operandStack.pushFp64(realExpr);
}
use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.
the class ArithmeticVM method FNEG.
@Override
public void FNEG() {
RealValue param = env.topFrame().operandStack.popFp32();
float param_concrete_value = ((Double) param.getConcreteValue()).floatValue();
if (!param.containsSymbolicVariable()) {
param = ExpressionFactory.buildNewRealConstant(param_concrete_value);
}
float con = -param_concrete_value;
RealValue realExpr = new RealUnaryExpression(param, Operator.NEG, (double) con);
env.topFrame().operandStack.pushFp32(realExpr);
}
use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.
the class CEIL method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue ceilExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.CEIL;
ceilExpr = new RealUnaryExpression(realExpression, op, res);
} else {
ceilExpr = this.getSymbRealRetVal();
}
return ceilExpr;
}
use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.
the class EXP method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue expExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.EXP;
expExpr = new RealUnaryExpression(realExpression, op, res);
} else {
expExpr = this.getSymbRealRetVal();
}
return expExpr;
}
use of org.evosuite.symbolic.expr.fp.RealUnaryExpression in project evosuite by EvoSuite.
the class LOG method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue logExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.LOG;
logExpr = new RealUnaryExpression(realExpression, op, res);
} else {
logExpr = this.getSymbRealRetVal();
}
return logExpr;
}
Aggregations