3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-13 19:20:18 +00:00

local changes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-07-29 07:41:08 -07:00
parent 19050d1c4c
commit 66f626b50e
3 changed files with 30 additions and 2 deletions

View file

@ -697,6 +697,7 @@ namespace sat {
try {
if (inconsistent()) return l_false;
init_search();
init_assumptons(num_lits, lits);
propagate(false);
if (inconsistent()) return l_false;
cleanup();
@ -851,6 +852,29 @@ namespace sat {
}
}
void solver::init_assumptions(unsigned num_lits, literal const* lits) {
if (num_lits == 0) {
return;
}
push();
m_assumptions.reset();
m_assumption_set.reset();
for (unsigned i = 0; i < num_lits; ++i) {
literal l = lits[i];
m_assumption_set.insert(l);
m_assumptions.push_back(l);
mk_clause(1, &l);
}
}
bool solver::tracking_assumptions() const {
return !m_assumptions.empty();
}
bool solver::is_assumption(literal l) const {
return tracking_assumptions() && m_assumption_set.contains(l);
}
void solver::init_search() {
m_phase_counter = 0;
m_phase_cache_on = false;
@ -1936,7 +1960,7 @@ namespace sat {
clause_wrapper cw = m_clauses_to_reinit[i];
bool reinit = false;
if (cw.is_binary()) {
if (propagate_bin_clause(cw[0], cw[1])) {
o if (propagate_bin_clause(cw[0], cw[1])) {
if (scope_lvl() > 0) {
m_clauses_to_reinit[j] = cw;
j++;