Search in sources :

Example 36 with Operator

use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.

the class ToRadians method executeFunction.

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

Example 37 with Operator

use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.

the class EXPM1 method executeFunction.

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

Example 38 with Operator

use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.

the class IEEEremainder method executeFunction.

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

Example 39 with Operator

use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.

the class POW method executeFunction.

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

Aggregations

Operator (org.evosuite.symbolic.expr.Operator)39 RealUnaryExpression (org.evosuite.symbolic.expr.fp.RealUnaryExpression)25 RealValue (org.evosuite.symbolic.expr.fp.RealValue)25 SmtExpr (org.evosuite.symbolic.solver.smt.SmtExpr)14 RealBinaryExpression (org.evosuite.symbolic.expr.fp.RealBinaryExpression)8 LinkedList (java.util.LinkedList)5 Expression (org.evosuite.symbolic.expr.Expression)4 IntegerBinaryExpression (org.evosuite.symbolic.expr.bv.IntegerBinaryExpression)4 IntegerUnaryExpression (org.evosuite.symbolic.expr.bv.IntegerUnaryExpression)4 RealUnaryToIntegerExpression (org.evosuite.symbolic.expr.bv.RealUnaryToIntegerExpression)4 StringBinaryToIntegerExpression (org.evosuite.symbolic.expr.bv.StringBinaryToIntegerExpression)4 StringMultipleToIntegerExpression (org.evosuite.symbolic.expr.bv.StringMultipleToIntegerExpression)4 StringUnaryToIntegerExpression (org.evosuite.symbolic.expr.bv.StringUnaryToIntegerExpression)4 GetFieldExpression (org.evosuite.symbolic.expr.ref.GetFieldExpression)4 StringBinaryExpression (org.evosuite.symbolic.expr.str.StringBinaryExpression)4 StringMultipleExpression (org.evosuite.symbolic.expr.str.StringMultipleExpression)4 StringUnaryExpression (org.evosuite.symbolic.expr.str.StringUnaryExpression)4 SmtIntConstant (org.evosuite.symbolic.solver.smt.SmtIntConstant)3 RegExp (dk.brics.automaton.RegExp)1 SmtStringConstant (org.evosuite.symbolic.solver.smt.SmtStringConstant)1