Skip to content

Commit

Permalink
check for m.get_sort(lhs->get_owner()) == m.get_sort(rhs->get_owner()…
Browse files Browse the repository at this point in the history
…) in equality propagation

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
  • Loading branch information
levnach committed Jun 22, 2020
1 parent 4b6ca6a commit 6ced699
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/math/lp/lp_bound_propagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ class lp_bound_propagator {
TRACE("cheap_eq", tout << "reporting eq " << j << ", " << k << "\n";
for (auto p : exp) {
lp().constraints().display(tout, [this](lpvar j) { return lp().get_variable_name(j);}, p.ci());
});
}
tout << "theory_vars v" << lp().local_to_external(je) << " == v" << lp().local_to_external(ke) << "\n";
);

m_imp.add_eq(je, ke, exp);
lp().settings().stats().m_cheap_eqs++;
Expand Down
3 changes: 2 additions & 1 deletion src/smt/theory_lra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2423,7 +2423,8 @@ class theory_lra::imp {
theory_var vv = lp().local_to_external(v); // so maybe better to have them already transformed to external form
enode* n1 = get_enode(uv);
enode* n2 = get_enode(vv);
if (n1->get_root() == n2->get_root())
if (n1->get_root() == n2->get_root() ||
m.get_sort(n1->get_owner()) != m.get_sort(n2->get_owner()))
return;
reset_evidence();
for (auto const& ev : e)
Expand Down

0 comments on commit 6ced699

Please sign in to comment.