mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
test and fix viable2
This commit is contained in:
parent
4261345503
commit
69a17d0c60
4 changed files with 90 additions and 8 deletions
|
@ -200,12 +200,12 @@ namespace polysat {
|
|||
if (a1 != a2 && !a1.is_zero() && !a2.is_zero())
|
||||
return false;
|
||||
SASSERT(b1.is_val());
|
||||
SASSERT(b2.is_val());
|
||||
|
||||
LOG("values " << a1 << " " << a2);
|
||||
SASSERT(b2.is_val());
|
||||
|
||||
_backtrack.released = true;
|
||||
|
||||
// LOG("add " << c << " " << a1 << " " << b1 << " " << a2 << " " << b2);
|
||||
|
||||
if (match_linear1(c, a1, b1, e1, a2, b2, e2, out_interval, out_side_cond))
|
||||
return true;
|
||||
if (match_linear2(c, a1, b1, e1, a2, b2, e2, out_interval, out_side_cond))
|
||||
|
|
|
@ -66,6 +66,7 @@ namespace polysat {
|
|||
friend class ex_polynomial_superposition;
|
||||
friend class inf_saturate;
|
||||
friend class constraint_manager;
|
||||
friend class scoped_solverv;
|
||||
|
||||
reslimit& m_lim;
|
||||
params_ref m_params;
|
||||
|
|
|
@ -85,6 +85,8 @@ namespace polysat {
|
|||
e->remove_from(m_viable[v], e);
|
||||
};
|
||||
|
||||
//LOG("intersect " << ne->interval);
|
||||
|
||||
if (!e)
|
||||
m_viable[v] = create_entry();
|
||||
else {
|
||||
|
@ -107,6 +109,10 @@ namespace polysat {
|
|||
}
|
||||
SASSERT(e->interval.lo_val() != ne->interval.lo_val());
|
||||
if (e->interval.lo_val() > ne->interval.lo_val()) {
|
||||
if (first->prev()->interval.contains(ne->interval)) {
|
||||
m_alloc.push_back(ne);
|
||||
return;
|
||||
}
|
||||
e->insert_before(create_entry());
|
||||
if (e == first)
|
||||
m_viable[v] = e->prev();
|
||||
|
@ -155,7 +161,7 @@ namespace polysat {
|
|||
for (; e != last; e = e->next()) {
|
||||
if (e->interval.currently_contains(val))
|
||||
return false;
|
||||
if (e->interval.lo_val() < val)
|
||||
if (val < e->interval.lo_val())
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -294,11 +300,13 @@ namespace polysat {
|
|||
while (true) {
|
||||
if (e->interval.is_full())
|
||||
return e->next() == e;
|
||||
if (e->interval.is_currently_empty())
|
||||
if (e->interval.is_currently_empty())
|
||||
return false;
|
||||
|
||||
auto* n = e->next();
|
||||
if (n != e && e->interval.contains(n->interval))
|
||||
if (n != e && e->interval.contains(n->interval))
|
||||
return false;
|
||||
|
||||
if (n == first)
|
||||
break;
|
||||
if (e->interval.lo_val() >= n->interval.lo_val())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue