3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-09 00:35:47 +00:00

removing warnings for unused variables, #579

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-05-17 15:59:06 -07:00
parent 40f8e16273
commit 09b8c0e7fa
7 changed files with 27 additions and 34 deletions

View file

@ -367,8 +367,7 @@ namespace smt {
unsigned sz = m_delayed_entries.size();
for (unsigned i = 0; i < sz; i++) {
entry & e = m_delayed_entries[i];
fingerprint * f = e.m_qb;
TRACE("qi_queue", tout << f << ", cost: " << e.m_cost << ", instantiated: " << e.m_instantiated << "\n";);
TRACE("qi_queue", tout << e.m_qb << ", cost: " << e.m_cost << ", instantiated: " << e.m_instantiated << "\n";);
if (!e.m_instantiated && e.m_cost <= m_params.m_qi_lazy_threshold && (!init || e.m_cost < min_cost)) {
init = true;
min_cost = e.m_cost;
@ -379,11 +378,10 @@ namespace smt {
for (unsigned i = 0; i < sz; i++) {
entry & e = m_delayed_entries[i];
fingerprint * f = e.m_qb;
quantifier * qa = static_cast<quantifier*>(f->get_data());
TRACE("qi_queue", tout << f << ", cost: " << e.m_cost << ", instantiated: " << e.m_instantiated << "\n";);
if (!e.m_instantiated && e.m_cost <= min_cost) {
TRACE("qi_queue",
tout << "lazy quantifier instantiation...\n" << mk_pp(qa, m_manager) << "\ncost: " << e.m_cost << "\n";);
tout << "lazy quantifier instantiation...\n" << mk_pp(static_cast<quantifier*>(f->get_data()), m_manager) << "\ncost: " << e.m_cost << "\n";);
result = false;
m_instantiated_trail.push_back(i);
m_stats.m_num_lazy_instances++;
@ -397,11 +395,10 @@ namespace smt {
for (unsigned i = 0; i < m_delayed_entries.size(); i++) {
entry & e = m_delayed_entries[i];
fingerprint * f = e.m_qb;
quantifier * qa = static_cast<quantifier*>(f->get_data());
TRACE("qi_queue", tout << f << ", cost: " << e.m_cost << ", instantiated: " << e.m_instantiated << "\n";);
if (!e.m_instantiated && e.m_cost <= m_params.m_qi_lazy_threshold) {
TRACE("qi_queue",
tout << "lazy quantifier instantiation...\n" << mk_pp(qa, m_manager) << "\ncost: " << e.m_cost << "\n";);
tout << "lazy quantifier instantiation...\n" << mk_pp(static_cast<quantifier*>(f->get_data()), m_manager) << "\ncost: " << e.m_cost << "\n";);
result = false;
m_instantiated_trail.push_back(i);
m_stats.m_num_lazy_instances++;

View file

@ -2899,15 +2899,16 @@ namespace smt {
}
bool check_satisfied_residue_invariant() {
qsset::iterator it = m_satisfied.begin();
qsset::iterator end = m_satisfied.end();
for (; it != end; ++it) {
quantifier * q = *it;
SASSERT(!m_residue.contains(q));
quantifier_info * qi = get_qinfo(q);
SASSERT(qi != 0);
SASSERT(qi->get_the_one() != 0);
}
DEBUG_CODE(
qsset::iterator it = m_satisfied.begin();
qsset::iterator end = m_satisfied.end();
for (; it != end; ++it) {
quantifier * q = *it;
SASSERT(!m_residue.contains(q));
quantifier_info * qi = get_qinfo(q);
SASSERT(qi != 0);
SASSERT(qi->get_the_one() != 0);
});
return true;
}
@ -3546,12 +3547,9 @@ namespace smt {
bool asserted_something = false;
quantifier * flat_q = get_flat_quantifier(q);
unsigned num_decls = q->get_num_decls();
unsigned flat_num_decls = flat_q->get_num_decls();
unsigned num_sks = sks.size();
// Remark: sks were created for the flat version of q.
SASSERT(num_sks == flat_num_decls);
SASSERT(flat_num_decls >= num_decls);
SASSERT(num_sks >= num_decls);
SASSERT(flat_q->get_num_decls() == sks.size());
SASSERT(sks.size() >= num_decls);
for (unsigned i = 0; i < num_decls; i++) {
expr * sk = sks.get(num_decls - i - 1);
instantiation_set const * s = get_uvar_inst_set(q, i);

View file

@ -3244,8 +3244,7 @@ void theory_seq::add_at_axiom(expr* e) {
step(s, idx, re, i, j, t) -> nth(s, idx) == t & len(s) > idx
*/
void theory_seq::propagate_step(literal lit, expr* step) {
context& ctx = get_context();
SASSERT(ctx.get_assignment(lit) == l_true);
SASSERT(get_context().get_assignment(lit) == l_true);
expr* re, *acc, *s, *idx, *i, *j;
VERIFY(is_step(step, s, idx, re, i, j, acc));
TRACE("seq", tout << mk_pp(step, m) << " -> " << mk_pp(acc, m) << "\n";);
@ -3265,9 +3264,8 @@ void theory_seq::propagate_step(literal lit, expr* step) {
lit => s = (nth s 0) ++ (nth s 1) ++ ... ++ (nth s idx) ++ (tail s idx)
*/
void theory_seq::ensure_nth(literal lit, expr* s, expr* idx) {
context& ctx = get_context();
rational r;
SASSERT(ctx.get_assignment(lit) == l_true);
SASSERT(get_context().get_assignment(lit) == l_true);
VERIFY(m_autil.is_numeral(idx, r) && r.is_unsigned());
unsigned _idx = r.get_unsigned();
expr_ref head(m), tail(m), conc(m), len1(m), len2(m);