3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

speed-up handling of cnf input to inc_sat_solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-01-11 20:52:19 -08:00
parent 9bd4050e0c
commit b8d18c6c6d
7 changed files with 133 additions and 57 deletions

View file

@ -966,9 +966,9 @@ namespace smt {
justification* js = nullptr;
c.inc_propagations(*this);
if (!resolve_conflict(c, lits)) {
if (proofs_enabled()) {
js = alloc(theory_lemma_justification, get_id(), ctx, lits.size(), lits.c_ptr());
}
if (proofs_enabled()) {
js = alloc(theory_lemma_justification, get_id(), ctx, lits.size(), lits.c_ptr());
}
ctx.mk_clause(lits.size(), lits.c_ptr(), js, CLS_AUX_LEMMA, nullptr);
}
SASSERT(ctx.inconsistent());
@ -1195,7 +1195,9 @@ namespace smt {
// perform unit propagation
if (maxsum >= c.mpz_k() && maxsum - mininc < c.mpz_k()) {
literal_vector& lits = get_unhelpful_literals(c, true);
// for (literal lit : lits) SASSERT(ctx.get_assignment(lit) == l_true);
lits.push_back(c.lit());
// SASSERT(ctx.get_assignment(c.lit()) == l_true);
for (unsigned i = 0; i < sz; ++i) {
literal lit = c.lit(i);
if (ctx.get_assignment(lit) == l_undef) {