3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-23 06:13:40 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-10-14 11:31:34 -07:00
parent 54cce7b10b
commit ef20237edd

View file

@ -186,6 +186,7 @@ namespace sls {
c = g.mk(eq, 0, 2, args); c = g.mk(eq, 0, 2, args);
} }
g.new_diseq(c, to_ptr(lit)); g.new_diseq(c, to_ptr(lit));
g.merge(c, g.find(m.mk_false()), to_ptr(lit));
} }
} }
} }
@ -350,19 +351,18 @@ namespace sls {
void euf_plugin::validate_model() { void euf_plugin::validate_model() {
auto& g = *m_g; auto& g = *m_g;
for (auto const& c : ctx.clauses()) { for (auto lit : ctx.root_literals()) {
for (auto lit : c) {
euf::enode* a, * b; euf::enode* a, * b;
if (!ctx.is_true(lit))
continue;
auto e = ctx.atom(lit.var()); auto e = ctx.atom(lit.var());
if (!e) if (!e)
continue; continue;
if (!ctx.is_relevant(e)) if (!ctx.is_relevant(e))
continue; continue;
if (!ctx.is_true(lit))
continue;
if (m.is_distinct(e)) if (m.is_distinct(e))
continue; continue;
auto r = g.find(e)->get_root();
if (m.is_eq(e)) { if (m.is_eq(e)) {
a = g.find(to_app(e)->get_arg(0)); a = g.find(to_app(e)->get_arg(0));
b = g.find(to_app(e)->get_arg(1)); b = g.find(to_app(e)->get_arg(1));
@ -380,15 +380,15 @@ namespace sls {
//UNREACHABLE(); //UNREACHABLE();
} }
} }
else if (to_app(e)->get_family_id() != basic_family_id && lit.sign() && r != g.find(m.mk_false())->get_root()) { else if (to_app(e)->get_family_id() != basic_family_id && lit.sign() && g.find(e)->get_root() != g.find(m.mk_false())->get_root()) {
IF_VERBOSE(0, verbose_stream() << "not alse " << lit << " " << mk_pp(e, m) << "\n"); IF_VERBOSE(0, verbose_stream() << "not alse " << lit << " " << mk_pp(e, m) << "\n");
//UNREACHABLE(); //UNREACHABLE();
} }
else if (to_app(e)->get_family_id() != basic_family_id && !lit.sign() && r != g.find(m.mk_true())->get_root()) { else if (to_app(e)->get_family_id() != basic_family_id && !lit.sign() && g.find(e)->get_root() != g.find(m.mk_true())->get_root()) {
IF_VERBOSE(0, verbose_stream() << "not true " << lit << " " << mk_pp(e, m) << "\n"); IF_VERBOSE(0, verbose_stream() << "not true " << lit << " " << mk_pp(e, m) << "\n");
//UNREACHABLE(); //UNREACHABLE();
} }
}
} }
} }