3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-14 04:48:45 +00:00

clean up build warnings

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2023-02-19 10:08:31 -08:00
parent 9b6ac45e02
commit bc6037464d
2 changed files with 11 additions and 10 deletions

View file

@ -22,21 +22,23 @@ Notes:
#include "ast/rewriter/th_rewriter.h"
namespace {
#ifdef Z3DEBUG
bool is_int_matrix(const spacer::spacer_matrix &matrix) {
rational val;
for (unsigned i = 0, rows = matrix.num_rows(); i < rows; i++) {
for (unsigned i = 0, rows = matrix.num_rows(); i < rows; i++)
for (unsigned j = 0, cols = matrix.num_cols(); j < cols; j++)
if (!matrix.get(i, j).is_int()) return false;
}
if (!matrix.get(i, j).is_int())
return false;
return true;
}
bool is_sorted(const vector<rational> &data) {
for (unsigned i = 0; i < data.size() - 1; i++) {
if (!(data[i] >= data[i + 1])) return false;
}
for (unsigned i = 0; i < data.size() - 1; i++)
if (!(data[i] >= data[i + 1]))
return false;
return true;
}
#endif
/// Check whether all elements of \p data are congruent modulo \p m
bool is_congruent_mod(const vector<rational> &data, const rational &m) {

View file

@ -308,10 +308,10 @@ namespace arith {
// cached dts has to be updated when the score of literals are updated.
//
double sls::dscore(var_t v, int64_t new_value) const {
auto const& vi = m_vars[v];
verbose_stream() << "dscore " << v << "\n";
double score = 0;
#if 0
auto const& vi = m_vars[v];
verbose_stream() << "dscore " << v << "\n";
for (auto const& [coeff, lit] : vi.m_literals)
for (auto cl : m_bool_search->get_use_list(lit))
score += (compute_dts(cl) - dts(cl, v, new_value)) * m_bool_search->get_weight(cl);
@ -530,7 +530,6 @@ namespace arith {
if (!ineq)
return -1;
int64_t new_value;
double result = 0;
double max_result = -1;
for (auto const & [coeff, x] : ineq->m_args) {
if (!cm(!sign0, *ineq, x, coeff, new_value))