Search in sources :

Example 96 with IntegerValue

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

the class JumpVM method IFGT.

/**
 * (p > 0) is just (0 < p). (0 < p) is just ((left < p) with left==0).
 *
 * (p <= 0) is just (0 >= p). (0 >= p) is just (not (0
 * < p
 * )).
 *
 * http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
 * doc6.html#ifcond
 */
@Override
public void IFGT(String className, String methName, int branchIndex, int p) {
    // symbolic
    IntegerValue rightBv = env.topFrame().operandStack.popBv32();
    // version
    // of
    // p
    // left
    env.topFrame().operandStack.pushBv32(ExpressionFactory.ICONST_0);
    // hand
    // side
    // argument
    // of
    // LT comparison
    // right hand side
    env.topFrame().operandStack.pushBv32(rightBv);
    // argument of LT
    // comparison
    IF_ICMPLT(className, methName, branchIndex, 0, p);
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 97 with IntegerValue

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

the class LocalsVM method ILOAD.

/**
 * ... ==> ..., value
 *
 * http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
 * doc6.html#iload
 */
@Override
public void ILOAD(int i) {
    IntegerValue integerExpression = env.topFrame().localsTable.getBv32Local(i);
    env.topFrame().operandStack.pushBv32(integerExpression);
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 98 with IntegerValue

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

the class LocalsVM method LLOAD.

@Override
public void LLOAD(int i) {
    IntegerValue integerExpression = env.topFrame().localsTable.getBv64Local(i);
    env.topFrame().operandStack.pushBv64(integerExpression);
}
Also used : IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 99 with IntegerValue

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

the class B_Init method executeFunction.

@Override
public Object executeFunction() {
    IntegerValue bv32 = this.getSymbIntegerArgument(0);
    ReferenceConstant symb_byte = (ReferenceConstant) this.getSymbReceiver();
    env.heap.putField(Types.JAVA_LANG_BYTE, SymbolicHeap.$BYTE_VALUE, null, /* conc_integer */
    symb_byte, bv32);
    // return void
    return null;
}
Also used : ReferenceConstant(org.evosuite.symbolic.expr.ref.ReferenceConstant) IntegerValue(org.evosuite.symbolic.expr.bv.IntegerValue)

Example 100 with IntegerValue

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

the class C_CharValue method executeFunction.

@Override
public Object executeFunction() {
    ReferenceConstant symb_character = this.getSymbReceiver();
    Character conc_character = (Character) this.getConcReceiver();
    char conc_char_value = this.getConcCharRetVal();
    IntegerValue symb_char_value = env.heap.getField(Types.JAVA_LANG_CHARACTER, SymbolicHeap.$CHAR_VALUE, conc_character, symb_character, conc_char_value);
    return symb_char_value;
}
Also used : ReferenceConstant(org.evosuite.symbolic.expr.ref.ReferenceConstant) 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