mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 01:13:18 +00:00
Fix dependency tracking for input boolean conflicts
This commit is contained in:
parent
d105c1c825
commit
c79a16db2a
1 changed files with 2 additions and 2 deletions
|
@ -153,12 +153,13 @@ namespace polysat {
|
||||||
if (is_conflict())
|
if (is_conflict())
|
||||||
return; // no need to do anything if we already have a conflict at base level
|
return; // no need to do anything if we already have a conflict at base level
|
||||||
sat::literal lit = c.blit();
|
sat::literal lit = c.blit();
|
||||||
LOG("New constraint: " << lit_pp(*this, c));
|
LOG("New constraint " << c << " for " << dep);
|
||||||
switch (m_bvars.value(lit)) {
|
switch (m_bvars.value(lit)) {
|
||||||
case l_false:
|
case l_false:
|
||||||
// Input literal contradicts current boolean state (e.g., opposite literals in the input)
|
// Input literal contradicts current boolean state (e.g., opposite literals in the input)
|
||||||
// => conflict only flags the inconsistency
|
// => conflict only flags the inconsistency
|
||||||
set_conflict_at_base_level(dep);
|
set_conflict_at_base_level(dep);
|
||||||
|
m_conflict.insert(~c); // ~c is true in the solver, need to track its original dependencies
|
||||||
return;
|
return;
|
||||||
case l_true:
|
case l_true:
|
||||||
// constraint c is already asserted => ignore
|
// constraint c is already asserted => ignore
|
||||||
|
@ -172,7 +173,6 @@ namespace polysat {
|
||||||
switch (c.eval()) {
|
switch (c.eval()) {
|
||||||
case l_false:
|
case l_false:
|
||||||
// asserted an always-false constraint => conflict at base level
|
// asserted an always-false constraint => conflict at base level
|
||||||
LOG("Always false: " << c);
|
|
||||||
set_conflict_at_base_level(dep);
|
set_conflict_at_base_level(dep);
|
||||||
return;
|
return;
|
||||||
case l_true:
|
case l_true:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue