mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
fixing bugs uncovered by repro in #1914
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cf4bf7b591
commit
f699ac0353
|
@ -541,9 +541,9 @@ namespace smt {
|
|||
bool process_atoms() const;
|
||||
unsigned get_num_conflicts() const { return m_num_conflicts; }
|
||||
var_kind get_var_kind(theory_var v) const { return m_data[v].kind(); }
|
||||
bool is_base(theory_var v) const { return get_var_kind(v) == BASE; }
|
||||
bool is_quasi_base(theory_var v) const { return get_var_kind(v) == QUASI_BASE; }
|
||||
bool is_non_base(theory_var v) const { return get_var_kind(v) == NON_BASE; }
|
||||
bool is_base(theory_var v) const { return v != null_theory_var && get_var_kind(v) == BASE; }
|
||||
bool is_quasi_base(theory_var v) const { return v != null_theory_var && get_var_kind(v) == QUASI_BASE; }
|
||||
bool is_non_base(theory_var v) const { return v != null_theory_var && get_var_kind(v) == NON_BASE; }
|
||||
void set_var_kind(theory_var v, var_kind k) { m_data[v].m_kind = k; }
|
||||
unsigned get_var_row(theory_var v) const { SASSERT(!is_non_base(v)); return m_data[v].m_row_id; }
|
||||
void set_var_row(theory_var v, unsigned r_id) { m_data[v].m_row_id = r_id; }
|
||||
|
|
|
@ -491,13 +491,21 @@ namespace smt {
|
|||
if (!it->is_dead()) {
|
||||
unsigned rid = it->m_row_id;
|
||||
row & r = m_rows[rid];
|
||||
if (is_base(r.get_base_var()))
|
||||
theory_var v = r.get_base_var();
|
||||
if (v == null_theory_var) {
|
||||
// skip
|
||||
}
|
||||
else if (is_base(v)) {
|
||||
return it;
|
||||
}
|
||||
else if (quasi_base_rid == -1)
|
||||
quasi_base_rid = rid;
|
||||
}
|
||||
}
|
||||
SASSERT(quasi_base_rid != -1); // since c.size() != 0
|
||||
if (quasi_base_rid == -1) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
quasi_base_row2base_row(quasi_base_rid);
|
||||
// There is no guarantee that v is still a variable of row quasi_base_rid.
|
||||
|
||||
|
|
Loading…
Reference in a new issue