3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-04 06:15: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

@ -26,8 +26,6 @@ namespace polysat {
class clause_builder {
solver* m_solver;
sat::literal_vector m_literals;
p_dependency_ref m_dep;
unsigned m_level = 0;
public:
clause_builder(solver& s);
@ -36,21 +34,17 @@ namespace polysat {
clause_builder& operator=(clause_builder const& s) = delete;
clause_builder& operator=(clause_builder&& s) = default;
bool empty() const { return m_literals.empty() && m_dep == nullptr && m_level == 0; }
bool empty() const { return m_literals.empty(); }
void reset();
unsigned level() const { return m_level; }
/// Build the clause. This will reset the clause builder so it can be reused.
clause_ref build();
void add_dependency(p_dependency* d);
void push(sat::literal lit);
void push(signed_constraint c);
void push(inequality const& i) {
push(i.as_signed_constraint());
}
void push(inequality const& i) { push(i.as_signed_constraint()); }
/// Push a new constraint. Allocates a boolean variable for the constraint, if necessary.
void push_new(signed_constraint c);