Search in sources :

Example 61 with RealValue

use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.

the class EXP method executeFunction.

@Override
public Object executeFunction() {
    double res = this.getConcDoubleRetVal();
    RealValue realExpression = this.getSymbRealArgument(0);
    RealValue expExpr;
    if (realExpression.containsSymbolicVariable()) {
        Operator op = Operator.EXP;
        expExpr = new RealUnaryExpression(realExpression, op, res);
    } else {
        expExpr = this.getSymbRealRetVal();
    }
    return expExpr;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) Operator(org.evosuite.symbolic.expr.Operator) RealUnaryExpression(org.evosuite.symbolic.expr.fp.RealUnaryExpression)

Example 62 with RealValue

use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.

the class LOG method executeFunction.

@Override
public Object executeFunction() {
    double res = this.getConcDoubleRetVal();
    RealValue realExpression = this.getSymbRealArgument(0);
    RealValue logExpr;
    if (realExpression.containsSymbolicVariable()) {
        Operator op = Operator.LOG;
        logExpr = new RealUnaryExpression(realExpression, op, res);
    } else {
        logExpr = this.getSymbRealRetVal();
    }
    return logExpr;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) Operator(org.evosuite.symbolic.expr.Operator) RealUnaryExpression(org.evosuite.symbolic.expr.fp.RealUnaryExpression)

Example 63 with RealValue

use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.

the class D_Init method executeFunction.

@Override
public Object executeFunction() {
    RealValue fp64 = this.getSymbRealArgument(0);
    ReferenceConstant symb_double = this.getSymbReceiver();
    env.heap.putField(Types.JAVA_LANG_DOUBLE, SymbolicHeap.$DOUBLE_VALUE, null, /* conc_double */
    symb_double, fp64);
    // return voids
    return null;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) ReferenceConstant(org.evosuite.symbolic.expr.ref.ReferenceConstant)

Example 64 with RealValue

use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.

the class F_FloatValue method executeFunction.

@Override
public Object executeFunction() {
    ReferenceConstant symb_float = this.getSymbReceiver();
    Float conc_float = (Float) this.getConcReceiver();
    float conc_float_value = this.getConcFloatRetVal();
    RealValue symb_int_value = env.heap.getField(Types.JAVA_LANG_FLOAT, SymbolicHeap.$FLOAT_VALUE, conc_float, symb_float, conc_float_value);
    return symb_int_value;
}
Also used : ReferenceConstant(org.evosuite.symbolic.expr.ref.ReferenceConstant) RealValue(org.evosuite.symbolic.expr.fp.RealValue)

Example 65 with RealValue

use of org.evosuite.symbolic.expr.fp.RealValue in project evosuite by EvoSuite.

the class F_ValueOf method executeFunction.

@Override
public Object executeFunction() {
    RealValue real_value = this.getSymbRealArgument(0);
    ReferenceConstant symb_float = (ReferenceConstant) this.getSymbRetVal();
    Float conc_float = (Float) this.getConcRetVal();
    env.heap.putField(Types.JAVA_LANG_FLOAT, SymbolicHeap.$FLOAT_VALUE, conc_float, symb_float, real_value);
    return symb_float;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) ReferenceConstant(org.evosuite.symbolic.expr.ref.ReferenceConstant)

Aggregations

RealValue (org.evosuite.symbolic.expr.fp.RealValue)81 Operator (org.evosuite.symbolic.expr.Operator)25 RealUnaryExpression (org.evosuite.symbolic.expr.fp.RealUnaryExpression)23 IntegerValue (org.evosuite.symbolic.expr.bv.IntegerValue)22 ReferenceExpression (org.evosuite.symbolic.expr.ref.ReferenceExpression)13 IntegerConstraint (org.evosuite.symbolic.expr.IntegerConstraint)12 ReferenceConstant (org.evosuite.symbolic.expr.ref.ReferenceConstant)11 Expression (org.evosuite.symbolic.expr.Expression)6 RealToIntegerCast (org.evosuite.symbolic.expr.bv.RealToIntegerCast)6 IntegerToRealCast (org.evosuite.symbolic.expr.fp.IntegerToRealCast)6 RealBinaryExpression (org.evosuite.symbolic.expr.fp.RealBinaryExpression)6 StringValue (org.evosuite.symbolic.expr.str.StringValue)4 PrimitiveExpression (org.evosuite.testcase.statements.PrimitiveExpression)4 Type (org.objectweb.asm.Type)4 CodeUnderTestException (org.evosuite.testcase.execution.CodeUnderTestException)3 Field (java.lang.reflect.Field)2 RealComparison (org.evosuite.symbolic.expr.bv.RealComparison)2 EvosuiteError (org.evosuite.testcase.execution.EvosuiteError)2 VariableReference (org.evosuite.testcase.variable.VariableReference)2 SmtExpr (org.evosuite.symbolic.solver.smt.SmtExpr)1