Search in sources :

Example 1 with Operator

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

the class SINH method executeFunction.

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

Example 2 with Operator

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

the class TAN method executeFunction.

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

Example 3 with Operator

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

the class ToDegrees method executeFunction.

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

Example 4 with Operator

use of org.evosuite.symbolic.expr.Operator 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 5 with Operator

use of org.evosuite.symbolic.expr.Operator 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)

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