3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-16 20:24:45 +00:00

Fix dependency tracking for input boolean conflicts

This commit is contained in:
Jakob Rath 2023-02-06 16:28:41 +01:00
parent d105c1c825
commit c79a16db2a

View file

@ -153,12 +153,13 @@ namespace polysat {
if (is_conflict())
return; // no need to do anything if we already have a conflict at base level
sat::literal lit = c.blit();
LOG("New constraint: " << lit_pp(*this, c));
LOG("New constraint " << c << " for " << dep);
switch (m_bvars.value(lit)) {
case l_false:
// Input literal contradicts current boolean state (e.g., opposite literals in the input)
// => conflict only flags the inconsistency
set_conflict_at_base_level(dep);
m_conflict.insert(~c); // ~c is true in the solver, need to track its original dependencies
return;
case l_true:
// constraint c is already asserted => ignore
@ -172,7 +173,6 @@ namespace polysat {
switch (c.eval()) {
case l_false:
// asserted an always-false constraint => conflict at base level
LOG("Always false: " << c);
set_conflict_at_base_level(dep);
return;
case l_true: