3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-24 03:57:51 +00:00

fix cjust update when backtracking over boolean decision

This commit is contained in:
Jakob Rath 2021-09-07 17:03:47 +02:00
parent a6643955e6
commit e74cf72cef
4 changed files with 9 additions and 29 deletions

View file

@ -34,7 +34,7 @@ namespace polysat {
unsigned m_ref_count = 0; // TODO: remove refcount once we confirm it's not needed anymore
unsigned m_level;
unsigned m_next_guess = 0; // next guess for enumerative backtracking
pvar m_justified_var = null_var; // The variable that was restricted by learning this lemma.
p_dependency_ref m_dep;
sat::literal_vector m_literals;
@ -62,6 +62,9 @@ namespace polysat {
p_dependency* dep() const { return m_dep; }
unsigned level() const { return m_level; }
pvar justified_var() const { return m_justified_var; }
void set_justified_var(pvar v) { SASSERT(m_justified_var == null_var); m_justified_var = v; }
bool empty() const { return m_literals.empty(); }
unsigned size() const { return m_literals.size(); }
sat::literal operator[](unsigned idx) const { return m_literals[idx]; }
@ -73,11 +76,6 @@ namespace polysat {
bool is_always_false(solver& s) const;
bool is_currently_false(solver& s) const;
unsigned next_guess() {
SASSERT(m_next_guess < size());
return m_next_guess++;
}
std::ostream& display(std::ostream& out) const;
};