Search in sources :

Example 56 with IntegerValue

use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.

the class SymbolicFunctionVM method CALLER_STACK_PARAM.

@Override
public void CALLER_STACK_PARAM(int nr, int calleeLocalsIndex, int conc_arg) {
    if (functionUnderExecution != null) {
        IntegerValue symb_arg = getIntegerExprFromStack(nr);
        functionUnderExecution.setParam(nr, conc_arg, symb_arg);
        beforeExecuteFunction(nr);
    }
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 57 with IntegerValue

use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.

the class SymbolicFunctionVM method CALL_RESULT.

@Override
public void CALL_RESULT(boolean conc_ret_val, String owner, String name, String desc) {
    if (functionUnderExecution != null) {
        if (!functionUnderExecution.getOwner().equals(owner) || !functionUnderExecution.getName().equals(name) || !functionUnderExecution.getDesc().equals(desc)) {
            functionUnderExecution = null;
        }
    }
    if (functionUnderExecution != null) {
        IntegerValue symb_ret_val = this.env.topFrame().operandStack.peekBv32();
        functionUnderExecution.setReturnValue(conc_ret_val, symb_ret_val);
        IntegerValue new_symb_ret_val = (IntegerValue) functionUnderExecution.executeFunction();
        this.replaceTopBv32(new_symb_ret_val);
    }
    functionUnderExecution = null;
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 58 with IntegerValue

use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.

the class SymbolicFunctionVM method CALLER_STACK_PARAM.

@Override
public void CALLER_STACK_PARAM(int nr, int calleeLocalsIndex, long conc_arg) {
    if (functionUnderExecution != null) {
        IntegerValue symb_arg = getIntegerExprFromStack(nr);
        functionUnderExecution.setParam(nr, conc_arg, symb_arg);
        beforeExecuteFunction(nr);
    }
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 59 with IntegerValue

use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.

the class SymbolicFunctionVM method CALLER_STACK_PARAM.

@Override
public void CALLER_STACK_PARAM(int nr, int calleeLocalsIndex, char conc_arg) {
    if (functionUnderExecution != null) {
        IntegerValue symb_arg = getIntegerExprFromStack(nr);
        functionUnderExecution.setParam(nr, conc_arg, symb_arg);
        beforeExecuteFunction(nr);
    }
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 60 with IntegerValue

use of org.evosuite.symbolic.expr.bv.IntegerValue in project evosuite by EvoSuite.

the class SymbolicFunctionVM method CALL_RESULT.

@Override
public void CALL_RESULT(long conc_ret_val, String owner, String name, String desc) {
    if (functionUnderExecution != null) {
        if (!functionUnderExecution.getOwner().equals(owner) || !functionUnderExecution.getName().equals(name) || !functionUnderExecution.getDesc().equals(desc)) {
            functionUnderExecution = null;
        }
    }
    if (functionUnderExecution != null) {
        IntegerValue symb_ret_val = this.env.topFrame().operandStack.peekBv64();
        functionUnderExecution.setReturnValue(conc_ret_val, symb_ret_val);
        IntegerValue new_symb_ret_val = (IntegerValue) functionUnderExecution.executeFunction();
        this.replaceTopBv64(new_symb_ret_val);
    }
    functionUnderExecution = null;
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Aggregations

IntegerValue (org.evosuite.symbolic.expr.bv.IntegerValue)117 IntegerConstraint (org.evosuite.symbolic.expr.IntegerConstraint)48 ReferenceConstant (org.evosuite.symbolic.expr.ref.ReferenceConstant)32 ReferenceExpression (org.evosuite.symbolic.expr.ref.ReferenceExpression)27 RealValue (org.evosuite.symbolic.expr.fp.RealValue)22 IntegerBinaryExpression (org.evosuite.symbolic.expr.bv.IntegerBinaryExpression)14 Expression (org.evosuite.symbolic.expr.Expression)8 StringValue (org.evosuite.symbolic.expr.str.StringValue)8 IntegerConstant (org.evosuite.symbolic.expr.bv.IntegerConstant)7 Type (org.objectweb.asm.Type)7 RealToIntegerCast (org.evosuite.symbolic.expr.bv.RealToIntegerCast)6 IntegerToRealCast (org.evosuite.symbolic.expr.fp.IntegerToRealCast)6 IntegerUnaryExpression (org.evosuite.symbolic.expr.bv.IntegerUnaryExpression)5 PrimitiveExpression (org.evosuite.testcase.statements.PrimitiveExpression)4 ArrayList (java.util.ArrayList)3 CodeUnderTestException (org.evosuite.testcase.execution.CodeUnderTestException)3 Field (java.lang.reflect.Field)2 BigInteger (java.math.BigInteger)2 Vector (java.util.Vector)2 Constraint (org.evosuite.symbolic.expr.Constraint)2