mirror of
https://github.com/Z3Prover/z3
synced 2026-04-26 13:53:33 +00:00
bug fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
9cce1ff836
commit
6103c9d718
9 changed files with 124 additions and 21 deletions
|
|
@ -84,6 +84,7 @@ namespace polysat {
|
|||
}
|
||||
|
||||
find_t viable::find_viable(pvar v, rational& lo) {
|
||||
display(verbose_stream() << "find viable for v" << v << "\n");
|
||||
rational hi;
|
||||
switch (find_viable(v, lo, hi)) {
|
||||
case l_true:
|
||||
|
|
@ -99,7 +100,6 @@ namespace polysat {
|
|||
m_overlaps.reset();
|
||||
c.get_bitvector_suffixes(v, m_overlaps);
|
||||
std::sort(m_overlaps.begin(), m_overlaps.end(), [&](auto const& x, auto const& y) { return c.size(x.v) < c.size(y.v); });
|
||||
LOG("Overlaps with v" << v << ":" << m_overlaps);
|
||||
}
|
||||
|
||||
lbool viable::find_viable(pvar v, rational& val1, rational& val2) {
|
||||
|
|
@ -217,6 +217,8 @@ namespace polysat {
|
|||
}
|
||||
// TODO check if admitted: layer.entries = e;
|
||||
m_explain.push_back(e);
|
||||
if (e->interval.is_full())
|
||||
return l_false;
|
||||
auto hi = e->interval.hi_val();
|
||||
if (hi < val1) {
|
||||
if (is_zero)
|
||||
|
|
@ -868,6 +870,25 @@ namespace polysat {
|
|||
return out;
|
||||
}
|
||||
|
||||
std::ostream& viable::display(std::ostream& out) const {
|
||||
for (unsigned v = 0; v < m_units.size(); ++v) {
|
||||
bool first = true;
|
||||
for (auto const& layer : m_units[v].get_layers()) {
|
||||
if (!layer.entries)
|
||||
continue;
|
||||
if (first)
|
||||
out << "v" << v << ": ";
|
||||
first = false;
|
||||
if (layer.bit_width != c.size(v))
|
||||
out << "width[" << layer.bit_width << "] ";
|
||||
display_all(out, v, layer.entries, " ");
|
||||
}
|
||||
if (!first)
|
||||
out << "\n";
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/*
|
||||
* Lower bounds are strictly ascending.
|
||||
* Intervals don't contain each-other (since lower bounds are ascending, it suffices to check containment in one direction).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue