mirror of
https://github.com/Z3Prover/z3
synced 2025-08-24 03:57:51 +00:00
adding watches on Booleans
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c25fd71bf4
commit
f01da40e49
7 changed files with 130 additions and 54 deletions
|
@ -36,8 +36,10 @@ namespace polysat {
|
|||
unsigned m_level;
|
||||
pvar m_justified_var = null_var; // The variable that was restricted by learning this lemma.
|
||||
p_dependency_ref m_dep;
|
||||
bool m_redundant = false;
|
||||
sat::literal_vector m_literals;
|
||||
|
||||
|
||||
/* TODO: embed literals to save an indirection?
|
||||
unsigned m_num_literals;
|
||||
constraint* m_literals[0];
|
||||
|
@ -68,6 +70,7 @@ namespace polysat {
|
|||
bool empty() const { return m_literals.empty(); }
|
||||
unsigned size() const { return m_literals.size(); }
|
||||
sat::literal operator[](unsigned idx) const { return m_literals[idx]; }
|
||||
sat::literal& operator[](unsigned idx) { return m_literals[idx]; }
|
||||
|
||||
using const_iterator = typename sat::literal_vector::const_iterator;
|
||||
const_iterator begin() const { return m_literals.begin(); }
|
||||
|
@ -77,6 +80,9 @@ namespace polysat {
|
|||
bool is_currently_false(solver& s) const;
|
||||
|
||||
std::ostream& display(std::ostream& out) const;
|
||||
|
||||
void set_redundant(bool r) { m_redundant = r; }
|
||||
bool is_redundant() const { return m_redundant; }
|
||||
};
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& out, clause const& c) { return c.display(out); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue