3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-07 03:31:23 +00:00
This commit is contained in:
Jakob Rath 2022-11-17 15:10:27 +01:00
parent d9cb06114e
commit 81150f433a

View file

@ -979,10 +979,8 @@ namespace polysat {
} }
} }
static void test_ineq_non_axiom1(unsigned bw = 32) { static void test_ineq_non_axiom1(unsigned bw, unsigned i) {
auto const bound = rational::power_of_two(bw - 1); auto const bound = rational::power_of_two(bw - 1);
for (unsigned i = 0; i < 6; ++i) {
scoped_solver s(std::string(__func__) + " perm=" + std::to_string(i)); scoped_solver s(std::string(__func__) + " perm=" + std::to_string(i));
auto x = s.var(s.add_var(bw)); auto x = s.var(s.add_var(bw));
auto y = s.var(s.add_var(bw)); auto y = s.var(s.add_var(bw));
@ -995,6 +993,10 @@ namespace polysat {
s.check(); s.check();
s.expect_sat(); s.expect_sat();
} }
static void test_ineq_non_axiom1(unsigned bw = 32) {
for (unsigned i = 0; i < 6; ++i)
test_ineq_non_axiom1(32, i);
} }
// xy <= xz & !Omega(x*y) => y <= z or x = 0 // xy <= xz & !Omega(x*y) => y <= z or x = 0
@ -1573,7 +1575,9 @@ void tst_polysat() {
#if 0 // Enable this block to run a single unit test with detailed output. #if 0 // Enable this block to run a single unit test with detailed output.
collect_test_records = false; collect_test_records = false;
// test_polysat::test_ineq1(); // test_polysat::test_ineq1();
test_polysat::test_quot_rem(); // test_polysat::test_quot_rem();
test_polysat::test_ineq_non_axiom1(32, 3);
// test_polysat::test_monot(5);
return; return;
#endif #endif
@ -1621,12 +1625,12 @@ void tst_polysat() {
test_polysat::test_ineq1(); // TODO: resource limit test_polysat::test_ineq1(); // TODO: resource limit
test_polysat::test_ineq2(); // TODO: resource limit test_polysat::test_ineq2(); // TODO: resource limit
test_polysat::test_monot(); // TODO: assertion failure; resource limit test_polysat::test_monot(); // TODO: assertion failure; resource limit
test_polysat::test_monot_bounds(2); // weak conflicts test_polysat::test_monot_bounds(2);
test_polysat::test_monot_bounds(8); test_polysat::test_monot_bounds(8);
test_polysat::test_monot_bounds(); // TODO: resource limit test_polysat::test_monot_bounds();
test_polysat::test_monot_bounds_full(); // TODO: triggers assertion in watchlist invariant -- it's a problem with push/pop and that the "active" flag isn't maintained properly test_polysat::test_monot_bounds_full();
test_polysat::test_monot_bounds_simple(8); // undef test_polysat::test_monot_bounds_simple(8);
test_polysat::test_fixed_point_arith_div_mul_inverse(); // undef test_polysat::test_fixed_point_arith_div_mul_inverse();
test_polysat::test_ineq_axiom1(); test_polysat::test_ineq_axiom1();
test_polysat::test_ineq_axiom2(); test_polysat::test_ineq_axiom2();
@ -1634,18 +1638,18 @@ void tst_polysat() {
test_polysat::test_ineq_axiom4(); test_polysat::test_ineq_axiom4();
test_polysat::test_ineq_axiom5(); test_polysat::test_ineq_axiom5();
test_polysat::test_ineq_axiom6(); test_polysat::test_ineq_axiom6();
test_polysat::test_ineq_non_axiom1(); // assertion but looks otherwise ok test_polysat::test_ineq_non_axiom1();
test_polysat::test_ineq_non_axiom4(32, 5); // assertions/undef test_polysat::test_ineq_non_axiom4();
test_polysat::test_quot_rem_incomplete(); test_polysat::test_quot_rem_incomplete();
test_polysat::test_quot_rem_fixed(); test_polysat::test_quot_rem_fixed();
test_polysat::test_band(); test_polysat::test_band();
test_polysat::test_quot_rem(); test_polysat::test_quot_rem();
test_polysat::test_fi_zero(); // ok test_polysat::test_fi_zero();
test_polysat::test_fi_nonzero(); // ok test_polysat::test_fi_nonzero();
test_polysat::test_fi_nonmax(); // ok (viable_fallback chooses value for second variable) test_polysat::test_fi_nonmax();
test_polysat::test_fi_disequal_mild(); // ok test_polysat::test_fi_disequal_mild();
// test_fi::exhaustive(); // test_fi::exhaustive();
// test_fi::randomized(); // test_fi::randomized();