mirror of
https://github.com/Z3Prover/z3
synced 2025-09-06 09:51:09 +00:00
fixes to sls
This commit is contained in:
parent
5e62984178
commit
fce21981c6
16 changed files with 521 additions and 80 deletions
|
@ -335,8 +335,17 @@ namespace sls {
|
|||
set_value(e, b);
|
||||
}
|
||||
|
||||
void basic_plugin::repair_literal(sat::literal lit) {
|
||||
auto a = ctx.atom(lit.var());
|
||||
if (!is_basic(a))
|
||||
return;
|
||||
if (bval1(to_app(a)) != bval0(to_app(a)))
|
||||
ctx.flip(lit.var());
|
||||
}
|
||||
|
||||
bool basic_plugin::repair_down(app* e) {
|
||||
SASSERT(m.is_bool(e));
|
||||
|
||||
unsigned n = e->get_num_args();
|
||||
if (!is_basic(e))
|
||||
return false;
|
||||
|
@ -345,6 +354,7 @@ namespace sls {
|
|||
|
||||
if (bval0(e) == bval1(e))
|
||||
return true;
|
||||
verbose_stream() << "basic repair down " << mk_bounded_pp(e, m) << "\n";
|
||||
unsigned s = ctx.rand(n);
|
||||
for (unsigned i = 0; i < n; ++i) {
|
||||
auto j = (i + s) % n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue