mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
fix str.at rewrite
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a8e7074ddd
commit
9a516e5e41
2 changed files with 8 additions and 1 deletions
|
@ -1007,9 +1007,13 @@ br_status seq_rewriter::mk_seq_at(expr* a, expr* b, expr_ref& result) {
|
|||
unsigned i = 0;
|
||||
for (; i < m_lhs.size(); ++i) {
|
||||
expr* lhs = m_lhs.get(i);
|
||||
if (lens.contains(lhs)) {
|
||||
if (lens.contains(lhs) && !r.is_neg()) {
|
||||
lens.erase(lhs);
|
||||
}
|
||||
else if (m_util.str.is_unit(lhs) && r.is_zero() && lens.empty()) {
|
||||
result = lhs;
|
||||
return BR_REWRITE1;
|
||||
}
|
||||
else if (m_util.str.is_unit(lhs) && r.is_pos()) {
|
||||
r -= rational(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue