3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 08:35:31 +00:00

fix viable

This commit is contained in:
Jakob Rath 2023-08-03 11:41:13 +02:00
parent b72a0ed4c8
commit 13f000942a
3 changed files with 14 additions and 4 deletions

View file

@ -29,6 +29,10 @@ namespace polysat {
* \returns True iff a forbidden interval exists and the output parameters were set.
*/
bool forbidden_intervals::get_interval(signed_constraint const& c, pvar v, fi_record& fi) {
// verbose_stream() << "get_interval for v" << v << " " << c << "\n";
SASSERT(fi.side_cond.empty());
SASSERT(fi.src.empty());
fi.bit_width = s.size(v); // TODO: preliminary
if (c->is_ule())
return get_interval_ule(c, v, fi);
if (c->is_umul_ovfl())

View file

@ -25,11 +25,19 @@ namespace polysat {
vector<signed_constraint> side_cond;
vector<signed_constraint> src; // only units may have multiple src (as they can consist of contracted bit constraints)
rational coeff;
unsigned bit_width; // number of lower bits
unsigned bit_width = 0; // number of lower bits
/** Create invalid fi_record */
fi_record(): interval(eval_interval::full()) {}
void reset() {
interval = eval_interval::full();
side_cond.reset();
src.reset();
coeff.reset();
bit_width = 0;
}
struct less {
bool operator()(fi_record const& a, fi_record const& b) const {
return a.interval.lo_val() < b.interval.lo_val();

View file

@ -78,10 +78,8 @@ namespace polysat {
if (m_alloc.empty())
return alloc(entry);
auto* e = m_alloc.back();
e->src.reset();
e->side_cond.reset();
e->fi_record::reset();
e->refined.reset();
e->coeff = 1;
m_alloc.pop_back();
return e;
}