Search in sources :

Example 66 with RealValue

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

the class ACOS method executeFunction.

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

Example 67 with RealValue

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

the class ATAN method executeFunction.

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

Example 68 with RealValue

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

the class D_ValueOf method executeFunction.

@Override
public Object executeFunction() {
    RealValue real_value = this.getSymbRealArgument(0);
    ReferenceConstant symb_double = (ReferenceConstant) this.getSymbRetVal();
    Double conc_double = (Double) this.getConcRetVal();
    env.heap.putField(Types.JAVA_LANG_DOUBLE, SymbolicHeap.$DOUBLE_VALUE, conc_double, symb_double, real_value);
    return symb_double;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) ReferenceConstant(org.evosuite.symbolic.expr.ref.ReferenceConstant)

Example 69 with RealValue

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

the class F_Init method executeFunction.

@Override
public Object executeFunction() {
    RealValue fp32 = this.getSymbRealArgument(0);
    ReferenceConstant symb_float = this.getSymbReceiver();
    env.heap.putField(Types.JAVA_LANG_FLOAT, SymbolicHeap.$FLOAT_VALUE, null, /* conc_float */
    symb_float, fp32);
    // return void
    return null;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) ReferenceConstant(org.evosuite.symbolic.expr.ref.ReferenceConstant)

Example 70 with RealValue

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

the class LOG1P method executeFunction.

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

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