mirror of
https://github.com/Z3Prover/z3
synced 2025-06-20 12:53:38 +00:00
bugfix
This commit is contained in:
parent
e1bb0f5377
commit
e7c9112beb
2 changed files with 6 additions and 3 deletions
|
@ -610,9 +610,12 @@ namespace polysat {
|
||||||
SASSERT(!has_sub(x));
|
SASSERT(!has_sub(x));
|
||||||
SASSERT(!has_sub(y));
|
SASSERT(!has_sub(y));
|
||||||
if (width(x) == width(y)) {
|
if (width(x) == width(y)) {
|
||||||
if (!merge_base(x, y, dep))
|
if (!merge_base(x, y, dep)) {
|
||||||
|
xs.clear();
|
||||||
|
ys.clear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (width(x) > width(y)) {
|
else if (width(x) > width(y)) {
|
||||||
// need to split x according to y
|
// need to split x according to y
|
||||||
mk_slice(x, width(y) - 1, 0, xs, true);
|
mk_slice(x, width(y) - 1, 0, xs, true);
|
||||||
|
@ -785,7 +788,7 @@ namespace polysat {
|
||||||
continue;
|
continue;
|
||||||
pdd const body = a.is_one() ? (m.mk_var(x) - p) : (m.mk_var(x) + p);
|
pdd const body = a.is_one() ? (m.mk_var(x) - p) : (m.mk_var(x) + p);
|
||||||
// c is either x = body or x != body, depending on polarity
|
// c is either x = body or x != body, depending on polarity
|
||||||
LOG("Equation from lit(" << c.blit() << ") " << c << ": v" << x << " = " << body);
|
LOG("Equation from lit(" << c.blit() << ") " << c << ": v" << x << (c.is_positive() ? " = " : " != ") << body);
|
||||||
if (!add_equation(x, body, c.blit())) {
|
if (!add_equation(x, body, c.blit())) {
|
||||||
SASSERT(is_conflict());
|
SASSERT(is_conflict());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -318,7 +318,7 @@ void tst_slicing() {
|
||||||
using namespace polysat;
|
using namespace polysat;
|
||||||
test_slicing::test1();
|
test_slicing::test1();
|
||||||
test_slicing::test2();
|
test_slicing::test2();
|
||||||
// test_slicing::test3();
|
test_slicing::test3();
|
||||||
test_slicing::test4();
|
test_slicing::test4();
|
||||||
test_slicing::test5();
|
test_slicing::test5();
|
||||||
test_slicing::test6();
|
test_slicing::test6();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue