mirror of
https://github.com/Z3Prover/z3
synced 2025-08-19 01:32:17 +00:00
fix unsoundness in quantifier propagation #6116 and add initial lemma logging
This commit is contained in:
parent
912b284602
commit
ce1f3987d9
15 changed files with 78 additions and 13 deletions
|
@ -412,6 +412,7 @@ namespace sat {
|
|||
clause * solver::mk_clause_core(unsigned num_lits, literal * lits, sat::status st) {
|
||||
bool redundant = st.is_redundant();
|
||||
TRACE("sat", tout << "mk_clause: " << mk_lits_pp(num_lits, lits) << (redundant?" learned":" aux") << "\n";);
|
||||
bool logged = false;
|
||||
if (!redundant || !st.is_sat()) {
|
||||
unsigned old_sz = num_lits;
|
||||
bool keep = simplify_clause(num_lits, lits);
|
||||
|
@ -420,8 +421,10 @@ namespace sat {
|
|||
return nullptr; // clause is equivalent to true.
|
||||
}
|
||||
// if an input clause is simplified, then log the simplified version as learned
|
||||
if (m_config.m_drat && old_sz > num_lits)
|
||||
if (m_config.m_drat && old_sz > num_lits) {
|
||||
drat_log_clause(num_lits, lits, st);
|
||||
logged = true;
|
||||
}
|
||||
|
||||
++m_stats.m_non_learned_generation;
|
||||
if (!m_searching) {
|
||||
|
@ -435,7 +438,7 @@ namespace sat {
|
|||
set_conflict();
|
||||
return nullptr;
|
||||
case 1:
|
||||
if (m_config.m_drat && (!st.is_sat() || st.is_input()))
|
||||
if (!logged && m_config.m_drat && (!st.is_sat() || st.is_input()))
|
||||
drat_log_clause(num_lits, lits, st);
|
||||
assign_unit(lits[0]);
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue