Skip to content

Commit

Permalink
prepare for integer intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Jan 23, 2024
1 parent 98c9fa7 commit fad4283
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/nlsat/nlsat_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ namespace nlsat {
return result;
}

interval_set_ref infeasible_intervals(root_atom * a, bool neg, clause const* cls) {
interval_set_ref infeasible_intervals(root_atom * a, bool is_int, bool neg, clause const* cls) {
(void) is_int;
atom::kind k = a->get_kind();
unsigned i = a->i();
SASSERT(i > 0);
Expand Down Expand Up @@ -664,8 +665,8 @@ namespace nlsat {
return result;
}

interval_set_ref infeasible_intervals(atom * a, bool neg, clause const* cls) {
return a->is_ineq_atom() ? infeasible_intervals(to_ineq_atom(a), neg, cls) : infeasible_intervals(to_root_atom(a), neg, cls);
interval_set_ref infeasible_intervals(atom * a, bool is_int, bool neg, clause const* cls) {
return a->is_ineq_atom() ? infeasible_intervals(to_ineq_atom(a), is_int, neg, cls) : infeasible_intervals(to_root_atom(a), is_int, neg, cls);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/nlsat/nlsat_explain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ namespace nlsat {
literal l = core[i];
atom * a = m_atoms[l.var()];
SASSERT(a != 0);
interval_set_ref inf = m_evaluator.infeasible_intervals(a, l.sign(), nullptr);
interval_set_ref inf = m_evaluator.infeasible_intervals(a, m_solver.is_int(a->max_var()), l.sign(), nullptr);
r = ism.mk_union(inf, r);
if (ism.is_full(r)) {
// Done
Expand All @@ -1458,7 +1458,7 @@ namespace nlsat {
literal l = todo[i];
atom * a = m_atoms[l.var()];
SASSERT(a != 0);
interval_set_ref inf = m_evaluator.infeasible_intervals(a, l.sign(), nullptr);
interval_set_ref inf = m_evaluator.infeasible_intervals(a, m_solver.is_int(a->max_var()), l.sign(), nullptr);
r = ism.mk_union(inf, r);
if (ism.is_full(r)) {
// literal l must be in the core
Expand Down

0 comments on commit fad4283

Please sign in to comment.