mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +00:00
Remove not_op
This commit is contained in:
parent
7febcd47ec
commit
032e7e0337
3 changed files with 12 additions and 10 deletions
|
@ -48,7 +48,6 @@ namespace polysat {
|
|||
// The following can currently not be used as standalone constraints
|
||||
SASSERT(c != code::or_op);
|
||||
SASSERT(c != code::xor_op);
|
||||
SASSERT(c != code::not_op);
|
||||
}
|
||||
|
||||
lbool op_constraint::eval() const {
|
||||
|
@ -74,9 +73,9 @@ namespace polysat {
|
|||
|
||||
std::ostream& op_constraint::display(std::ostream& out, lbool status) const {
|
||||
switch (status) {
|
||||
case l_true: return display(out);
|
||||
case l_false: return display(out << "~");
|
||||
default: return display(out << "?");
|
||||
case l_true: return display(out, "==");
|
||||
case l_false: return display(out, "!=");
|
||||
default: return display(out, "?=");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,10 +101,11 @@ namespace polysat {
|
|||
}
|
||||
|
||||
std::ostream& op_constraint::display(std::ostream& out) const {
|
||||
if (m_op == code::not_op)
|
||||
return out << r() << " == ~" << p();
|
||||
else
|
||||
return out << r() << " == " << p() << " " << m_op << " " << q();
|
||||
return display(out, l_true);
|
||||
}
|
||||
|
||||
std::ostream& op_constraint::display(std::ostream& out, char const* eq) const {
|
||||
return out << r() << " " << eq << " " << p() << " " << m_op << " " << q();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace polysat {
|
|||
|
||||
class op_constraint final : public constraint {
|
||||
public:
|
||||
enum class code { lshr_op, ashr_op, shl_op, and_op, or_op, xor_op, not_op };
|
||||
enum class code { lshr_op, ashr_op, shl_op, and_op, or_op, xor_op };
|
||||
protected:
|
||||
friend class constraint_manager;
|
||||
|
||||
|
@ -49,6 +49,8 @@ namespace polysat {
|
|||
void narrow_and(solver& s);
|
||||
static lbool eval_and(pdd const& p, pdd const& q, pdd const& r);
|
||||
|
||||
std::ostream& display(std::ostream& out, char const* eq) const;
|
||||
|
||||
public:
|
||||
~op_constraint() override {}
|
||||
pdd const& p() const { return m_p; }
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace polysat {
|
|||
}
|
||||
|
||||
std::ostream& ule_constraint::display(std::ostream& out) const {
|
||||
return out << m_lhs << (is_eq() ? " == " : " <= ") << m_rhs;
|
||||
return display(out, l_true, m_lhs, m_rhs);
|
||||
}
|
||||
|
||||
void ule_constraint::narrow(solver& s, bool is_positive, bool first) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue