3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-03 22:05:45 +00:00

Polysat: constraint refactor cont'd, deduplicate constraints (#5520)

* Assign boolean variables only to long-lived constraints, and deduplicate constraints when they are created

* scoped_signed_constraint

* update other classes

* fix

* Don't use scoped_ptr<constraint> with dedup()
This commit is contained in:
Jakob Rath 2021-08-30 19:00:27 +02:00 committed by GitHub
parent ebaea2159e
commit 0c1e44da77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 365 additions and 298 deletions

View file

@ -17,7 +17,7 @@ Author:
namespace polysat {
class ule_constraint : public constraint {
class ule_constraint final : public constraint {
pdd m_lhs;
pdd m_rhs;
public:
@ -37,7 +37,7 @@ namespace polysat {
bool is_currently_false(solver& s, bool is_positive) override;
bool is_currently_true(solver& s, bool is_positive) override;
void narrow(solver& s, bool is_positive) override;
bool forbidden_interval(solver& s, bool is_positive, pvar v, eval_interval& out_interval, constraint_literal_ref& out_neg_cond) override;
bool forbidden_interval(solver& s, bool is_positive, pvar v, eval_interval& out_interval, scoped_signed_constraint& out_neg_cond) override;
inequality as_inequality(bool is_positive) const override;
unsigned hash() const override;
bool operator==(constraint const& other) const override;