Skip to content

Commit

Permalink
address unused variable warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Aug 29, 2022
1 parent 4d29925 commit 6f2a6da
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
3 changes: 0 additions & 3 deletions src/ast/pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ void pp(std::ostream & out, format * f, ast_manager & m, params_ref const & _p)
bool single_line = p.single_line();

unsigned pos = 0;
unsigned ribbon_pos = 0;
unsigned line = 0;
unsigned len;
unsigned i;
Expand All @@ -92,7 +91,6 @@ void pp(std::ostream & out, format * f, ast_manager & m, params_ref const & _p)
break;
}
pos += len;
ribbon_pos += len;
out << f->get_decl()->get_parameter(0).get_symbol();
break;
case OP_INDENT:
Expand Down Expand Up @@ -121,7 +119,6 @@ void pp(std::ostream & out, format * f, ast_manager & m, params_ref const & _p)
break;
}
pos = indent;
ribbon_pos = 0;
line++;
if (line < max_num_lines) {
out << "\n";
Expand Down
1 change: 1 addition & 0 deletions src/math/lp/emonics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ bool emonics::invariant() const {
}
CTRACE("nla_solver_mons", !found, tout << "not found v" << v << ": " << m << "\n";);
SASSERT(found);
(void)found;
c = c->m_next;
}
while (c != ht.m_head);
Expand Down
8 changes: 3 additions & 5 deletions src/model/model_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,14 +566,13 @@ struct evaluator_cfg : public default_rewriter_cfg {

bool extract_array_func_interp(expr* a, vector<expr_ref_vector>& stores, expr_ref& else_case, bool& are_unique) {
SASSERT(m_ar.is_array(a));
bool are_values = true;
are_unique = true;
TRACE("model_evaluator", tout << mk_pp(a, m) << "\n";);

while (m_ar.is_store(a)) {
expr_ref_vector store(m);
store.append(to_app(a)->get_num_args()-1, to_app(a)->get_args()+1);
are_values &= args_are_values(store, are_unique);
args_are_values(store, are_unique);
stores.push_back(store);
a = to_app(a)->get_arg(0);
}
Expand All @@ -584,9 +583,8 @@ struct evaluator_cfg : public default_rewriter_cfg {
}

if (m_ar_rw.has_index_set(a, else_case, stores)) {
for (auto const& store : stores) {
are_values &= args_are_values(store, are_unique);
}
for (auto const& store : stores)
args_are_values(store, are_unique);
return true;
}
if (!m_ar.is_as_array(a)) {
Expand Down
33 changes: 17 additions & 16 deletions src/nlsat/nlsat_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,22 +286,23 @@ namespace nlsat {
}

bool check_invariant() const {
SASSERT(m_sections.size() == m_sorted_sections.size());
for (unsigned i = 0; i < m_sorted_sections.size(); i++) {
SASSERT(m_sorted_sections[i] < m_sections.size());
SASSERT(m_sections[m_sorted_sections[i]].m_pos == i);
}
unsigned total_num_sections = 0;
unsigned total_num_signs = 0;
for (unsigned i = 0; i < m_info.size(); i++) {
SASSERT(m_info[i].m_first_section <= m_poly_sections.size());
SASSERT(m_info[i].m_num_roots == 0 || m_info[i].m_first_section < m_poly_sections.size());
SASSERT(m_info[i].m_first_sign < m_poly_signs.size());
total_num_sections += m_info[i].m_num_roots;
total_num_signs += m_info[i].m_num_roots + 1;
}
SASSERT(total_num_sections == m_poly_sections.size());
SASSERT(total_num_signs == m_poly_signs.size());
DEBUG_CODE(
SASSERT(m_sections.size() == m_sorted_sections.size());
for (unsigned i = 0; i < m_sorted_sections.size(); i++) {
SASSERT(m_sorted_sections[i] < m_sections.size());
SASSERT(m_sections[m_sorted_sections[i]].m_pos == i);
}
unsigned total_num_sections = 0;
unsigned total_num_signs = 0;
for (unsigned i = 0; i < m_info.size(); i++) {
SASSERT(m_info[i].m_first_section <= m_poly_sections.size());
SASSERT(m_info[i].m_num_roots == 0 || m_info[i].m_first_section < m_poly_sections.size());
SASSERT(m_info[i].m_first_sign < m_poly_signs.size());
total_num_sections += m_info[i].m_num_roots;
total_num_signs += m_info[i].m_num_roots + 1;
}
SASSERT(total_num_sections == m_poly_sections.size());
SASSERT(total_num_signs == m_poly_signs.size()););
return true;
}

Expand Down

0 comments on commit 6f2a6da

Please sign in to comment.