mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +00:00
Prefer using empty rather than size comparisons.
This commit is contained in:
parent
a83097d5cc
commit
e570940662
56 changed files with 104 additions and 104 deletions
|
@ -74,7 +74,7 @@ struct bv_bound_chk_rewriter_cfg : public default_rewriter_cfg {
|
|||
bv_bounds bvb(m());
|
||||
const br_status rv = bvb.rewrite(m_bv_ineq_consistency_test_max, f, num, args, result);
|
||||
if (rv != BR_FAILED && (m_m.is_false(result) || m_m.is_true(result))) m_stats.m_unsats++;
|
||||
else if (rv != BR_FAILED && bvb.singletons().size()) m_stats.m_singletons++;
|
||||
else if (rv != BR_FAILED && !bvb.singletons().empty()) m_stats.m_singletons++;
|
||||
else if (rv != BR_FAILED && is_app(result) && to_app(result)->get_num_args() < num) m_stats.m_reduces++;
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -440,7 +440,7 @@ lbool sls_engine::search() {
|
|||
|
||||
// get candidate variables
|
||||
ptr_vector<func_decl> & to_evaluate = m_tracker.get_unsat_constants(m_assertions);
|
||||
if (!to_evaluate.size())
|
||||
if (to_evaluate.empty())
|
||||
{
|
||||
res = l_true;
|
||||
goto bailout;
|
||||
|
|
|
@ -1003,7 +1003,7 @@ public:
|
|||
}
|
||||
|
||||
ptr_vector<func_decl> & get_unsat_constants_walksat(expr * e) {
|
||||
if (!e || m_temp_constants.size())
|
||||
if (!e || !m_temp_constants.empty())
|
||||
return m_temp_constants;
|
||||
ptr_vector<func_decl> const & this_decls = m_constants_occ.find(e);
|
||||
unsigned sz = this_decls.size();
|
||||
|
|
|
@ -191,7 +191,7 @@ lbool check_sat(tactic & t, goal_ref & g, model_ref & md, labels_vec & labels, p
|
|||
return l_false;
|
||||
}
|
||||
else {
|
||||
if (models_enabled && r.size() >= 1) {
|
||||
if (models_enabled && !r.empty()) {
|
||||
model_converter_ref mc = r[0]->mc();
|
||||
model_converter2model(m, mc.get(), md);
|
||||
if (mc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue