use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.
the class Character_getNumericValue method executeFunction.
@Override
public Object executeFunction() {
IntegerValue charValueExpr = this.getSymbIntegerArgument(0);
int res = this.getConcIntRetVal();
if (charValueExpr.containsSymbolicVariable()) {
IntegerUnaryExpression getNumericValueExpr = new IntegerUnaryExpression(charValueExpr, Operator.GETNUMERICVALUE, (long) res);
return getNumericValueExpr;
} else {
return this.getSymbIntegerRetVal();
}
}
use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.
the class I_IntValue method executeFunction.
@Override
public Object executeFunction() {
ReferenceConstant symb_integer = this.getSymbReceiver();
Integer conc_integer = (Integer) this.getConcReceiver();
int conc_int_value = this.getConcIntRetVal();
IntegerValue symb_int_value = env.heap.getField(Types.JAVA_LANG_INTEGER, SymbolicHeap.$INT_VALUE, conc_integer, symb_integer, conc_int_value);
return symb_int_value;
}
use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.
the class J_ValueOf method executeFunction.
@Override
public Object executeFunction() {
IntegerValue int_value = this.getSymbIntegerArgument(0);
ReferenceConstant symb_long = (ReferenceConstant) this.getSymbRetVal();
Long conc_long = (Long) this.getConcRetVal();
env.heap.putField(Types.JAVA_LANG_LONG, SymbolicHeap.$LONG_VALUE, conc_long, symb_long, int_value);
return symb_long;
}
use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.
the class S_ShortValue method executeFunction.
@Override
public Object executeFunction() {
ReferenceConstant symb_short = this.getSymbReceiver();
Short conc_short = (Short) this.getConcReceiver();
short conc_short_value = this.getConcShortRetVal();
IntegerValue symb_short_value = env.heap.getField(Types.JAVA_LANG_SHORT, SymbolicHeap.$SHORT_VALUE, conc_short, symb_short, conc_short_value);
return symb_short_value;
}
use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.
the class ArithmeticVM method I2F.
/**
* http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
* doc6.html#i2f
*/
@Override
public void I2F() {
IntegerValue integerExpr = env.topFrame().operandStack.popBv32();
int integerValue = ((Long) integerExpr.getConcreteValue()).intValue();
RealValue realExpr;
float concreteValue = (float) integerValue;
if (!integerExpr.containsSymbolicVariable()) {
realExpr = ExpressionFactory.buildNewRealConstant(concreteValue);
} else {
realExpr = new IntegerToRealCast(integerExpr, (double) concreteValue);
}
env.topFrame().operandStack.pushFp32(realExpr);
}
Aggregations