3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-26 20:08:42 +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

@ -39,17 +39,18 @@ namespace polysat {
m_needs_model = false;
}
void conflict_core::set(constraint_literal c) {
void conflict_core::set(signed_constraint c) {
LOG("Conflict: " << c);
SASSERT(empty());
m_constraints.push_back(std::move(c));
m_needs_model = true;
}
void conflict_core::set(pvar v, vector<constraint_literal> const& cjust_v) {
void conflict_core::set(pvar v, vector<signed_constraint> const& cjust_v) {
LOG("Conflict for v" << v << ": " << cjust_v);
SASSERT(empty());
NOT_IMPLEMENTED_YET();
m_conflict_var = v;
m_constraints.append(cjust_v);
if (cjust_v.empty())
m_constraints.push_back({});