use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class ArithmeticVM method D2F.
@Override
public void D2F() {
RealValue e = env.topFrame().operandStack.popFp64();
env.topFrame().operandStack.pushFp32(e);
}
use of org.evosuite.symbolic.expr.fp.RealValue 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.RealValue in project evosuite by EvoSuite.
the class ArithmeticVM method D2I.
@Override
public void D2I() {
RealValue realExpr = env.topFrame().operandStack.popFp64();
double doubleValue = ((Double) realExpr.getConcreteValue()).doubleValue();
IntegerValue intExpr;
int concreteValue = (int) doubleValue;
if (!realExpr.containsSymbolicVariable()) {
intExpr = ExpressionFactory.buildNewIntegerConstant(concreteValue);
} else {
intExpr = new RealToIntegerCast(realExpr, (long) concreteValue);
}
env.topFrame().operandStack.pushBv32(intExpr);
}
use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class ArithmeticVM method DREM.
@Override
public void DREM(double rhs) {
RealValue right = env.topFrame().operandStack.popFp64();
RealValue left = env.topFrame().operandStack.popFp64();
double left_concrete_value = ((Double) left.getConcreteValue()).doubleValue();
double right_concrete_value = ((Double) right.getConcreteValue()).doubleValue();
if (!left.containsSymbolicVariable()) {
left = ExpressionFactory.buildNewRealConstant(left_concrete_value);
}
if (!right.containsSymbolicVariable()) {
right = ExpressionFactory.buildNewRealConstant(right_concrete_value);
}
double con = left_concrete_value % right_concrete_value;
RealValue realExpr = ExpressionFactory.rem(left, right, con);
env.topFrame().operandStack.pushFp64(realExpr);
}
use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.
the class ArithmeticVM method L2D.
@Override
public void L2D() {
IntegerValue integerExpr = env.topFrame().operandStack.popBv64();
long longValue = ((Long) integerExpr.getConcreteValue()).longValue();
RealValue realExpr;
double concreteValue = (double) longValue;
if (!integerExpr.containsSymbolicVariable()) {
realExpr = ExpressionFactory.buildNewRealConstant(concreteValue);
} else {
realExpr = new IntegerToRealCast(integerExpr, (double) concreteValue);
}
env.topFrame().operandStack.pushFp64(realExpr);
}
Aggregations