3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-11 02:08:07 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-07-27 17:02:27 -07:00
commit b482dbd589
379 changed files with 7440 additions and 3352 deletions

View file

@ -2884,7 +2884,7 @@ namespace sat {
unsigned j = 0;
for (unsigned i = 0; i < clauses.size(); ++i) {
clause & c = *(clauses[i]);
if (c.contains(lit)) {
if (c.contains(lit) || c.contains(~lit)) {
detach_clause(c);
del_clause(c);
}
@ -2940,6 +2940,7 @@ namespace sat {
w = max_var(m_clauses, w);
w = max_var(true, w);
w = max_var(false, w);
v = m_mc.max_var(w);
for (unsigned i = 0; i < m_trail.size(); ++i) {
if (m_trail[i].var() > w) w = m_trail[i].var();
}
@ -3430,9 +3431,9 @@ namespace sat {
}
}
}
// Algorithm 7: Corebased Algorithm with Chunking
static void back_remove(sat::literal_vector& lits, sat::literal l) {
for (unsigned i = lits.size(); i > 0; ) {
--i;
@ -3456,7 +3457,7 @@ namespace sat {
}
}
}
static lbool core_chunking(sat::solver& s, model const& m, sat::bool_var_vector const& vars, sat::literal_vector const& asms, vector<sat::literal_vector>& conseq, unsigned K) {
sat::literal_vector lambda;
for (unsigned i = 0; i < vars.size(); i++) {
@ -3656,7 +3657,7 @@ namespace sat {
SASSERT(search_lvl() == 1);
unsigned num_iterations = 0;
extract_fixed_consequences(unfixed_lits, assumptions, unfixed_vars, conseq);
extract_fixed_consequences(unfixed_lits, assumptions, unfixed_vars, conseq);
update_unfixed_literals(unfixed_lits, unfixed_vars);
while (!unfixed_lits.empty()) {
if (scope_lvl() > search_lvl()) {
@ -3671,7 +3672,7 @@ namespace sat {
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;
if (lvl(lit) <= 1 && value(lit) == l_true) {
@ -3726,8 +3727,8 @@ namespace sat {
<< " iterations: " << num_iterations
<< " variables: " << unfixed_lits.size()
<< " fixed: " << conseq.size()
<< " status: " << is_sat
<< " pre-assigned: " << num_fixed
<< " status: " << is_sat
<< " pre-assigned: " << num_fixed
<< " unfixed: " << lits.size() - conseq.size() - unfixed_lits.size()
<< ")\n";);