3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-14 03:04:44 +00:00
This commit is contained in:
Nikolaj Bjorner 2021-12-11 08:41:04 -08:00
parent 9c3489ba4b
commit 83efb1413a
10 changed files with 99 additions and 57 deletions

View file

@ -202,6 +202,21 @@ namespace polysat {
return ~ule(b, a);
}
bool signed_constraint::is_eq() const {
if (is_positive())
return m_constraint->is_eq();
else
return m_constraint->is_diseq();
}
pdd const& signed_constraint::eq() const {
SASSERT(is_eq());
if (is_positive())
return m_constraint->to_ule().lhs();
else
return m_constraint->to_ule().rhs();
}
/**
* encode that the i'th bit of p is 1.
* It holds if p << (K - i - 1) >= 2^{K-1}, where K is the bit-width.