3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-05 14:55:45 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-12-11 13:01:08 -08:00
parent 91c95aab16
commit 59acd77981
5 changed files with 17 additions and 8 deletions

View file

@ -157,11 +157,13 @@ namespace polysat {
auto rhs = c->to_ule().rhs();
auto a = lhs.reduce(v, p);
auto b = rhs.reduce(v, p);
LOG("try-reduce: " << c << " " << a << " " << b << " vs " << lhs << " " << rhs);
if (a == lhs && b == rhs)
continue;
auto c2 = s.ule(a, b);
if (!c.is_positive())
c2 = ~c2;
LOG("try-reduce is false " << c2.is_currently_false(s));
if (!c2.is_currently_false(s))
continue;
SASSERT(c2.is_currently_false(s));

View file

@ -100,11 +100,7 @@ namespace polysat {
}
/**
* if p constant, q, propagate inequality
*
* TODO optimizations:
* if p is constant, q variable, update viable for q
*
* if p constant, q, propagate inequality
*/
bool mul_ovfl_constraint::narrow_bound(solver& s, bool is_positive,
pdd const& p0, pdd const& q0, pdd const& p, pdd const& q) {
@ -148,7 +144,7 @@ namespace polysat {
}
unsigned mul_ovfl_constraint::hash() const {
return mk_mix(p().hash(), q().hash(), 325);
return mk_mix(p().hash(), q().hash(), kind());
}
bool mul_ovfl_constraint::operator==(constraint const& other) const {

View file

@ -208,7 +208,7 @@ namespace polysat {
}
unsigned ule_constraint::hash() const {
return mk_mix(lhs().hash(), rhs().hash(), 23);
return mk_mix(lhs().hash(), rhs().hash(), kind());
}
bool ule_constraint::operator==(constraint const& other) const {