return d_variableOrdering;
}
-std::vector<CACInterval> CDCAC::getUnsatIntervals(
- std::size_t cur_variable) const
+std::vector<CACInterval> CDCAC::getUnsatIntervals(std::size_t cur_variable)
{
std::vector<CACInterval> res;
for (const auto& c : d_constraints.getConstraints())
res.emplace_back(CACInterval{i, l, u, m, d, {n}});
}
}
- cleanIntervals(res);
+ pruneRedundantIntervals(res);
return res;
}
Trace("cdcac") << "Adding integrality interval " << newInterval.d_interval
<< std::endl;
intervals.emplace_back(newInterval);
- cleanIntervals(intervals);
+ pruneRedundantIntervals(intervals);
continue;
}
d_assignment.set(d_variableOrdering[curVariable], sample);
Trace("cdcac") << "\torigins: " << intervals.back().d_origins << std::endl;
// Remove redundant intervals
- cleanIntervals(intervals);
+ pruneRedundantIntervals(intervals);
}
if (Trace.isOn("cdcac"))
});
}
+void CDCAC::pruneRedundantIntervals(std::vector<CACInterval>& intervals)
+{
+ cleanIntervals(intervals);
+}
+
} // namespace cad
} // namespace nl
} // namespace arith
* Combines unsatisfiable regions from d_constraints evaluated over
* d_assignment. Implements Algorithm 2.
*/
- std::vector<CACInterval> getUnsatIntervals(std::size_t cur_variable) const;
+ std::vector<CACInterval> getUnsatIntervals(std::size_t cur_variable);
/**
* Sample outside of the set of intervals.
*/
bool hasRootBelow(const poly::Polynomial& p, const poly::Value& val) const;
+ /**
+ * Sort intervals according to section 4.4.1. and removes fully redundant
+ * intervals as in 4.5. 1. by calling out to cleanIntervals.
+ * Additionally makes sure to prune proofs for removed intervals.
+ */
+ void pruneRedundantIntervals(std::vector<CACInterval>& intervals);
+
/**
* The current assignment. When the method terminates with SAT, it contains a
* model for the input constraints.