Search in sources :

Example 16 with RealValue

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

the class FLOOR method executeFunction.

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

Example 17 with RealValue

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

the class HYPOT method executeFunction.

@Override
public Object executeFunction() {
    double res = this.getConcDoubleRetVal();
    RealValue left = this.getSymbRealArgument(0);
    RealValue right = this.getSymbRealArgument(1);
    RealValue hypotExpr;
    if (left.containsSymbolicVariable() || right.containsSymbolicVariable()) {
        Operator op = Operator.HYPOT;
        hypotExpr = new RealBinaryExpression(left, op, right, res);
    } else {
        hypotExpr = this.getSymbRealRetVal();
    }
    return hypotExpr;
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue) Operator(org.evosuite.symbolic.expr.Operator) RealBinaryExpression(org.evosuite.symbolic.expr.fp.RealBinaryExpression)

Example 18 with RealValue

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

the class LocalsVM method DSTORE.

@Override
public void DSTORE(int i) {
    RealValue realExpr = env.topFrame().operandStack.popFp64();
    env.topFrame().localsTable.setFp64Local(i, realExpr);
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue)

Example 19 with RealValue

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

the class LocalsVM method FLOAD.

@Override
public void FLOAD(int i) {
    RealValue realExpr = (RealValue) env.topFrame().localsTable.getFp32Local(i);
    env.topFrame().operandStack.pushFp32(realExpr);
}
Also used : RealValue(org.evosuite.symbolic.expr.fp.RealValue)

Example 20 with RealValue

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

the class LOG10 method executeFunction.

@Override
public Object executeFunction() {
    double res = this.getConcDoubleRetVal();
    RealValue realExpression = this.getSymbRealArgument(0);
    RealValue log10Expr;
    if (realExpression.containsSymbolicVariable()) {
        Operator op = Operator.LOG10;
        log10Expr = new RealUnaryExpression(realExpression, op, res);
    } else {
        log10Expr = this.getSymbRealRetVal();
    }
    return log10Expr;
}
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