diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-04-30 12:32:50 -0700 |
---|---|---|
committer | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-04-30 14:32:50 -0500 |
commit | d998d5e4213503e0913581d57c09ad486cded5c1 (patch) | |
tree | e3c7035b8466e32acba55b98be2ecebecd528d51 /src/theory/strings/regexp_elim.cpp | |
parent | d36423fb74e3ec294b222b806cb24b5229e72ed1 (diff) |
Fix concat-find regexp elimination (#2983)
Diffstat (limited to 'src/theory/strings/regexp_elim.cpp')
-rw-r--r-- | src/theory/strings/regexp_elim.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/theory/strings/regexp_elim.cpp b/src/theory/strings/regexp_elim.cpp index afffce2c8..b6a997629 100644 --- a/src/theory/strings/regexp_elim.cpp +++ b/src/theory/strings/regexp_elim.cpp @@ -347,10 +347,10 @@ Node RegExpElimination::eliminateConcat(Node atom) for (unsigned r = 0; r < 2; r++) { unsigned index = r == 0 ? 0 : nchildren - 1; - Assert(children[index + (r == 0 ? 1 : -1)].getKind() != STRING_TO_REGEXP); Node c = children[index]; if (c.getKind() == STRING_TO_REGEXP) { + Assert(children[index + (r == 0 ? 1 : -1)].getKind() != STRING_TO_REGEXP); Node s = c[0]; Node lens = nm->mkNode(STRING_LENGTH, s); Node sss = r == 0 ? d_zero : nm->mkNode(MINUS, lenx, lens); @@ -375,9 +375,9 @@ Node RegExpElimination::eliminateConcat(Node atom) rexpElimChildren.push_back(c); } } - Assert(rexpElimChildren.size() + sConstraints.size() == nchildren); if (!sConstraints.empty()) { + Assert(rexpElimChildren.size() + sConstraints.size() == nchildren); Node ss = nm->mkNode(STRING_SUBSTR, x, sStartIndex, sLength); Assert(!rexpElimChildren.empty()); Node regElim = @@ -412,7 +412,7 @@ Node RegExpElimination::eliminateConcat(Node atom) Node bound = nm->mkNode(AND, nm->mkNode(LEQ, d_zero, k), - nm->mkNode(LT, k, nm->mkNode(MINUS, lenx, lens))); + nm->mkNode(LEQ, k, nm->mkNode(MINUS, lenx, lens))); echildren.push_back(bound); } Node substrEq = nm->mkNode(STRING_SUBSTR, x, k, lens).eqNode(s); |