use of org.evosuite.symbolic.solver.smt.SmtExpr in project evosuite by EvoSuite.
the class RegExpToCVC4Visitor method visitCharRange.
@Override
public SmtExpr visitCharRange(char from, char to) {
String fromStr = String.valueOf(from);
SmtStringConstant fromConstant = SmtExprBuilder.mkStringConstant(fromStr);
String toStr = String.valueOf(to);
SmtStringConstant toConstant = SmtExprBuilder.mkStringConstant(toStr);
SmtExpr rangeExpr = SmtExprBuilder.mkRegExpRange(fromConstant, toConstant);
return rangeExpr;
}
use of org.evosuite.symbolic.solver.smt.SmtExpr in project evosuite by EvoSuite.
the class RegExpToCVC4Visitor method visitChar.
@Override
public SmtExpr visitChar(char c) {
String str = String.valueOf(c);
SmtStringConstant strConstant = SmtExprBuilder.mkStringConstant(str);
SmtExpr expr = SmtExprBuilder.mkStrToRegExp(strConstant);
return expr;
}
use of org.evosuite.symbolic.solver.smt.SmtExpr in project evosuite by EvoSuite.
the class RegExpToCVC4Visitor method visitConcatenation.
@Override
public SmtExpr visitConcatenation(RegExp left, RegExp right) {
SmtExpr leftExpr = this.visitRegExp(left);
SmtExpr rightExpr = this.visitRegExp(right);
if (leftExpr == null || rightExpr == null) {
return null;
}
SmtExpr concat = SmtExprBuilder.mkRegExpConcat(leftExpr, rightExpr);
return concat;
}
use of org.evosuite.symbolic.solver.smt.SmtExpr in project evosuite by EvoSuite.
the class RegExpToCVC4Visitor method visitString.
@Override
public SmtExpr visitString(String s) {
SmtStringConstant strConstant = SmtExprBuilder.mkStringConstant(s);
SmtExpr strToRegExpr = SmtExprBuilder.mkStrToRegExp(strConstant);
return strToRegExpr;
}
use of org.evosuite.symbolic.solver.smt.SmtExpr in project evosuite by EvoSuite.
the class ConstraintToZ3Visitor method visit.
@Override
public SmtExpr visit(IntegerConstraint c, Void arg) {
ExprToZ3Visitor v = new ExprToZ3Visitor();
SmtExpr left = c.getLeftOperand().accept(v, null);
SmtExpr right = c.getRightOperand().accept(v, null);
if (left == null || right == null) {
return null;
}
Comparator cmp = c.getComparator();
return mkComparison(left, cmp, right);
}
Aggregations