{
b1 = reLength;
}
- Node s1 = nm->mkNode(STRING_SUBSTR, s, d_zero, b1);
- Node s2 = nm->mkNode(STRING_SUBSTR, s, b1, nm->mkNode(MINUS, lens, b1));
- if (indexRm != 0)
+ Node s1;
+ Node s2;
+ if (indexRm == 0)
{
- // swap if we are removing from the end
- Node sswap = s1;
- s1 = s2;
- s2 = sswap;
+ s1 = nm->mkNode(STRING_SUBSTR, s, d_zero, b1);
+ s2 = nm->mkNode(STRING_SUBSTR, s, b1, nm->mkNode(MINUS, lens, b1));
+ }
+ else
+ {
+ s1 = nm->mkNode(STRING_SUBSTR, s, nm->mkNode(MINUS, lens, b1), b1);
+ s2 =
+ nm->mkNode(STRING_SUBSTR, s, d_zero, nm->mkNode(MINUS, lens, b1));
}
Node s1r1 = nm->mkNode(STRING_IN_REGEXP, s1, r[indexRm]).negate();
std::vector<Node> nvec;
std::vector<Node> exp_n;
exp_n.push_back(assertion);
Node conc = nvec.size() == 1 ? nvec[0] : nm->mkNode(AND, nvec);
- conc = Rewriter::rewrite(conc);
d_im.sendInference(rnfexp, exp_n, conc, "REGEXP_Unfold");
addedLemma = true;
if (changed)
regress1/strings/re-agg-total2.smt2
regress1/strings/re-elim-exact.smt2
regress1/strings/re-neg-concat-reduct.smt2
+ regress1/strings/re-neg-unfold-rev-a.smt2
regress1/strings/re-unsound-080718.smt2
regress1/strings/regexp001.smt2
regress1/strings/regexp002.smt2
--- /dev/null
+(set-info :smt-lib-version 2.5)
+(set-logic QF_S)
+(set-info :status unsat)
+(set-option :strings-exp true)
+
+(declare-const x String)
+(declare-const y String)
+(assert (and (= y "foobar") (str.in.re x (re.++ (str.to.re "ab") (re.* re.allchar) (str.to.re "b") (re.* re.allchar) (str.to.re "b") (re.* re.allchar) (str.to.re "b")))))
+(assert (not (and (= y "foobar") (str.in.re x (re.++ (str.to.re "a") (re.* re.allchar) (str.to.re "b") (re.* re.allchar) (str.to.re "b") (re.* re.allchar) (str.to.re "b"))))))
+(check-sat)