use of org.evosuite.symbolic.expr.bv.IntegerUnaryExpression 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.IntegerUnaryExpression in project evosuite by EvoSuite.
the class ArithmeticVM method INEG.
/**
* http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
* doc6.html#ineg
*/
@Override
public void INEG() {
IntegerValue param = env.topFrame().operandStack.popBv32();
int param_concrete_value = ((Long) param.getConcreteValue()).intValue();
if (!param.containsSymbolicVariable()) {
param = ExpressionFactory.buildNewIntegerConstant(param_concrete_value);
}
int con = -param_concrete_value;
IntegerValue intExpr = new IntegerUnaryExpression(param, Operator.NEG, (long) con);
env.topFrame().operandStack.pushBv32(intExpr);
}
use of org.evosuite.symbolic.expr.bv.IntegerUnaryExpression in project evosuite by EvoSuite.
the class ArithmeticVM method LNEG.
/**
* http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
* doc8.html#lneg
*/
@Override
public void LNEG() {
IntegerValue param = env.topFrame().operandStack.popBv64();
long param_concrete_value = ((Long) param.getConcreteValue()).longValue();
if (!param.containsSymbolicVariable()) {
param = ExpressionFactory.buildNewIntegerConstant(param_concrete_value);
}
long con = -param_concrete_value;
IntegerValue intExpr = new IntegerUnaryExpression(param, Operator.NEG, (long) con);
env.topFrame().operandStack.pushBv64(intExpr);
}
use of org.evosuite.symbolic.expr.bv.IntegerUnaryExpression in project evosuite by EvoSuite.
the class Character_isDigit method executeFunction.
@Override
public Object executeFunction() {
IntegerValue charValueExpr = this.getSymbIntegerArgument(0);
boolean res = this.getConcBooleanRetVal();
if (charValueExpr.containsSymbolicVariable()) {
long conV = res ? 1 : 0;
IntegerUnaryExpression getNumericValueExpr = new IntegerUnaryExpression(charValueExpr, Operator.ISDIGIT, conV);
return getNumericValueExpr;
} else {
return this.getSymbIntegerRetVal();
}
}
use of org.evosuite.symbolic.expr.bv.IntegerUnaryExpression in project evosuite by EvoSuite.
the class Character_isLetter method executeFunction.
@Override
public Object executeFunction() {
IntegerValue charValueExpr = this.getSymbIntegerArgument(0);
boolean res = this.getConcBooleanRetVal();
if (charValueExpr.containsSymbolicVariable()) {
long conV = res ? 1 : 0;
IntegerUnaryExpression is_letter_expr = new IntegerUnaryExpression(charValueExpr, Operator.ISLETTER, conV);
return is_letter_expr;
} else {
return this.getSymbIntegerRetVal();
}
}
Aggregations