3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-06 18:01:07 +00:00

updates to repair logic, mainly arithmetic

This commit is contained in:
Nikolaj Bjorner 2024-07-21 21:03:14 -07:00
parent 5b0d49cd76
commit 5e62984178
13 changed files with 532 additions and 191 deletions

View file

@ -335,21 +335,23 @@ namespace sls {
set_value(e, b);
}
void basic_plugin::repair_down(app* e) {
bool basic_plugin::repair_down(app* e) {
SASSERT(m.is_bool(e));
unsigned n = e->get_num_args();
if (n == 0 || !is_basic(e))
return;
if (!is_basic(e))
return false;
if (n == 0)
return true;
if (bval0(e) == bval1(e))
return;
return true;
unsigned s = ctx.rand(n);
for (unsigned i = 0; i < n; ++i) {
auto j = (i + s) % n;
if (try_repair(e, j))
return;
return true;
}
repair_up(e);
return false;
}
bool basic_plugin::try_repair_distinct(app* e, unsigned i) {