3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-07 15:55:46 +00:00

Some assertions are now too strict

If possible, we should set the new constraint to l_true;
and revert most of this change later.
Or we adjust the conflict invariant:
- l_true constraints is the default case as before,
- l_undef constraints are new and justified by some side lemma, but
  should be treated by the conflict resolution methods like l_true
  constraints,
- l_false constraints are disallowed in the conflict (as before).
This commit is contained in:
Jakob Rath 2022-10-07 16:24:14 +02:00
parent 74b53c3323
commit 23a747235d
2 changed files with 9 additions and 5 deletions

View file

@ -69,7 +69,8 @@ namespace polysat {
SASSERT(c1.is_currently_true(s));
SASSERT(c2.is_currently_false(s));
SASSERT_EQ(c1.bvalue(s), l_true);
SASSERT_EQ(c2.bvalue(s), l_true);
// SASSERT_EQ(c2.bvalue(s), l_true); // TODO: should always be l_true but currently it's not guaranteed if c2 was derived via side lemma (tag:true_by_side_lemma)
SASSERT(c2.bvalue(s) != l_false);
signed_constraint c = resolve1(v, c1, c2);
if (!c)
@ -93,7 +94,7 @@ namespace polysat {
// c should be unit-propagated to l_true by c1 /\ c2 ==> c
core.add_lemma({c, ~c1, ~c2});
core.log_inference(inference_sup("l_undef lemma", v, c2, c1));
SASSERT_EQ(l_true, c.bvalue(s));
// SASSERT_EQ(l_true, c.bvalue(s)); // not true anymore (TODO: but it should be) (tag:true_by_side_lemma)
break;
case l_true:
// c is just another constraint on the search stack; could be equivalent or better