mirror of
https://github.com/Z3Prover/z3
synced 2025-05-12 02:04:43 +00:00
Polysat: add two more prototype rules (#5355)
* Add try_div to PDDs * x>y is false when x==y * First version of the other two prototype rules * More band-aid fixes...
This commit is contained in:
parent
3e1cfcd538
commit
c4963f4381
7 changed files with 239 additions and 17 deletions
|
@ -28,13 +28,15 @@ namespace polysat {
|
|||
}
|
||||
|
||||
void ule_constraint::narrow(solver& s) {
|
||||
SASSERT(!is_undef());
|
||||
LOG_H3("Narrowing " << *this);
|
||||
LOG("Assignment: " << s.assignment());
|
||||
auto p = lhs().subst_val(s.assignment());
|
||||
LOG("Substituted LHS: " << lhs() << " := " << p);
|
||||
auto q = rhs().subst_val(s.assignment());
|
||||
LOG("Substituted RHS: " << rhs() << " := " << q);
|
||||
|
||||
SASSERT(!is_undef());
|
||||
|
||||
if (is_always_false(p, q)) {
|
||||
s.set_conflict(*this);
|
||||
return;
|
||||
|
@ -95,8 +97,8 @@ namespace polysat {
|
|||
VERIFY(!is_undef());
|
||||
if (is_positive())
|
||||
return lhs.is_val() && rhs.is_val() && lhs.val() > rhs.val();
|
||||
else
|
||||
return lhs.is_val() && rhs.is_val() && lhs.val() <= rhs.val();
|
||||
else
|
||||
return (lhs.is_val() && rhs.is_val() && lhs.val() <= rhs.val()) || (lhs == rhs);
|
||||
}
|
||||
|
||||
bool ule_constraint::is_always_false() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue