3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-07 15:55:46 +00:00

first pass on extracting binary clauses, ensure that binary clauses used by simplifier are in scope of DRAT, add certification of units

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-01-14 09:08:40 -08:00
parent d77ac69015
commit a12fca3105
4 changed files with 220 additions and 54 deletions

View file

@ -139,12 +139,7 @@ namespace sat {
}
bool cut::operator==(cut const& other) const {
if (m_size != other.m_size) return false;
if (table() != other.table()) return false;
for (unsigned i = 0; i < m_size; ++i) {
if ((*this)[i] != other[i]) return false;
}
return true;
return table() == other.table() && dom_eq(other);
}
unsigned cut::hash() const {
@ -152,6 +147,20 @@ namespace sat {
[](cut const& c) { return (unsigned)c.table(); },
[](cut const& c, unsigned i) { return c[i]; });
}
unsigned cut::dom_hash() const {
return get_composite_hash(*this, m_size,
[](cut const& c) { return 3; },
[](cut const& c, unsigned i) { return c[i]; });
}
bool cut::dom_eq(cut const& other) const {
if (m_size != other.m_size) return false;
for (unsigned i = 0; i < m_size; ++i) {
if ((*this)[i] != other[i]) return false;
}
return true;
}
std::ostream& cut::display(std::ostream& out) const {
out << "{";