3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 00:55:31 +00:00

move to get_sort as method, add opt_lns pass, disable xor simplification unless configured, fix perf bug in model converter update trail

This commit is contained in:
Nikolaj Bjorner 2021-02-02 03:58:19 -08:00
parent c623e2db28
commit 4455f6caf8
36 changed files with 391 additions and 90 deletions

View file

@ -42,7 +42,7 @@ namespace mbp {
namespace {
struct sort_lt_proc {
bool operator()(const expr* a, const expr *b) const {
return get_sort(a)->get_id() < get_sort(b)->get_id();
return a->get_sort()->get_id() < b->get_sort()->get_id();
}
};
}
@ -266,7 +266,7 @@ namespace mbp {
expr *a = nullptr, *b = nullptr;
// deal with equality using sort of range
if (m.is_eq (lit, a, b)) {
return get_sort (a)->get_family_id();
return a->get_sort()->get_family_id();
}
// extract family_id of top level app
else if (is_app(lit)) {
@ -919,9 +919,9 @@ namespace mbp {
unsigned i = 0;
unsigned sz = reps.size();
while (i < sz) {
sort* last_sort = get_sort(reps.get(i));
sort* last_sort = res.get(i)->get_sort();
unsigned j = i + 1;
while (j < sz && last_sort == get_sort(reps.get(j))) {++j;}
while (j < sz && last_sort == reps.get(j)->get_sort()) {++j;}
if (j - i == 2) {
expr_ref d(m);
d = mk_neq(m, reps.get(i), reps.get(i+1));

View file

@ -291,9 +291,9 @@ namespace qel {
if (m.is_eq(e, lhs, rhs) && trivial_solve(lhs, rhs, e, vs, ts)) {
return true;
}
family_id fid = get_sort(e)->get_family_id();
family_id fid = e->get_sort()->get_family_id();
if (m.is_eq(e, lhs, rhs)) {
fid = get_sort(lhs)->get_family_id();
fid = lhs->get_sort()->get_family_id();
}
auto* p = m_solvers.get_plugin(fid);
if (p) {