3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-24 16:34:36 +00:00
- avoid more platform specific behavior when using m_mk_extract,
- rename mk_eq in bool_rewriter to mk_eq_plain to distinguish it from mk_eq_rw
- rework bv_lookahead to be more closely based on sls_engine, which has much better heuristic behavior than attempt 1.
This commit is contained in:
Nikolaj Bjorner 2024-12-28 17:40:15 -08:00
parent a5bc5ed813
commit f41134d1b6
17 changed files with 506 additions and 257 deletions

View file

@ -29,7 +29,7 @@ namespace sls {
bool basic_plugin::is_basic(expr* e) const {
if (!e || !is_app(e))
return false;
if (m.is_ite(e) && !m.is_bool(e) && false)
if (m.is_ite(e) && !m.is_bool(e))
return true;
if (m.is_xor(e) && to_app(e)->get_num_args() != 2)
return true;
@ -149,7 +149,6 @@ namespace sls {
if (m.is_value(child))
return false;
bool r = ctx.set_value(child, ctx.get_value(e));
verbose_stream() << "repair-ite-down " << mk_bounded_pp(e, m) << " @ " << mk_bounded_pp(child, m) << " := " << ctx.get_value(e) << " success " << r << "\n";
return r;
}
@ -166,7 +165,6 @@ namespace sls {
val = eval_distinct(e);
else
return;
verbose_stream() << "repair-up " << mk_bounded_pp(e, m) << " " << val << "\n";
if (!ctx.set_value(e, val))
ctx.new_value_eh(e);
}
@ -176,14 +174,14 @@ namespace sls {
bool basic_plugin::repair_down(app* e) {
if (!is_basic(e))
return true;
return true;
if (m.is_xor(e) && eval_xor(e) == ctx.get_value(e))
return true;
if (m.is_ite(e) && eval_ite(e) == ctx.get_value(e))
return true;
if (m.is_distinct(e) && eval_distinct(e) == ctx.get_value(e))
return true;
verbose_stream() << "basic repair down " << mk_bounded_pp(e, m) << "\n";
unsigned n = e->get_num_args();
unsigned s = ctx.rand(n);
for (unsigned i = 0; i < n; ++i) {