3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-10 17:58:06 +00:00

fixes to inprocessing code

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-12-01 18:06:26 -08:00
parent c8e655830f
commit b98c864d76
7 changed files with 28 additions and 40 deletions

View file

@ -159,17 +159,20 @@ namespace sat {
}
}
// copy high quality lemmas
unsigned num_learned = 0;
for (clause* c : src.m_learned) {
if (c->glue() <= 2 || (c->size() <= 40 && c->glue() <= 8)) {
buffer.reset();
for (literal l : *c) buffer.push_back(l);
clause* c1 = mk_clause_core(buffer.size(), buffer.c_ptr(), true);
if (c1) {
++num_learned;
c1->set_glue(c->glue());
c1->set_psm(c->psm());
}
}
}
IF_VERBOSE(1, verbose_stream() << "(sat.copy :learned " << num_learned << ")\n";);
}
m_user_scope_literals.reset();
@ -879,9 +882,6 @@ namespace sat {
m_stats.m_units = init_trail_size();
IF_VERBOSE(2, verbose_stream() << "(sat.sat-solver)\n";);
SASSERT(at_base_lvl());
if (m_config.m_lookahead_search && num_lits == 0) {
return lookahead_search();
}
if (m_config.m_local_search) {
return do_local_search(num_lits, lits);
@ -984,21 +984,6 @@ namespace sat {
return r;
}
lbool solver::lookahead_search() {
lookahead lh(*this);
lbool r = l_undef;
try {
r = lh.check();
m_model = lh.get_model();
}
catch (z3_exception&) {
lh.collect_statistics(m_aux_stats);
throw;
}
lh.collect_statistics(m_aux_stats);
return r;
}
lbool solver::check_par(unsigned num_lits, literal const* lits) {
scoped_ptr_vector<local_search> ls;
int num_threads = static_cast<int>(m_config.m_num_threads + m_config.m_local_search_threads);