3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-17 16:52:15 +00:00

Fix cleanup/initialization of sat::simplifier. Relates to #570.

This commit is contained in:
Christoph M. Wintersteiger 2016-11-09 18:00:15 +00:00
parent 6204f67d38
commit 890142ef96
6 changed files with 119 additions and 89 deletions

View file

@ -102,10 +102,14 @@ namespace sat {
unsigned m_val1;
unsigned m_val2;
public:
bin_clause(literal l1, literal l2, bool learned):m_val1(l1.to_uint()), m_val2((l2.to_uint() << 1) + static_cast<unsigned>(learned)) {}
bin_clause(literal l1, literal l2, bool learned) :m_val1(l1.to_uint()), m_val2((l2.to_uint() << 1) + static_cast<unsigned>(learned)) {}
literal get_literal1() const { return to_literal(m_val1); }
literal get_literal2() const { return to_literal(m_val2 >> 1); }
bool is_learned() const { return (m_val2 & 1) == 1; }
bool operator==(const bin_clause & other) const {
return m_val1 == other.m_val1 && m_val2 == other.m_val2 ||
m_val1 == other.m_val2 && m_val2 == other.m_val1;
}
};
class tmp_clause {