Skip to content

Commit

Permalink
add missing new_value_eh when repaired up
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner committed Nov 25, 2024
1 parent 7ed185a commit 1e839e5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/ast/sls/sls_seq_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ namespace sls {
if (is_value(e))
return;
strval0(e) = strval1(e);
ctx.new_value_eh(e);
return;
}

Expand Down Expand Up @@ -1007,8 +1008,15 @@ namespace sls {
auto& ev = get_eval(t);
ev.max_length = 1;
}
// extract with constant length.

expr* x, * offset, * len;
rational len_r;
if (seq.str.is_extract(t, x, offset, len) && a.is_numeral(len, len_r)) {
auto& ev = get_eval(t);
if (len_r < 0)
ev.max_length = 0;
if (len_r.is_unsigned())
ev.max_length = std::min(ev.max_length, len_r.get_unsigned());
}
}
}

Expand All @@ -1018,6 +1026,7 @@ namespace sls {
if (!is_seq_predicate(e))
return;
auto a = to_app(e);
// verbose_stream() << "repair " << lit << " " << mk_pp(e, m) << " " << bval1(e) << "\n";
if (bval1(e) == lit.sign())
ctx.flip(lit.var());
}
Expand Down

0 comments on commit 1e839e5

Please sign in to comment.