Search in sources :

Example 11 with RealValue

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

the class CBRT method executeFunction.

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

Example 12 with RealValue

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

the class COS method executeFunction.

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

Example 13 with RealValue

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

the class ASIN method executeFunction.

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

Example 14 with RealValue

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

the class ATAN2 method executeFunction.

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

Example 15 with RealValue

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

the class COSH method executeFunction.

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