mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
revert to logging conflict to get EUF trim to work
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
6c8b8609ee
commit
68a437e615
|
@ -350,9 +350,9 @@ public:
|
|||
|
||||
void updt_params(params_ref const& p) override {
|
||||
solver_params sp(p);
|
||||
m_check = sp.proof_check();
|
||||
m_save = sp.proof_save();
|
||||
m_trim = sp.proof_trim();
|
||||
m_check = sp.proof_check() && !m_trim && !m_save && !m_on_clause_eh;
|
||||
if (m_trim)
|
||||
trim().updt_params(p);
|
||||
}
|
||||
|
@ -360,6 +360,8 @@ public:
|
|||
void register_on_clause(void* ctx, user_propagator::on_clause_eh_t& on_clause_eh) override {
|
||||
m_on_clause_ctx = ctx;
|
||||
m_on_clause_eh = on_clause_eh;
|
||||
if (m_on_clause_eh)
|
||||
m_check = false;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -383,14 +383,18 @@ namespace sat {
|
|||
return false;
|
||||
};
|
||||
|
||||
if (all_of(m_clause, [&](sat::literal lit) { return s.value(lit) == l_false; }))
|
||||
if (all_of(m_clause, [&](sat::literal lit) { return s.value(lit) == l_false; })) {
|
||||
IF_VERBOSE(3, verbose_stream() << "conflict " << m_clause << "\n");
|
||||
set_conflict(m_clause, cl);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_clause.size() == 2 && is_unit2())
|
||||
s.propagate_bin_clause(m_clause[0], m_clause[1]);
|
||||
else if (m_clause.size() > 2 && is_unit())
|
||||
s.propagate_clause(*cl, true, 0, s.cls_allocator().get_offset(cl));
|
||||
s.propagate(false);
|
||||
if (s.inconsistent() || all_of(m_clause, [&](sat::literal lit) { return s.value(lit) == l_false; })) {
|
||||
if (s.inconsistent()) {
|
||||
IF_VERBOSE(3, verbose_stream() << "conflict " << m_clause << "\n");
|
||||
set_conflict(m_clause, cl);
|
||||
}
|
||||
|
|
|
@ -192,6 +192,9 @@ namespace arith {
|
|||
case hint_type::farkas_h:
|
||||
name = "farkas";
|
||||
break;
|
||||
case hint_type::cut_h:
|
||||
name = "cut";
|
||||
break;
|
||||
case hint_type::bound_h:
|
||||
name = "bound";
|
||||
break;
|
||||
|
|
|
@ -1147,7 +1147,7 @@ namespace arith {
|
|||
app_ref b = mk_bound(m_lia->get_term(), m_lia->get_offset(), !m_lia->is_upper());
|
||||
IF_VERBOSE(4, verbose_stream() << "cut " << b << "\n");
|
||||
literal lit = expr2literal(b);
|
||||
assign(lit, m_core, m_eqs, explain(hint_type::bound_h, lit));
|
||||
assign(lit, m_core, m_eqs, explain(hint_type::cut_h, lit));
|
||||
lia_check = l_false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace arith {
|
|||
enum class hint_type {
|
||||
farkas_h,
|
||||
bound_h,
|
||||
cut_h,
|
||||
implied_eq_h
|
||||
};
|
||||
|
||||
|
|
|
@ -255,6 +255,7 @@ namespace euf {
|
|||
smt_proof_hint* solver::mk_smt_hint(symbol const& n, unsigned nl, literal const* lits, unsigned ne, expr_pair const* eqs, unsigned nd, expr_pair const* deqs) {
|
||||
if (!use_drat())
|
||||
return nullptr;
|
||||
TRACE("euf", tout << "SMT hint " << n << "\n");
|
||||
push(value_trail(m_lit_tail));
|
||||
push(restore_vector(m_proof_literals));
|
||||
|
||||
|
|
Loading…
Reference in a new issue