3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-02 08:10:43 +00:00

Polysat: fixes in solver, forbidden intervals for eq_constraint (#5240)

* Rename to neg_cond

* Add some logging utilities

* Implement case of forbidden interval covering the whole domain

* Implement diseq_narrow

* Do not activate constraint if we are in a conflict state

* comments

* Assert that lemma isn't undefined

* Update revert_decision to work in the case where narrowing causes propagation

* Fix case of non-disjunctive lemma from forbidden intervals

* Conflict should not leak outside user scope

* Add guard to decide(), some notes

* Add test case

* Add constraints to watchlist of unassigned variable during propagation

* Move common propagation functionality into base class

* Combine eq/diseq narrow

* Compute forbidden interval for equality constraints by considering them as p <=u 0 (or p >u 0 for disequalities)
This commit is contained in:
Jakob Rath 2021-05-03 18:30:17 +02:00 committed by GitHub
parent 04876ba8b7
commit f7e476a4a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 350 additions and 130 deletions

View file

@ -38,6 +38,7 @@ namespace polysat {
stats() { reset(); }
};
friend class constraint;
friend class eq_constraint;
friend class var_constraint;
friend class ule_constraint;
@ -187,6 +188,7 @@ namespace polysat {
void erase_watch(pvar v, constraint& c);
void erase_watch(constraint& c);
void add_watch(constraint& c);
void add_watch(constraint& c, pvar v);
void set_conflict(constraint& c);
void set_conflict(pvar v);
@ -225,6 +227,7 @@ namespace polysat {
bool invariant();
bool invariant(scoped_ptr_vector<constraint> const& cs);
bool wlist_invariant();
public: