3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-01 11:16:54 +00:00

Polysat: forbidden intervals updates (#5230)

* Pop assign_eh

* Fix scoped_ptr_vector constructors, add detach()

* Need to copy the returned lemma

* Add test

* Basic inequality tests

* Return disjunctive lemma to caller
This commit is contained in:
Jakob Rath 2021-04-30 17:41:50 +02:00 committed by GitHub
parent d6e41de344
commit 0c4824f194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 189 additions and 24 deletions

View file

@ -65,6 +65,10 @@ namespace polysat {
// Per constraint state
scoped_ptr_vector<constraint> m_constraints;
scoped_ptr_vector<constraint> m_redundant;
vector<clause> m_redundant_clauses;
bool_var_vector m_disjunctive_lemma;
bool_var_vector m_assign_eh_history;
// Map boolean variables to constraints
bool_var m_next_bvar = 2; // TODO: later, bool vars come from external supply
@ -249,7 +253,8 @@ namespace polysat {
* Returns the disjunctive lemma that should be learned,
* or an empty vector if check_sat() terminated for a different reason.
*/
bool_var_vector get_lemma() { NOT_IMPLEMENTED_YET(); return {}; };
bool_var_vector get_lemma() { return m_disjunctive_lemma; }
bool pending_disjunctive_lemma() { return !m_disjunctive_lemma.empty(); }
/**
* retrieve unsat core dependencies