mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
fix bug in definition of rewrite rule for replace, tighten constraints for tightest-prefix
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
12458b1a84
commit
d5383e2387
3 changed files with 15 additions and 11 deletions
|
@ -444,11 +444,12 @@ br_status seq_rewriter::mk_seq_contains(expr* a, expr* b, expr_ref& result) {
|
|||
|
||||
bool found = false;
|
||||
for (unsigned i = 0; !found && i < as.size(); ++i) {
|
||||
if (bs.size() > as.size() - i) break;
|
||||
all_values &= m().is_value(as[i].get());
|
||||
unsigned j = 0;
|
||||
for (; j < bs.size() && as[j+i].get() == bs[j].get(); ++j) {};
|
||||
found = j == bs.size();
|
||||
if (bs.size() <= as.size() - i) {
|
||||
unsigned j = 0;
|
||||
for (; j < bs.size() && as[j+i].get() == bs[j].get(); ++j) {};
|
||||
found = j == bs.size();
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
result = m().mk_true();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue