Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Jul 18, 2021
1 parent 750c06e commit e8bc9f3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/ast/euf/euf_egraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ namespace euf {
void collect_statistics(statistics& st) const;

unsigned num_scopes() const { return m_scopes.size() + m_num_scopes; }
unsigned num_nodes() const { return m_nodes.size(); }
};

inline std::ostream& operator<<(std::ostream& out, egraph const& g) { return g.display(out); }
Expand Down
2 changes: 2 additions & 0 deletions src/sat/smt/array_axioms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,11 @@ namespace array {
app_ref sel1(m), sel2(m);
sel1 = a.mk_select(args1);
sel2 = a.mk_select(args2);
prop |= !ctx.get_enode(sel1) || !ctx.get_enode(sel2);
if (ctx.propagate(e_internalize(sel1), e_internalize(sel2), array_axiom()))
prop = true;
}
prop |= !ctx.get_enode(def1) || !ctx.get_enode(def2);
if (ctx.propagate(e_internalize(def1), e_internalize(def2), array_axiom()))
prop = true;
return prop;
Expand Down
1 change: 1 addition & 0 deletions src/sat/smt/dt_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ namespace dt {
if (v == euf::null_theory_var)
return false;
euf::enode* con = m_var_data[m_find.find(v)]->m_constructor;
CTRACE("dt", !con, display(tout) << ctx.bpp(n) << "\n";);
if (con->num_args() == 0)
dep.insert(n, nullptr);
for (enode* arg : euf::enode_args(con))
Expand Down
8 changes: 6 additions & 2 deletions src/sat/smt/euf_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ namespace euf {

if (!init_relevancy())
give_up = true;


unsigned num_nodes = m_egraph.num_nodes();
for (auto* e : m_solvers) {
if (!m.inc())
return sat::check_result::CR_GIVEUP;
Expand All @@ -468,6 +468,10 @@ namespace euf {
return sat::check_result::CR_CONTINUE;
if (give_up)
return sat::check_result::CR_GIVEUP;
if (num_nodes < m_egraph.num_nodes()) {
IF_VERBOSE(1, verbose_stream() << "new nodes created, but not detected\n");
return sat::check_result::CR_CONTINUE;
}
if (m_qsolver)
return m_qsolver->check();
TRACE("after_search", s().display(tout););
Expand Down

0 comments on commit e8bc9f3

Please sign in to comment.