model_converter * operator()(assertion_set & s, app * d) { if (d && !is_distinct(d)) d = 0; app * r = 0; unsigned sz = s.size(); for (unsigned i = 0; i < sz; i++) { expr * curr = s.form(i); if (curr == d) break; if (is_distinct(curr)) { if (!r || to_app(curr)->get_num_args() > r->get_num_args()) r = to_app(curr); } } if (d != 0) r = d; if (r == 0) return 0; sort * u = m().get_sort(to_app(r)->get_arg(0)); u2i conv(m(), u); { critical_flet<u2i*> l1(m_u2i, &conv); expr_ref new_curr(m()); for (unsigned i = 0; i < sz; i++) { expr * curr = s.form(i); if (curr == r) { unsigned num = r->get_num_args(); for (unsigned j = 0; j < num; j++) { expr * arg = r->get_arg(j); conv(arg, new_curr); expr * eq = m().mk_eq(new_curr, conv.autil().mk_numeral(rational(j), true)); s.assert_expr(eq); } new_curr = m().mk_true(); } else { conv(curr, new_curr); } s.update(i, new_curr); } } // TODO: create model converter return 0; }
/** \brief Return true if this bt_iov_t is contiguous to the other one */ bool bt_iov_t::is_contiguous(const bt_iov_t &other) const throw() { // sanity check - this bt_iov_t MUST be distinct to the other DBG_ASSERT( is_distinct(other) ); // if the file_idx doesnt matches, return false if( subfile_idx() != other.subfile_idx() ) return false; // test the subfile_range return subfile_range().is_contiguous( other.subfile_range() ); }