mirror of
https://github.com/Z3Prover/z3
synced 2025-05-09 00:35:47 +00:00
fix warnings for unused variables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
ec565ae7a0
commit
96e157e201
38 changed files with 180 additions and 184 deletions
|
@ -99,9 +99,10 @@ namespace smt {
|
|||
This method may update m_antecedents, m_todo_js and m_todo_eqs.
|
||||
*/
|
||||
void conflict_resolution::eq_justification2literals(enode * lhs, enode * rhs, eq_justification js) {
|
||||
ast_manager& m = get_manager();
|
||||
SASSERT(m_antecedents);
|
||||
TRACE("conflict_detail", tout << mk_pp(lhs->get_owner(), m) << " = " << mk_pp(rhs->get_owner(), m);
|
||||
TRACE("conflict_detail",
|
||||
ast_manager& m = get_manager();
|
||||
tout << mk_pp(lhs->get_owner(), m) << " = " << mk_pp(rhs->get_owner(), m);
|
||||
switch (js.get_kind()) {
|
||||
case eq_justification::AXIOM: tout << " axiom\n"; break;
|
||||
case eq_justification::EQUATION:
|
||||
|
|
|
@ -2259,6 +2259,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
unsigned ilvl = 0;
|
||||
(void)ilvl;
|
||||
for (unsigned j = 0; j < num; j++) {
|
||||
expr * atom = cls->get_atom(j);
|
||||
bool sign = cls->get_atom_sign(j);
|
||||
|
@ -2855,8 +2856,7 @@ namespace smt {
|
|||
propagate();
|
||||
if (was_consistent && inconsistent()) {
|
||||
// logical context became inconsistent during user PUSH
|
||||
bool res = resolve_conflict(); // build the proof
|
||||
SASSERT(!res);
|
||||
VERIFY(!resolve_conflict()); // build the proof
|
||||
}
|
||||
push_scope();
|
||||
m_base_scopes.push_back(base_scope());
|
||||
|
@ -3110,8 +3110,7 @@ namespace smt {
|
|||
else {
|
||||
TRACE("after_internalization", display(tout););
|
||||
if (inconsistent()) {
|
||||
bool res = resolve_conflict(); // build the proof
|
||||
SASSERT(!res);
|
||||
VERIFY(!resolve_conflict()); // build the proof
|
||||
r = l_false;
|
||||
}
|
||||
else {
|
||||
|
@ -3197,8 +3196,7 @@ namespace smt {
|
|||
init_assumptions(num_assumptions, assumptions);
|
||||
TRACE("after_internalization", display(tout););
|
||||
if (inconsistent()) {
|
||||
bool res = resolve_conflict(); // build the proof
|
||||
SASSERT(!res);
|
||||
VERIFY(!resolve_conflict()); // build the proof
|
||||
mk_unsat_core();
|
||||
r = l_false;
|
||||
}
|
||||
|
|
|
@ -1784,7 +1784,7 @@ namespace smt {
|
|||
template<typename Ext>
|
||||
typename theory_arith<Ext>::max_min_t theory_arith<Ext>::max_min(theory_var v, bool max, bool maintain_integrality, bool& has_shared) {
|
||||
expr* e = get_enode(v)->get_owner();
|
||||
|
||||
(void)e;
|
||||
SASSERT(!maintain_integrality || valid_assignment());
|
||||
SASSERT(satisfy_bounds());
|
||||
SASSERT(!is_quasi_base(v));
|
||||
|
|
|
@ -75,8 +75,7 @@ namespace smt {
|
|||
ast_manager& m = get_manager();
|
||||
context& ctx = get_context();
|
||||
theory_var r = theory_array_base::mk_var(n);
|
||||
theory_var r2 = m_find.mk_var();
|
||||
SASSERT(r == r2);
|
||||
VERIFY(r == m_find.mk_var());
|
||||
SASSERT(r == static_cast<int>(m_var_data.size()));
|
||||
m_var_data.push_back(alloc(var_data));
|
||||
var_data * d = m_var_data[r];
|
||||
|
|
|
@ -457,8 +457,7 @@ namespace smt {
|
|||
|
||||
void theory_bv::fixed_var_eh(theory_var v) {
|
||||
numeral val;
|
||||
bool r = get_fixed_value(v, val);
|
||||
SASSERT(r);
|
||||
VERIFY(get_fixed_value(v, val));
|
||||
unsigned sz = get_bv_size(v);
|
||||
value_sort_pair key(val, sz);
|
||||
theory_var v2;
|
||||
|
@ -554,9 +553,8 @@ namespace smt {
|
|||
|
||||
void theory_bv::internalize_bv2int(app* n) {
|
||||
SASSERT(!get_context().e_internalized(n));
|
||||
ast_manager & m = get_manager();
|
||||
context& ctx = get_context();
|
||||
TRACE("bv", tout << mk_bounded_pp(n, m) << "\n";);
|
||||
TRACE("bv", tout << mk_bounded_pp(n, get_manager()) << "\n";);
|
||||
process_args(n);
|
||||
mk_enode(n);
|
||||
if (!ctx.relevancy()) {
|
||||
|
@ -1142,9 +1140,8 @@ namespace smt {
|
|||
}
|
||||
|
||||
void theory_bv::assign_eh(bool_var v, bool is_true) {
|
||||
context & ctx = get_context();
|
||||
atom * a = get_bv2a(v);
|
||||
TRACE("bv", tout << "assert: v" << v << " #" << ctx.bool_var2expr(v)->get_id() << " is_true: " << is_true << "\n";);
|
||||
TRACE("bv", tout << "assert: v" << v << " #" << get_context().bool_var2expr(v)->get_id() << " is_true: " << is_true << "\n";);
|
||||
if (a->is_bit()) {
|
||||
// The following optimization is not correct.
|
||||
// Boolean variables created for performing bit-blasting are reused.
|
||||
|
|
|
@ -198,8 +198,7 @@ namespace smt {
|
|||
|
||||
theory_var theory_datatype::mk_var(enode * n) {
|
||||
theory_var r = theory::mk_var(n);
|
||||
theory_var r2 = m_find.mk_var();
|
||||
SASSERT(r == r2);
|
||||
VERIFY(r == m_find.mk_var());
|
||||
SASSERT(r == static_cast<int>(m_var_data.size()));
|
||||
m_var_data.push_back(alloc(var_data));
|
||||
var_data * d = m_var_data[r];
|
||||
|
|
|
@ -273,8 +273,7 @@ bool theory_diff_logic<Ext>::internalize_atom(app * n, bool gate_ctx) {
|
|||
template<typename Ext>
|
||||
void theory_diff_logic<Ext>::internalize_eq_eh(app * atom, bool_var v) {
|
||||
context & ctx = get_context();
|
||||
ast_manager& m = get_manager();
|
||||
TRACE("arith", tout << mk_pp(atom, m) << "\n";);
|
||||
TRACE("arith", tout << mk_pp(atom, get_manager()) << "\n";);
|
||||
app * lhs = to_app(atom->get_arg(0));
|
||||
app * rhs = to_app(atom->get_arg(1));
|
||||
app * s;
|
||||
|
@ -606,7 +605,6 @@ void theory_diff_logic<Ext>::new_edge(dl_var src, dl_var dst, unsigned num_edges
|
|||
atom* a = 0;
|
||||
m_bool_var2atom.find(bv, a);
|
||||
SASSERT(a);
|
||||
edge_id e_id = a->get_pos();
|
||||
|
||||
literal_vector lits;
|
||||
for (unsigned i = 0; i < num_edges; ++i) {
|
||||
|
@ -616,7 +614,7 @@ void theory_diff_logic<Ext>::new_edge(dl_var src, dl_var dst, unsigned num_edges
|
|||
|
||||
TRACE("dl_activity",
|
||||
tout << mk_pp(le, get_manager()) << "\n";
|
||||
tout << "edge: " << e_id << "\n";
|
||||
tout << "edge: " << a->get_pos() << "\n";
|
||||
ctx.display_literals_verbose(tout, lits.size(), lits.c_ptr());
|
||||
tout << "\n";
|
||||
);
|
||||
|
@ -927,18 +925,19 @@ void theory_diff_logic<Ext>::display(std::ostream & out) const {
|
|||
|
||||
template<typename Ext>
|
||||
bool theory_diff_logic<Ext>::is_consistent() const {
|
||||
context& ctx = get_context();
|
||||
for (unsigned i = 0; i < m_atoms.size(); ++i) {
|
||||
atom* a = m_atoms[i];
|
||||
bool_var bv = a->get_bool_var();
|
||||
lbool asgn = ctx.get_assignment(bv);
|
||||
if (ctx.is_relevant(ctx.bool_var2expr(bv)) && asgn != l_undef) {
|
||||
SASSERT((asgn == l_true) == a->is_true());
|
||||
int edge_id = a->get_asserted_edge();
|
||||
SASSERT(m_graph.is_enabled(edge_id));
|
||||
SASSERT(m_graph.is_feasible(edge_id));
|
||||
}
|
||||
}
|
||||
DEBUG_CODE(
|
||||
context& ctx = get_context();
|
||||
for (unsigned i = 0; i < m_atoms.size(); ++i) {
|
||||
atom* a = m_atoms[i];
|
||||
bool_var bv = a->get_bool_var();
|
||||
lbool asgn = ctx.get_assignment(bv);
|
||||
if (ctx.is_relevant(ctx.bool_var2expr(bv)) && asgn != l_undef) {
|
||||
SASSERT((asgn == l_true) == a->is_true());
|
||||
int edge_id = a->get_asserted_edge();
|
||||
SASSERT(m_graph.is_enabled(edge_id));
|
||||
SASSERT(m_graph.is_feasible(edge_id));
|
||||
}
|
||||
});
|
||||
return m_graph.is_feasible();
|
||||
}
|
||||
|
||||
|
@ -1194,9 +1193,9 @@ theory_diff_logic<Ext>::maximize(theory_var v, expr_ref& blocker, bool& has_shar
|
|||
ast_manager& m = get_manager();
|
||||
|
||||
update_simplex(S);
|
||||
objective_term const& objective = m_objectives[v];
|
||||
|
||||
TRACE("arith",
|
||||
objective_term const& objective = m_objectives[v];
|
||||
for (unsigned i = 0; i < objective.size(); ++i) {
|
||||
tout << "Coefficient " << objective[i].second
|
||||
<< " of theory_var " << objective[i].first << "\n";
|
||||
|
|
|
@ -52,9 +52,8 @@ namespace smt {
|
|||
expr_ref bv(m);
|
||||
bv = m_th.wrap(m.mk_const(f));
|
||||
unsigned bv_sz = m_th.m_bv_util.get_bv_size(bv);
|
||||
unsigned ebits = m_th.m_fpa_util.get_ebits(s);
|
||||
unsigned sbits = m_th.m_fpa_util.get_sbits(s);
|
||||
SASSERT(bv_sz == ebits + sbits);
|
||||
SASSERT(bv_sz == m_th.m_fpa_util.get_ebits(s) + sbits);
|
||||
m_th.m_converter.mk_fp(m_bv_util.mk_extract(bv_sz - 1, bv_sz - 1, bv),
|
||||
m_bv_util.mk_extract(bv_sz - 2, sbits - 1, bv),
|
||||
m_bv_util.mk_extract(sbits - 2, 0, bv),
|
||||
|
@ -231,10 +230,11 @@ namespace smt {
|
|||
}
|
||||
|
||||
app * theory_fpa::fpa_value_proc::mk_value(model_generator & mg, ptr_vector<expr> & values) {
|
||||
ast_manager & m = m_th.get_manager();
|
||||
|
||||
TRACE("t_fpa_detail", for (unsigned i = 0; i < values.size(); i++)
|
||||
tout << "value[" << i << "] = " << mk_ismt2_pp(values[i], m) << std::endl;);
|
||||
TRACE("t_fpa_detail",
|
||||
ast_manager & m = m_th.get_manager();
|
||||
for (unsigned i = 0; i < values.size(); i++)
|
||||
tout << "value[" << i << "] = " << mk_ismt2_pp(values[i], m) << std::endl;);
|
||||
|
||||
mpf_manager & mpfm = m_fu.fm();
|
||||
unsynch_mpz_manager & mpzm = mpfm.mpz_manager();
|
||||
|
@ -254,8 +254,7 @@ namespace smt {
|
|||
rational all_r(0);
|
||||
scoped_mpz all_z(mpzm);
|
||||
|
||||
bool r = m_bu.is_numeral(values[0], all_r, bv_sz);
|
||||
SASSERT(r);
|
||||
VERIFY(m_bu.is_numeral(values[0], all_r, bv_sz));
|
||||
SASSERT(bv_sz == (m_ebits + m_sbits));
|
||||
SASSERT(all_r.is_int());
|
||||
mpzm.set(all_z, all_r.to_mpq().numerator());
|
||||
|
@ -316,8 +315,7 @@ namespace smt {
|
|||
unsigned bv_sz;
|
||||
|
||||
rational val(0);
|
||||
bool r = m_bu.is_numeral(values[0], val, bv_sz);
|
||||
SASSERT(r);
|
||||
VERIFY(m_bu.is_numeral(values[0], val, bv_sz));
|
||||
SASSERT(bv_sz == 3);
|
||||
|
||||
switch (val.get_uint64())
|
||||
|
@ -422,9 +420,8 @@ namespace smt {
|
|||
expr_ref bv(m);
|
||||
bv = wrap(e_conv);
|
||||
unsigned bv_sz = m_bv_util.get_bv_size(bv);
|
||||
unsigned ebits = m_fpa_util.get_ebits(m.get_sort(e_conv));
|
||||
unsigned sbits = m_fpa_util.get_sbits(m.get_sort(e_conv));
|
||||
SASSERT(bv_sz == ebits + sbits);
|
||||
SASSERT(bv_sz == m_fpa_util.get_ebits(m.get_sort(e_conv)) + sbits);
|
||||
m_converter.mk_fp(m_bv_util.mk_extract(bv_sz - 1, bv_sz - 1, bv),
|
||||
m_bv_util.mk_extract(bv_sz - 2, sbits - 1, bv),
|
||||
m_bv_util.mk_extract(sbits - 2, 0, bv),
|
||||
|
|
|
@ -260,7 +260,6 @@ void theory_wmaxsat::block() {
|
|||
return;
|
||||
}
|
||||
++m_stats.m_num_blocks;
|
||||
ast_manager& m = get_manager();
|
||||
context& ctx = get_context();
|
||||
literal_vector lits;
|
||||
compare_cost compare_cost(*this);
|
||||
|
@ -274,6 +273,7 @@ void theory_wmaxsat::block() {
|
|||
lits.push_back(~literal(m_var2bool[costs[i]]));
|
||||
}
|
||||
TRACE("opt",
|
||||
ast_manager& m = get_manager();
|
||||
tout << "block: ";
|
||||
for (unsigned i = 0; i < lits.size(); ++i) {
|
||||
expr_ref tmp(m);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue