Search in sources :

Example 6 with SmtIntConstant

use of org.evosuite.symbolic.solver.smt.SmtIntConstant in project evosuite by EvoSuite.

the class RegExpToCVC4Visitor method visitRepeatMin.

@Override
public SmtExpr visitRepeatMin(RegExp e, int min) {
    SmtExpr regExpr = this.visitRegExp(e);
    if (regExpr == null) {
        return null;
    }
    if (min == 1) {
        SmtExpr kleeneCrossExpr = SmtExprBuilder.mkRegExpKleeCross(regExpr);
        return kleeneCrossExpr;
    } else {
        SmtIntConstant minExpr = SmtExprBuilder.mkIntConstant(min);
        SmtExpr loopExpr = SmtExprBuilder.mkLoop(regExpr, minExpr);
        return loopExpr;
    }
}
Also used : SmtIntConstant(org.evosuite.symbolic.solver.smt.SmtIntConstant) SmtExpr(org.evosuite.symbolic.solver.smt.SmtExpr)

Aggregations

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