mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
tuning and fixing consequence finding, adding dimacs evaluation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
dedc130e98
commit
8032217fd1
6 changed files with 126 additions and 2 deletions
|
@ -3284,13 +3284,17 @@ namespace sat {
|
|||
checkpoint();
|
||||
literal_set::iterator it = unfixed_lits.begin(), end = unfixed_lits.end();
|
||||
unsigned num_resolves = 0;
|
||||
unsigned num_fixed = 0;
|
||||
unsigned num_assigned = 0;
|
||||
lbool is_sat = l_true;
|
||||
for (; it != end; ++it) {
|
||||
literal lit = *it;
|
||||
literal lit = *it;
|
||||
if (value(lit) != l_undef) {
|
||||
++num_fixed;
|
||||
continue;
|
||||
}
|
||||
push();
|
||||
++num_assigned;
|
||||
assign(~lit, justification());
|
||||
propagate(false);
|
||||
while (inconsistent()) {
|
||||
|
@ -3307,8 +3311,18 @@ namespace sat {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (scope_lvl() == 1) {
|
||||
it = unfixed_lits.begin();
|
||||
for (; it != end; ++it) {
|
||||
literal lit = *it;
|
||||
if (value(lit) == l_true) {
|
||||
VERIFY(extract_fixed_consequences(lit, assumptions, unfixed_vars, conseq));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_sat == l_true) {
|
||||
if (scope_lvl() == 1 && num_resolves > 0) {
|
||||
IF_VERBOSE(1, verbose_stream() << "(sat.get-consequences backjump)\n";);
|
||||
is_sat = l_undef;
|
||||
}
|
||||
else {
|
||||
|
@ -3331,6 +3345,8 @@ namespace sat {
|
|||
<< " iterations: " << num_iterations
|
||||
<< " variables: " << unfixed_lits.size()
|
||||
<< " fixed: " << conseq.size()
|
||||
<< " status: " << is_sat
|
||||
<< " pre-assigned: " << num_fixed
|
||||
<< " unfixed: " << lits.size() - conseq.size() - unfixed_lits.size()
|
||||
<< ")\n";);
|
||||
|
||||
|
|
|
@ -247,6 +247,7 @@ namespace sat {
|
|||
unsigned num_clauses() const;
|
||||
unsigned num_restarts() const { return m_restarts; }
|
||||
bool is_external(bool_var v) const { return m_external[v] != 0; }
|
||||
void set_external(bool_var v) { m_external[v] = true; }
|
||||
bool was_eliminated(bool_var v) const { return m_eliminated[v] != 0; }
|
||||
unsigned scope_lvl() const { return m_scope_lvl; }
|
||||
lbool value(literal l) const { return static_cast<lbool>(m_assignment[l.index()]); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue