mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 14:13:23 +00:00
fix compiler warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
253870c6d7
commit
a1306eaab6
8 changed files with 14 additions and 10 deletions
|
@ -158,8 +158,7 @@ static void FUN_NAME(int a, ext_numeral_kind ak, int b, ext_numeral_kind bk, boo
|
||||||
scoped_mpq _a(m), _b(m); \
|
scoped_mpq _a(m), _b(m); \
|
||||||
m.set(_a, a); \
|
m.set(_a, a); \
|
||||||
m.set(_b, b); \
|
m.set(_b, b); \
|
||||||
bool r = OP_NAME(m, _a, ak, _b, bk); \
|
VERIFY(expected == OP_NAME(m, _a, ak, _b, bk)); \
|
||||||
SASSERT(r == expected); \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MK_TST_REL(NAME) MK_TST_REL_CORE(tst_ ## NAME, NAME)
|
#define MK_TST_REL(NAME) MK_TST_REL_CORE(tst_ ## NAME, NAME)
|
||||||
|
|
|
@ -47,12 +47,13 @@ static void tst1() {
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
SASSERT(h.contains(*it));
|
SASSERT(h.contains(*it));
|
||||||
}
|
}
|
||||||
int last = -1;
|
|
||||||
while (!h.empty()) {
|
while (!h.empty()) {
|
||||||
int m1 = h.min_value();
|
int m1 = h.min_value();
|
||||||
int m2 = h.erase_min();
|
int m2 = h.erase_min();
|
||||||
|
(void)m1;
|
||||||
|
(void)m2;
|
||||||
SASSERT(m1 == m2);
|
SASSERT(m1 == m2);
|
||||||
SASSERT(last < m2);
|
SASSERT(-1 < m2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace karr {
|
||||||
}
|
}
|
||||||
lbool is_sat = hb.saturate();
|
lbool is_sat = hb.saturate();
|
||||||
hb.display(std::cout);
|
hb.display(std::cout);
|
||||||
SASSERT(is_sat == l_true);
|
VERIFY(is_sat == l_true);
|
||||||
dst.reset();
|
dst.reset();
|
||||||
unsigned basis_size = hb.get_basis_size();
|
unsigned basis_size = hb.get_basis_size();
|
||||||
for (unsigned i = 0; i < basis_size; ++i) {
|
for (unsigned i = 0; i < basis_size; ++i) {
|
||||||
|
@ -85,7 +85,7 @@ namespace karr {
|
||||||
}
|
}
|
||||||
lbool is_sat = hb.saturate();
|
lbool is_sat = hb.saturate();
|
||||||
hb.display(std::cout);
|
hb.display(std::cout);
|
||||||
SASSERT(is_sat == l_true);
|
VERIFY(is_sat == l_true);
|
||||||
dst.reset();
|
dst.reset();
|
||||||
unsigned basis_size = hb.get_basis_size();
|
unsigned basis_size = hb.get_basis_size();
|
||||||
bool first_initial = true;
|
bool first_initial = true;
|
||||||
|
|
|
@ -20,6 +20,7 @@ static void add_ineq(opt::model_based_opt& mbo,
|
||||||
mbo.add_constraint(vars, rational(k), rel);
|
mbo.add_constraint(vars, rational(k), rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void add_ineq(opt::model_based_opt& mbo,
|
static void add_ineq(opt::model_based_opt& mbo,
|
||||||
unsigned x, int a,
|
unsigned x, int a,
|
||||||
unsigned y, int b,
|
unsigned y, int b,
|
||||||
|
@ -31,6 +32,7 @@ static void add_ineq(opt::model_based_opt& mbo,
|
||||||
vars.push_back(var(z, rational(c)));
|
vars.push_back(var(z, rational(c)));
|
||||||
mbo.add_constraint(vars, rational(k), rel);
|
mbo.add_constraint(vars, rational(k), rel);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void add_random_ineq(opt::model_based_opt& mbo,
|
static void add_random_ineq(opt::model_based_opt& mbo,
|
||||||
random_gen& r,
|
random_gen& r,
|
||||||
|
@ -295,7 +297,7 @@ static void test8() {
|
||||||
unsigned z = mbo.add_var(rational(4));
|
unsigned z = mbo.add_var(rational(4));
|
||||||
unsigned u = mbo.add_var(rational(5));
|
unsigned u = mbo.add_var(rational(5));
|
||||||
unsigned v = mbo.add_var(rational(6));
|
unsigned v = mbo.add_var(rational(6));
|
||||||
unsigned w = mbo.add_var(rational(6));
|
// unsigned w = mbo.add_var(rational(6));
|
||||||
|
|
||||||
add_ineq(mbo, x0, 1, y, -1, 0, opt::t_le);
|
add_ineq(mbo, x0, 1, y, -1, 0, opt::t_le);
|
||||||
add_ineq(mbo, x, 1, y, -1, 0, opt::t_lt);
|
add_ineq(mbo, x, 1, y, -1, 0, opt::t_lt);
|
||||||
|
|
|
@ -28,7 +28,6 @@ void tst_model_evaluator() {
|
||||||
expr_ref vB2(m.mk_var(2, m.mk_bool_sort()), m);
|
expr_ref vB2(m.mk_var(2, m.mk_bool_sort()), m);
|
||||||
expr* vI0p = vI0.get();
|
expr* vI0p = vI0.get();
|
||||||
expr* vI1p = vI1.get();
|
expr* vI1p = vI1.get();
|
||||||
expr* vB0p = vB0.get();
|
|
||||||
expr* vB1p = vB1.get();
|
expr* vB1p = vB1.get();
|
||||||
expr* vB2p = vB2.get();
|
expr* vB2p = vB2.get();
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,7 @@ void tst_div2k(synch_mpz_manager & m, mpz const & v, unsigned k) {
|
||||||
m.power(two, k, pw);
|
m.power(two, k, pw);
|
||||||
m.machine_div(v, pw, y);
|
m.machine_div(v, pw, y);
|
||||||
bool is_eq = m.eq(x, y);
|
bool is_eq = m.eq(x, y);
|
||||||
|
(void)is_eq;
|
||||||
CTRACE("mpz_2k", !is_eq, tout << "div: " << m.to_string(v) << ", k: " << k << " r: " << m.to_string(x) << ", expected: " << m.to_string(y) << "\n";);
|
CTRACE("mpz_2k", !is_eq, tout << "div: " << m.to_string(v) << ", k: " << k << " r: " << m.to_string(x) << ", expected: " << m.to_string(y) << "\n";);
|
||||||
SASSERT(is_eq);
|
SASSERT(is_eq);
|
||||||
m.del(x);
|
m.del(x);
|
||||||
|
@ -174,6 +175,7 @@ void tst_mul2k(synch_mpz_manager & m, mpz const & v, unsigned k) {
|
||||||
m.power(two, k, pw);
|
m.power(two, k, pw);
|
||||||
m.mul(v, pw, y);
|
m.mul(v, pw, y);
|
||||||
bool is_eq = m.eq(x, y);
|
bool is_eq = m.eq(x, y);
|
||||||
|
(void)is_eq;
|
||||||
CTRACE("mpz_2k", !is_eq, tout << "mul: " << m.to_string(v) << ", k: " << k << " r: " << m.to_string(x) << ", expected: " << m.to_string(y) << "\n";);
|
CTRACE("mpz_2k", !is_eq, tout << "mul: " << m.to_string(v) << ", k: " << k << " r: " << m.to_string(x) << ", expected: " << m.to_string(y) << "\n";);
|
||||||
SASSERT(is_eq);
|
SASSERT(is_eq);
|
||||||
m.del(x);
|
m.del(x);
|
||||||
|
|
|
@ -61,6 +61,7 @@ static void tst1() {
|
||||||
m.recycle(c1);
|
m.recycle(c1);
|
||||||
|
|
||||||
cell * c3 = m.allocate<true>();
|
cell * c3 = m.allocate<true>();
|
||||||
|
(void)c3;
|
||||||
SASSERT(c3->m_coeff.is_zero());
|
SASSERT(c3->m_coeff.is_zero());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ static app_ref generate_ineqs(ast_manager& m, sort* s, vector<expr_ref_vector>&
|
||||||
|
|
||||||
app* x = vars[0].get();
|
app* x = vars[0].get();
|
||||||
app* y = vars[1].get();
|
app* y = vars[1].get();
|
||||||
app* z = vars[2].get();
|
// app* z = vars[2].get();
|
||||||
//
|
//
|
||||||
// ax <= by, ax < by, not (ax >= by), not (ax > by)
|
// ax <= by, ax < by, not (ax >= by), not (ax > by)
|
||||||
//
|
//
|
||||||
|
@ -247,7 +247,7 @@ static void test2(char const *ex) {
|
||||||
ctx.push();
|
ctx.push();
|
||||||
ctx.assert_expr(fml);
|
ctx.assert_expr(fml);
|
||||||
lbool result = ctx.check();
|
lbool result = ctx.check();
|
||||||
SASSERT(result == l_true);
|
VERIFY(result == l_true);
|
||||||
ref<model> md;
|
ref<model> md;
|
||||||
ctx.get_model(md);
|
ctx.get_model(md);
|
||||||
ctx.pop(1);
|
ctx.pop(1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue