mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 02:42:02 +00:00
Polysat: expand conflict explanation rules (#5366)
* update example to match slides * Add normalized view of inequalities * workaround * Add a conflict explanation rule * unit clauses should be asserted at the base level * Add src constraint to interval * support non-strict case in first rule * print conflict constraints only once * update second rule * update third rule as well
This commit is contained in:
parent
dec37aee34
commit
20a5baeb70
10 changed files with 249 additions and 159 deletions
|
@ -211,4 +211,15 @@ namespace polysat {
|
|||
return true;
|
||||
}
|
||||
|
||||
inequality eq_constraint::as_inequality() const {
|
||||
SASSERT(!is_undef());
|
||||
pdd zero = p() - p();
|
||||
if (is_positive()) {
|
||||
// p <= 0
|
||||
return { .lhs = p(), .rhs = zero, .is_strict = false, .src = this };
|
||||
} else {
|
||||
// 0 < p
|
||||
return { .lhs = zero, .rhs = p(), .is_strict = true, .src = this };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue