use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.
the class ExprToCVC4Visitor method visit.
@Override
public SmtExpr visit(StringUnaryExpression e, Void v) {
SmtExpr operand = e.getOperand().accept(this, null);
if (operand == null) {
return null;
}
if (!operand.isSymbolic()) {
String stringValue = e.getConcreteValue();
return SmtExprBuilder.mkStringConstant(stringValue);
}
Operator op = e.getOperator();
switch(op) {
case TRIM:
case TOLOWERCASE:
case TOUPPERCASE:
{
String stringValue = e.getConcreteValue();
return SmtExprBuilder.mkStringConstant(stringValue);
}
default:
throw new IllegalArgumentException("The operation " + op + " is not a unary string operation");
}
}
use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.
the class CEIL method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue ceilExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.CEIL;
ceilExpr = new RealUnaryExpression(realExpression, op, res);
} else {
ceilExpr = this.getSymbRealRetVal();
}
return ceilExpr;
}
use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.
the class EXP method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue expExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.EXP;
expExpr = new RealUnaryExpression(realExpression, op, res);
} else {
expExpr = this.getSymbRealRetVal();
}
return expExpr;
}
use of org.evosuite.symbolic.expr.Operator in project evosuite by EvoSuite.
the class LOG method executeFunction.
@Override
public Object executeFunction() {
double res = this.getConcDoubleRetVal();
RealValue realExpression = this.getSymbRealArgument(0);
RealValue logExpr;
if (realExpression.containsSymbolicVariable()) {
Operator op = Operator.LOG;
logExpr = new RealUnaryExpression(realExpression, op, res);
} else {
logExpr = this.getSymbRealRetVal();
}
return logExpr;
}
use of org.evosuite.symbolic.expr.Operator 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;
}
Aggregations