3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-05 23:05:46 +00:00

removing unit clauses and dependency manager, use minisat approach by tracking assumption literals directly also in clauses

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-09-20 15:10:03 -07:00
parent bb5ff8db24
commit 8ee54c665a
12 changed files with 60 additions and 179 deletions

View file

@ -17,15 +17,15 @@ Author:
namespace polysat {
clause_ref clause::from_unit(unsigned lvl, signed_constraint c, p_dependency_ref d) {
clause_ref clause::from_unit(signed_constraint c) {
SASSERT(c->has_bvar());
sat::literal_vector lits;
lits.push_back(c.blit());
return clause::from_literals(lvl, std::move(d), std::move(lits));
return clause::from_literals(std::move(lits));
}
clause_ref clause::from_literals(unsigned lvl, p_dependency_ref d, sat::literal_vector literals) {
return alloc(clause, lvl, std::move(d), std::move(literals));
clause_ref clause::from_literals(sat::literal_vector literals) {
return alloc(clause, std::move(literals));
}
bool clause::is_always_false(solver& s) const {
@ -51,14 +51,6 @@ namespace polysat {
out << " \\/ ";
out << lit;
}
if (m_dep) {
ptr_vector<p_dependency> todo;
todo.push_back(m_dep.get());
vector<unsigned, false> vs;
poly_dep_manager::linearize_todo(todo, vs);
out << " deps ...";
// out << "| " << vs;
}
return out;
}