mirror of
https://github.com/Z3Prover/z3
synced 2025-06-22 05:43:39 +00:00
fix #3235 - return early during lookaehad, avoid checking invariant when context is inconsistent
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
59acd1093d
commit
36cddd0c46
3 changed files with 24 additions and 17 deletions
|
@ -82,7 +82,10 @@ namespace smt {
|
|||
unsigned nf = 0, nc = 0, ns = 0, bound = 2000, n = 0;
|
||||
for (bool_var v : vars) {
|
||||
if (!ctx.bool_var2expr(v)) continue;
|
||||
literal lit(v, false);
|
||||
literal lit(v, false);
|
||||
ctx.propagate();
|
||||
if (ctx.inconsistent())
|
||||
return expr_ref(m.mk_false(), m);
|
||||
ctx.push_scope();
|
||||
ctx.assign(lit, b_justification::mk_axiom(), true);
|
||||
ctx.propagate();
|
||||
|
@ -96,6 +99,9 @@ namespace smt {
|
|||
continue;
|
||||
}
|
||||
|
||||
ctx.propagate();
|
||||
if (ctx.inconsistent())
|
||||
return expr_ref(m.mk_false(), m);
|
||||
ctx.push_scope();
|
||||
ctx.assign(~lit, b_justification::mk_axiom(), true);
|
||||
ctx.propagate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue