mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
Use nullptr.
This commit is contained in:
parent
f01328c65f
commit
76eb7b9ede
625 changed files with 4639 additions and 4639 deletions
|
@ -32,7 +32,7 @@ namespace nlarith {
|
|||
svector<comp> m_comps;
|
||||
|
||||
public:
|
||||
literal_set(ast_manager& m) : m_inf(m), m_sup(m), m_x(0), m_lits(m) {}
|
||||
literal_set(ast_manager& m) : m_inf(m), m_sup(m), m_x(nullptr), m_lits(m) {}
|
||||
unsigned size() const { return m_lits.size(); }
|
||||
|
||||
app_ref_vector& lits() { return m_lits; }
|
||||
|
@ -123,7 +123,7 @@ namespace nlarith {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!get_polys(contains_x, num_lits, lits, polys, comps, &branch_conds, 0)) {
|
||||
if (!get_polys(contains_x, num_lits, lits, polys, comps, &branch_conds, nullptr)) {
|
||||
TRACE("nlarith",
|
||||
tout << "could not extract polynomials " << mk_pp(x, m()) << "\n";
|
||||
for (unsigned i = 0; i < num_lits; ++i) {
|
||||
|
@ -1514,9 +1514,9 @@ namespace nlarith {
|
|||
new_atoms.reset();
|
||||
app_ref tmp(m());
|
||||
expr_ref_vector conjs(m());
|
||||
mk_exists_zero(literals, true, 0, conjs, new_atoms);
|
||||
mk_exists_zero(literals, true, nullptr, conjs, new_atoms);
|
||||
mk_same_sign (literals, true, conjs, new_atoms);
|
||||
mk_exists_zero(literals, false, 0, conjs, new_atoms);
|
||||
mk_exists_zero(literals, false, nullptr, conjs, new_atoms);
|
||||
mk_same_sign (literals, false, conjs, new_atoms);
|
||||
mk_lt(literals.x(), literals.x_inf(), conjs, new_atoms);
|
||||
mk_lt(literals.x_sup(), literals.x(), conjs, new_atoms);
|
||||
|
@ -1922,7 +1922,7 @@ namespace nlarith {
|
|||
}
|
||||
extract_non_linear(atms.size(), atms.begin(), nlvars);
|
||||
if (nlvars.empty()) {
|
||||
lits = 0;
|
||||
lits = nullptr;
|
||||
return true;
|
||||
}
|
||||
app* x = nlvars.back();
|
||||
|
@ -1930,11 +1930,11 @@ namespace nlarith {
|
|||
expr* const* _atoms = (expr*const*)atms.begin();
|
||||
lits = alloc(util::literal_set, m());
|
||||
lits->set_x(x);
|
||||
if (get_polys(contains_x, atms.size(), _atoms, lits->polys(), lits->comps(), 0, &lits->lits())) {
|
||||
if (get_polys(contains_x, atms.size(), _atoms, lits->polys(), lits->comps(), nullptr, &lits->lits())) {
|
||||
return true;
|
||||
}
|
||||
dealloc(lits);
|
||||
lits = 0;
|
||||
lits = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -766,7 +766,7 @@ namespace qe {
|
|||
for (; it != end; ++it) {
|
||||
expr * a = it->m_key;
|
||||
nlsat::bool_var b = it->m_value;
|
||||
if (a == 0 || !is_uninterp_const(a) || b == m_is_true.var() || !m_free_vars.contains(a) || m_aux_vars.contains(a))
|
||||
if (a == nullptr || !is_uninterp_const(a) || b == m_is_true.var() || !m_free_vars.contains(a) || m_aux_vars.contains(a))
|
||||
continue;
|
||||
lbool val = m_bmodel0.get(b, l_undef);
|
||||
if (val == l_undef)
|
||||
|
@ -783,7 +783,7 @@ namespace qe {
|
|||
m_mode(mode),
|
||||
m_params(p),
|
||||
m_solver(m.limit(), p, true),
|
||||
m_nftactic(0),
|
||||
m_nftactic(nullptr),
|
||||
m_rmodel(m_solver.am()),
|
||||
m_rmodel0(m_solver.am()),
|
||||
m_valid_model(false),
|
||||
|
@ -821,7 +821,7 @@ namespace qe {
|
|||
|
||||
ptr_vector<expr> fmls;
|
||||
expr_ref fml(m);
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
in->get_formulas(fmls);
|
||||
fml = mk_and(m, fmls.size(), fmls.c_ptr());
|
||||
if (m_mode == elim_t) {
|
||||
|
|
|
@ -361,7 +361,7 @@ namespace qe {
|
|||
}
|
||||
app* ite;
|
||||
if (find_ite(fml, ite)) {
|
||||
expr* cond = 0, *th = 0, *el = 0;
|
||||
expr* cond = nullptr, *th = nullptr, *el = nullptr;
|
||||
VERIFY(m.is_ite(ite, cond, th, el));
|
||||
expr_ref tmp1(fml, m), tmp2(fml, m);
|
||||
m_replace->apply_substitution(ite, th, tmp1);
|
||||
|
@ -448,7 +448,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
expr* lookup(expr* e, bool p) {
|
||||
expr* r = 0;
|
||||
expr* r = nullptr;
|
||||
if (p && m_pos.find(e, r)) {
|
||||
return r;
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ namespace qe {
|
|||
}
|
||||
m_todo.push_back(e);
|
||||
m_pols.push_back(p);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void insert(expr* e, bool p, expr* r) {
|
||||
|
@ -687,7 +687,7 @@ namespace qe {
|
|||
|
||||
bool visit(app* e) {
|
||||
bool all_visit = true;
|
||||
expr* f = 0;
|
||||
expr* f = nullptr;
|
||||
expr_ref tmp(m);
|
||||
if (!m_is_relevant(e)) {
|
||||
m_cache.insert(e, e);
|
||||
|
@ -970,7 +970,7 @@ namespace qe {
|
|||
|
||||
app* var() const { SASSERT(has_var()); return m_var; }
|
||||
|
||||
bool has_var() const { return 0 != m_var.get(); }
|
||||
bool has_var() const { return nullptr != m_var.get(); }
|
||||
|
||||
search_tree* parent() const { return m_parent; }
|
||||
|
||||
|
@ -1025,7 +1025,7 @@ namespace qe {
|
|||
m_children.reset();
|
||||
m_vars.reset();
|
||||
m_branch_index.reset();
|
||||
m_var = 0;
|
||||
m_var = nullptr;
|
||||
m_def.reset();
|
||||
m_num_branches = rational::zero();
|
||||
m_pure = true;
|
||||
|
@ -1371,11 +1371,11 @@ namespace qe {
|
|||
m_trail(m),
|
||||
m_fml(m),
|
||||
m_subfml(m),
|
||||
m_root(0, m, m.mk_true()),
|
||||
m_current(0),
|
||||
m_root(nullptr, m, m.mk_true()),
|
||||
m_current(nullptr),
|
||||
m_new_vars(m),
|
||||
m_get_first(false),
|
||||
m_defs(0),
|
||||
m_defs(nullptr),
|
||||
m_nnf(m, get_is_relevant(), get_mk_atom())
|
||||
{
|
||||
params_ref params;
|
||||
|
@ -1398,8 +1398,8 @@ namespace qe {
|
|||
m_var2branch.reset();
|
||||
m_root.reset();
|
||||
m_new_vars.reset();
|
||||
m_fml = 0;
|
||||
m_defs = 0;
|
||||
m_fml = nullptr;
|
||||
m_defs = nullptr;
|
||||
m_nnf.reset();
|
||||
}
|
||||
|
||||
|
@ -1501,7 +1501,7 @@ namespace qe {
|
|||
}
|
||||
reset();
|
||||
m_solver.pop(1);
|
||||
f = 0;
|
||||
f = nullptr;
|
||||
}
|
||||
|
||||
void collect_statistics(statistics& st) {
|
||||
|
@ -1571,7 +1571,7 @@ namespace qe {
|
|||
}
|
||||
contains_app* ca = alloc(contains_app, m, x);
|
||||
m_var2contains.insert(x, ca);
|
||||
app* bv = 0;
|
||||
app* bv = nullptr;
|
||||
if (m.is_bool(x) || m_bv.is_bv(x)) {
|
||||
bv = x;
|
||||
}
|
||||
|
@ -1583,7 +1583,7 @@ namespace qe {
|
|||
m_var2branch.insert(x, bv);
|
||||
}
|
||||
|
||||
void add_constraint(bool use_current_val, expr* l1 = 0, expr* l2 = 0, expr* l3 = 0) override {
|
||||
void add_constraint(bool use_current_val, expr* l1 = nullptr, expr* l2 = nullptr, expr* l3 = nullptr) override {
|
||||
search_tree* node = m_current;
|
||||
if (!use_current_val) {
|
||||
node = m_current->parent();
|
||||
|
@ -1603,7 +1603,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
void blast_or(app* var, expr_ref& fml) override {
|
||||
m_qe.eliminate_exists(1, &var, fml, m_free_vars, false, 0);
|
||||
m_qe.eliminate_exists(1, &var, fml, m_free_vars, false, nullptr);
|
||||
}
|
||||
|
||||
lbool eliminate_exists(unsigned num_vars, app* const* vars, expr_ref& fml, bool get_first, guarded_defs* defs) {
|
||||
|
@ -1613,7 +1613,7 @@ namespace qe {
|
|||
private:
|
||||
|
||||
void add_literal(expr* l) {
|
||||
if (l != 0) {
|
||||
if (l != nullptr) {
|
||||
m_literals.push_back(l);
|
||||
}
|
||||
}
|
||||
|
@ -1705,11 +1705,11 @@ namespace qe {
|
|||
return NEED_PROPAGATION;
|
||||
}
|
||||
m_current = m_current->child(branch);
|
||||
if (m_current->fml() == 0) {
|
||||
if (m_current->fml() == nullptr) {
|
||||
SASSERT(!m_current->has_var());
|
||||
if (apply) {
|
||||
expr_ref def(m);
|
||||
plugin(x).subst(contains(x), branch, fml, m_defs?&def:0);
|
||||
plugin(x).subst(contains(x), branch, fml, m_defs?&def:nullptr);
|
||||
SASSERT(!contains(x)(fml));
|
||||
m_current->consume_vars(m_new_vars);
|
||||
m_current->init(fml);
|
||||
|
@ -2197,7 +2197,7 @@ namespace qe {
|
|||
void eliminate_exists_bind(unsigned num_vars, app* const* vars, expr_ref& fml) {
|
||||
checkpoint();
|
||||
app_ref_vector free_vars(m);
|
||||
eliminate_exists(num_vars, vars, fml, free_vars, false, 0);
|
||||
eliminate_exists(num_vars, vars, fml, free_vars, false, nullptr);
|
||||
bind_variables(free_vars.size(), free_vars.c_ptr(), fml);
|
||||
}
|
||||
|
||||
|
@ -2219,7 +2219,7 @@ namespace qe {
|
|||
m_fparams(fp),
|
||||
m_params(p),
|
||||
m_trail(m),
|
||||
m_qe(0),
|
||||
m_qe(nullptr),
|
||||
m_assumption(m.mk_true())
|
||||
{
|
||||
}
|
||||
|
@ -2302,7 +2302,7 @@ namespace qe {
|
|||
|
||||
m_trail.push_back(result);
|
||||
todo.push_back(result);
|
||||
expr* e = 0, *r = 0;
|
||||
expr* e = nullptr, *r = nullptr;
|
||||
|
||||
while (!todo.empty()) {
|
||||
e = todo.back();
|
||||
|
@ -2472,8 +2472,8 @@ namespace qe {
|
|||
public:
|
||||
simplify_solver_context(ast_manager& m):
|
||||
m(m),
|
||||
m_vars(0),
|
||||
m_fml(0)
|
||||
m_vars(nullptr),
|
||||
m_fml(nullptr)
|
||||
{
|
||||
add_plugin(mk_bool_plugin(*this));
|
||||
add_plugin(mk_arith_plugin(*this, false, m_fparams));
|
||||
|
@ -2543,7 +2543,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
// callback to add constraints in branch.
|
||||
void add_constraint(bool use_var, expr* l1 = 0, expr* l2 = 0, expr* l3 = 0) override {
|
||||
void add_constraint(bool use_var, expr* l1 = nullptr, expr* l2 = nullptr, expr* l3 = nullptr) override {
|
||||
UNREACHABLE();
|
||||
}
|
||||
// eliminate finite domain variable 'var' from fml.
|
||||
|
@ -2605,7 +2605,7 @@ namespace qe {
|
|||
}
|
||||
m_ctx.solve(result, vars);
|
||||
if (old_q->is_forall()) {
|
||||
expr* e = 0;
|
||||
expr* e = nullptr;
|
||||
result = m.is_not(result, e)?e:mk_not(m, result);
|
||||
}
|
||||
var_shifter shift(m);
|
||||
|
@ -2621,7 +2621,7 @@ namespace qe {
|
|||
if (!vars.empty()) {
|
||||
result = m.mk_quantifier(old_q->is_forall(), vars.size(), sorts.c_ptr(), names.c_ptr(), result, 1);
|
||||
}
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace qe {
|
|||
virtual void add_var(app* x) = 0;
|
||||
|
||||
// callback to add constraints in branch.
|
||||
virtual void add_constraint(bool use_var, expr* l1 = 0, expr* l2 = 0, expr* l3 = 0) = 0;
|
||||
virtual void add_constraint(bool use_var, expr* l1 = nullptr, expr* l2 = nullptr, expr* l3 = nullptr) = 0;
|
||||
|
||||
// eliminate finite domain variable 'var' from fml.
|
||||
virtual void blast_or(app* var, expr_ref& fml) = 0;
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace qe {
|
|||
map<rational, expr*, rational::hash_proc, rational::eq_proc> values;
|
||||
bool found_eq = false;
|
||||
for (unsigned i = 0; !found_eq && i < to_app(lit)->get_num_args(); ++i) {
|
||||
expr* arg1 = to_app(lit)->get_arg(i), *arg2 = 0;
|
||||
expr* arg1 = to_app(lit)->get_arg(i), *arg2 = nullptr;
|
||||
rational r;
|
||||
expr_ref val = eval(arg1);
|
||||
if (!a.is_numeral(val, r)) return false;
|
||||
|
|
|
@ -891,7 +891,7 @@ namespace qe {
|
|||
|
||||
while (m_arith.is_add(p)) {
|
||||
bool found_x = false;
|
||||
expr* next_p = 0;
|
||||
expr* next_p = nullptr;
|
||||
for (unsigned i = 0; i < to_app(p)->get_num_args(); ++i) {
|
||||
expr* arg = to_app(p)->get_arg(i);
|
||||
if (contains_x(arg)) {
|
||||
|
@ -1287,7 +1287,7 @@ namespace qe {
|
|||
m_div_coeffs.reset();
|
||||
m_div_divisors.reset();
|
||||
m_div_atoms.reset();
|
||||
m_div_z = 0;
|
||||
m_div_z = nullptr;
|
||||
m_nested_div_terms.reset();
|
||||
m_nested_div_coeffs.reset();
|
||||
m_nested_div_divisors.reset();
|
||||
|
@ -1485,7 +1485,7 @@ public:
|
|||
expr* m_term;
|
||||
ptr_vector<app> m_vars;
|
||||
|
||||
branch_formula(): m_fml(0), m_var(0), m_branch(0), m_result(0), m_term(0) {}
|
||||
branch_formula(): m_fml(nullptr), m_var(nullptr), m_branch(0), m_result(nullptr), m_term(nullptr) {}
|
||||
|
||||
branch_formula(expr* fml, app* var, unsigned b, expr* r, rational coeff, expr* term, app_ref_vector const& vars):
|
||||
m_fml(fml),
|
||||
|
@ -1750,7 +1750,7 @@ public:
|
|||
x_subst x_t(m_util);
|
||||
bounds_proc& bounds = get_bounds(x, fml);
|
||||
branch_formula bf;
|
||||
VERIFY (m_subst.find(branch_formula(fml, x, v, 0, rational::zero(), 0, m_util.m_vars_added), bf));
|
||||
VERIFY (m_subst.find(branch_formula(fml, x, v, nullptr, rational::zero(), nullptr, m_util.m_vars_added), bf));
|
||||
x_t.set_term(bf.m_term);
|
||||
x_t.set_coeff(bf.m_coeff);
|
||||
|
||||
|
@ -1949,7 +1949,7 @@ public:
|
|||
}
|
||||
}
|
||||
assign(x, fml, vl);
|
||||
subst(x, vl, fml, 0);
|
||||
subst(x, vl, fml, nullptr);
|
||||
TRACE("qe", tout << mk_pp(fml, m) << "\n";);
|
||||
return true;
|
||||
}
|
||||
|
@ -1972,7 +1972,7 @@ public:
|
|||
vl = numeral(0);
|
||||
}
|
||||
assign(x, fml, vl);
|
||||
subst(x, vl, fml, 0);
|
||||
subst(x, vl, fml, nullptr);
|
||||
TRACE("qe", tout << mk_pp(fml, m) << "\n";);
|
||||
|
||||
return true;
|
||||
|
@ -2037,7 +2037,7 @@ public:
|
|||
|
||||
bool get_cache(app* x, expr* fml, unsigned v, expr_ref& result) {
|
||||
branch_formula bf;
|
||||
if (!m_subst.find(branch_formula(fml, x, v, 0, rational::zero(), 0, m_util.m_vars_added), bf)) {
|
||||
if (!m_subst.find(branch_formula(fml, x, v, nullptr, rational::zero(), nullptr, m_util.m_vars_added), bf)) {
|
||||
return false;
|
||||
}
|
||||
SASSERT(bf.m_result);
|
||||
|
@ -2171,7 +2171,7 @@ public:
|
|||
}
|
||||
|
||||
bounds_proc& get_bounds(app* x, expr* fml) {
|
||||
bounds_proc* result = 0;
|
||||
bounds_proc* result = nullptr;
|
||||
VERIFY (m_bounds_cache.find(x, fml, result));
|
||||
return *result;
|
||||
}
|
||||
|
@ -2407,7 +2407,7 @@ public:
|
|||
}
|
||||
|
||||
bool update_bounds(contains_app& contains_x, expr* fml) {
|
||||
bounds_proc* bounds = 0;
|
||||
bounds_proc* bounds = nullptr;
|
||||
if (m_bounds_cache.find(contains_x.x(), fml, bounds)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -2479,7 +2479,7 @@ public:
|
|||
}
|
||||
|
||||
void assign(contains_app& x, expr* fml, rational const& vl) override {
|
||||
nlarith::branch_conditions *brs = 0;
|
||||
nlarith::branch_conditions *brs = nullptr;
|
||||
VERIFY (m_cache.find(x.x(), fml, brs));
|
||||
SASSERT(vl.is_unsigned());
|
||||
SASSERT(vl.get_unsigned() < brs->size());
|
||||
|
@ -2516,7 +2516,7 @@ public:
|
|||
}
|
||||
|
||||
void subst(contains_app& x, rational const& vl, expr_ref& fml, expr_ref* def) override {
|
||||
nlarith::branch_conditions *brs = 0;
|
||||
nlarith::branch_conditions *brs = nullptr;
|
||||
VERIFY (m_cache.find(x.x(), fml, brs));
|
||||
SASSERT(vl.is_unsigned());
|
||||
SASSERT(vl.get_unsigned() < brs->size());
|
||||
|
@ -2535,7 +2535,7 @@ public:
|
|||
|
||||
|
||||
unsigned get_weight(contains_app& x, expr* fml) override {
|
||||
obj_map<app, unsigned>* weights = 0;
|
||||
obj_map<app, unsigned>* weights = nullptr;
|
||||
unsigned weight = 0;
|
||||
if (!m_weights.find(fml, weights)) {
|
||||
weights = alloc(weight_m);
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace qe {
|
|||
imp* m_imp;
|
||||
|
||||
rw_cfg(ast_manager& m, array_util& a):
|
||||
m(m), a(a), m_lits(m), m_model(0) {}
|
||||
m(m), a(a), m_lits(m), m_model(nullptr) {}
|
||||
|
||||
br_status reduce_app(func_decl* f, unsigned n, expr* const* args, expr_ref& result, proof_ref & pr) {
|
||||
if (a.is_select(f) && a.is_store(args[0])) {
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace qe {
|
|||
CTRACE("qe", (!m.is_true(val_x) && !m.is_false(val_x)),
|
||||
tout << "Boolean is a don't care: " << mk_pp(x.x(), m) << "\n";);
|
||||
val = m.is_true(val_x)?rational::one():rational::zero();
|
||||
subst(x, val, fml, 0);
|
||||
subst(x, val, fml, nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace qe {
|
|||
unsigned bv_size;
|
||||
model_eval(x.x(), val_x);
|
||||
m_bv.is_numeral(val_x, val, bv_size);
|
||||
subst(x, val, fml, 0);
|
||||
subst(x, val, fml, nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,11 +31,11 @@ public:
|
|||
|
||||
void prepare(cmd_context & ctx) override {
|
||||
parametric_cmd::prepare(ctx);
|
||||
m_target = 0;
|
||||
m_target = nullptr;
|
||||
}
|
||||
|
||||
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
|
||||
if (m_target == 0) return CPK_EXPR;
|
||||
if (m_target == nullptr) return CPK_EXPR;
|
||||
return parametric_cmd::next_arg_kind(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ namespace qe {
|
|||
conj.push_back(m.mk_eq(l_i, r_i));
|
||||
}
|
||||
expr* e = m.mk_and(conj.size(), conj.c_ptr());
|
||||
m_map.insert(a, e, 0);
|
||||
m_map.insert(a, e, nullptr);
|
||||
TRACE("qe", tout << "replace: " << mk_pp(a, m) << " ==> \n" << mk_pp(e, m) << "\n";);
|
||||
return true;
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ namespace qe {
|
|||
// replace x by C(y1,..,yn) where y1,..,yn are fresh variables.
|
||||
//
|
||||
void subst_constructor(contains_app& x, func_decl* c, expr_ref& fml, expr_ref* def) {
|
||||
subst_clos* sub = 0;
|
||||
subst_clos* sub = nullptr;
|
||||
|
||||
if (m_subst_cache.find(x.x(), c, sub)) {
|
||||
m_replace.apply_substitution(x.x(), sub->first, fml);
|
||||
|
@ -588,7 +588,7 @@ namespace qe {
|
|||
|
||||
unsigned sz = m_datatype_util.get_datatype_num_constructors(s);
|
||||
num_branches = rational(sz);
|
||||
func_decl* c = 0, *r = 0;
|
||||
func_decl* c = nullptr, *r = nullptr;
|
||||
|
||||
//
|
||||
// If 'x' does not yet have a recognizer, then branch according to recognizers.
|
||||
|
@ -620,7 +620,7 @@ namespace qe {
|
|||
void assign_rec(contains_app& contains_x, expr* fml, rational const& vl) {
|
||||
app* x = contains_x.x();
|
||||
sort* s = x->get_decl()->get_range();
|
||||
func_decl* c = 0, *r = 0;
|
||||
func_decl* c = nullptr, *r = nullptr;
|
||||
|
||||
//
|
||||
// If 'x' does not yet have a recognizer, then branch according to recognizers.
|
||||
|
@ -665,7 +665,7 @@ namespace qe {
|
|||
app* x = contains_x.x();
|
||||
sort* s = x->get_decl()->get_range();
|
||||
SASSERT(m_datatype_util.is_datatype(s));
|
||||
func_decl* c = 0, *r = 0;
|
||||
func_decl* c = nullptr, *r = nullptr;
|
||||
|
||||
TRACE("qe", tout << mk_pp(x, m) << " " << vl << " " << mk_pp(fml, m) << " " << (def != 0) << "\n";);
|
||||
//
|
||||
|
@ -748,7 +748,7 @@ namespace qe {
|
|||
sort* s = x.x()->get_decl()->get_range();
|
||||
unsigned sz = m_datatype_util.get_datatype_num_constructors(s);
|
||||
num_branches = rational(sz);
|
||||
func_decl* c = 0, *r = 0;
|
||||
func_decl* c = nullptr, *r = nullptr;
|
||||
|
||||
if (sz != 1 && has_recognizer(x.x(), fml, r, c)) {
|
||||
TRACE("qe", tout << mk_pp(x.x(), m) << " has a recognizer\n";);
|
||||
|
@ -768,7 +768,7 @@ namespace qe {
|
|||
if (sz == 1) {
|
||||
return;
|
||||
}
|
||||
func_decl* c = 0, *r = 0;
|
||||
func_decl* c = nullptr, *r = nullptr;
|
||||
if (has_recognizer(x, fml, r, c)) {
|
||||
TRACE("qe", tout << mk_pp(x, m) << " has a recognizer\n";);
|
||||
return;
|
||||
|
@ -787,7 +787,7 @@ namespace qe {
|
|||
sort* s = x.x()->get_decl()->get_range();
|
||||
SASSERT(m_datatype_util.is_datatype(s));
|
||||
SASSERT(!m_datatype_util.is_recursive(s));
|
||||
func_decl* c = 0, *r = 0;
|
||||
func_decl* c = nullptr, *r = nullptr;
|
||||
if (has_recognizer(x.x(), fml, r, c)) {
|
||||
TRACE("qe", tout << mk_pp(x.x(), m) << " has a recognizer\n";);
|
||||
}
|
||||
|
@ -824,13 +824,13 @@ namespace qe {
|
|||
}
|
||||
|
||||
datatype_atoms& get_eqs(app* x, expr* fml) {
|
||||
datatype_atoms* eqs = 0;
|
||||
datatype_atoms* eqs = nullptr;
|
||||
VERIFY (m_eqs_cache.find(x, fml, eqs));
|
||||
return *eqs;
|
||||
}
|
||||
|
||||
bool update_eqs(contains_app& contains_x, expr* fml) {
|
||||
datatype_atoms* eqs = 0;
|
||||
datatype_atoms* eqs = nullptr;
|
||||
if (m_eqs_cache.find(contains_x.x(), fml, eqs)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace qe {
|
|||
subst_large_domain(x, eqs, uv, fml);
|
||||
}
|
||||
if (def) {
|
||||
*def = 0; // TBD
|
||||
*def = nullptr; // TBD
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,13 +169,13 @@ namespace qe {
|
|||
|
||||
|
||||
eq_atoms& get_eqs(app* x, expr* fml) {
|
||||
eq_atoms* eqs = 0;
|
||||
eq_atoms* eqs = nullptr;
|
||||
VERIFY(m_eqs_cache.find(x, fml, eqs));
|
||||
return *eqs;
|
||||
}
|
||||
|
||||
bool update_eqs(contains_app& contains_x, expr* fml) {
|
||||
eq_atoms* eqs = 0;
|
||||
eq_atoms* eqs = nullptr;
|
||||
if (m_eqs_cache.find(contains_x.x(), fml, eqs)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace eq {
|
|||
for (unsigned i = 0; i < definitions.size(); i++) {
|
||||
var * v = vars[i];
|
||||
expr * t = definitions[i];
|
||||
if (t == 0 || has_quantifiers(t) || occurs_var(v->get_idx(), t))
|
||||
if (t == nullptr || has_quantifiers(t) || occurs_var(v->get_idx(), t))
|
||||
definitions[i] = 0;
|
||||
else
|
||||
found = true; // found at least one candidate
|
||||
|
@ -442,7 +442,7 @@ namespace eq {
|
|||
|
||||
void create_substitution(unsigned sz) {
|
||||
m_subst_map.reset();
|
||||
m_subst_map.resize(sz, 0);
|
||||
m_subst_map.resize(sz, nullptr);
|
||||
for (unsigned i = 0; i < m_order.size(); i++) {
|
||||
expr_ref cur(m_map[m_order[i]], m);
|
||||
// do all the previous substitutions before inserting
|
||||
|
@ -544,7 +544,7 @@ namespace eq {
|
|||
}
|
||||
|
||||
if (m.proofs_enabled()) {
|
||||
pr = r == q ? 0 : m.mk_der(q, r);
|
||||
pr = r == q ? nullptr : m.mk_der(q, r);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -776,7 +776,7 @@ namespace eq {
|
|||
m(m),
|
||||
a(m),
|
||||
dt(m),
|
||||
m_is_variable(0),
|
||||
m_is_variable(nullptr),
|
||||
m_subst(m),
|
||||
m_new_exprs(m),
|
||||
m_subst_map(m),
|
||||
|
@ -788,7 +788,7 @@ namespace eq {
|
|||
|
||||
void operator()(quantifier * q, expr_ref & r, proof_ref & pr) {
|
||||
TRACE("qe_lite", tout << mk_pp(q, m) << "\n";);
|
||||
pr = 0;
|
||||
pr = nullptr;
|
||||
r = q;
|
||||
reduce_quantifier(q, r, pr);
|
||||
if (r != q) {
|
||||
|
@ -955,7 +955,7 @@ namespace ar {
|
|||
|
||||
public:
|
||||
|
||||
der(ast_manager& m): m(m), a(m), m_is_variable(0) {}
|
||||
der(ast_manager& m): m(m), a(m), m_is_variable(nullptr) {}
|
||||
|
||||
void operator()(expr_ref_vector& fmls) {
|
||||
for (unsigned i = 0; i < fmls.size(); ++i) {
|
||||
|
@ -1473,7 +1473,7 @@ namespace fm {
|
|||
|
||||
fm(ast_manager & _m):
|
||||
m(_m),
|
||||
m_is_variable(0),
|
||||
m_is_variable(nullptr),
|
||||
m_allocator("fm-elim"),
|
||||
m_util(m),
|
||||
m_bvar2expr(m),
|
||||
|
@ -1534,7 +1534,7 @@ namespace fm {
|
|||
reset_constraints();
|
||||
m_bvar2expr.reset();
|
||||
m_bvar2sign.reset();
|
||||
m_bvar2expr.push_back(0); // bvar 0 is not used
|
||||
m_bvar2expr.push_back(nullptr); // bvar 0 is not used
|
||||
m_bvar2sign.push_back(0);
|
||||
m_expr2var.reset();
|
||||
m_is_int.reset();
|
||||
|
@ -1547,7 +1547,7 @@ namespace fm {
|
|||
m_new_fmls.reset();
|
||||
m_counter = 0;
|
||||
m_inconsistent = false;
|
||||
m_inconsistent_core = 0;
|
||||
m_inconsistent_core = nullptr;
|
||||
init_forbidden_set(g);
|
||||
}
|
||||
|
||||
|
@ -1583,7 +1583,7 @@ namespace fm {
|
|||
// 0 <= 0 -- > true
|
||||
if (c.m_c.is_pos() || (!c.m_strict && c.m_c.is_zero()))
|
||||
return m.mk_true();
|
||||
ineq = 0;
|
||||
ineq = nullptr;
|
||||
}
|
||||
else {
|
||||
bool int_cnstr = all_int(c);
|
||||
|
@ -1833,7 +1833,7 @@ namespace fm {
|
|||
for (unsigned i = 0; !m_inconsistent && i < sz; i++) {
|
||||
expr * f = g[i];
|
||||
if (is_occ(f))
|
||||
add_constraint(f, 0);
|
||||
add_constraint(f, nullptr);
|
||||
else
|
||||
m_new_fmls.push_back(f);
|
||||
}
|
||||
|
@ -2065,7 +2065,7 @@ namespace fm {
|
|||
display(tout, l);
|
||||
tout << "\n";
|
||||
display(tout, u); tout << "\n";);
|
||||
return 0; // no constraint needs to be created.
|
||||
return nullptr; // no constraint needs to be created.
|
||||
}
|
||||
|
||||
new_lits.reset();
|
||||
|
@ -2109,7 +2109,7 @@ namespace fm {
|
|||
display(tout, l);
|
||||
tout << "\n";
|
||||
display(tout, u); tout << "\n";);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
expr_dependency * new_dep = m.mk_join(l.m_dep, u.m_dep);
|
||||
|
@ -2121,7 +2121,7 @@ namespace fm {
|
|||
display(tout, u); tout << "\n";);
|
||||
m_inconsistent = true;
|
||||
m_inconsistent_core = new_dep;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
constraint * new_cnstr = mk_constraint(new_lits.size(),
|
||||
|
@ -2191,7 +2191,7 @@ namespace fm {
|
|||
constraint const & l_c = *(l[i]);
|
||||
constraint const & u_c = *(u[j]);
|
||||
constraint * new_c = resolve(l_c, u_c, x);
|
||||
if (new_c != 0) {
|
||||
if (new_c != nullptr) {
|
||||
num_new_cnstrs++;
|
||||
new_constraints.push_back(new_c);
|
||||
}
|
||||
|
@ -2560,7 +2560,7 @@ class qe_lite_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("qe-lite", *g);
|
||||
proof_ref new_pr(m);
|
||||
expr_ref new_f(m);
|
||||
|
|
|
@ -71,7 +71,7 @@ expr_ref project_plugin::pick_equality(ast_manager& m, model& model, expr* t) {
|
|||
vals.push_back(val);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return expr_ref(0, m);
|
||||
return expr_ref(nullptr, m);
|
||||
}
|
||||
|
||||
void project_plugin::partition_values(model& model, expr_ref_vector const& vals, expr_ref_vector& lits) {
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
// callback to add constraints in branch.
|
||||
void add_constraint(bool use_var, expr* l1 = 0, expr* l2 = 0, expr* l3 = 0) override {
|
||||
void add_constraint(bool use_var, expr* l1 = nullptr, expr* l2 = nullptr, expr* l3 = nullptr) override {
|
||||
ptr_buffer<expr> args;
|
||||
if (l1) args.push_back(l1);
|
||||
if (l2) args.push_back(l2);
|
||||
|
@ -179,7 +179,7 @@ namespace qe {
|
|||
m_super.m_rewriter(m_fml);
|
||||
TRACE("qe", model_v2_pp(tout, *model); tout << "\n";
|
||||
tout << mk_pp(m_fml, m) << "\n";);
|
||||
elim_var(i, m_fml, 0);
|
||||
elim_var(i, m_fml, nullptr);
|
||||
}
|
||||
|
||||
void project_var_full(unsigned i) {
|
||||
|
@ -191,7 +191,7 @@ namespace qe {
|
|||
m_fml = result;
|
||||
m_super.m_rewriter(m_fml);
|
||||
TRACE("qe", tout << mk_pp(m_fml, m) << "\n";);
|
||||
elim_var(i, m_fml, 0);
|
||||
elim_var(i, m_fml, nullptr);
|
||||
}
|
||||
|
||||
void project_var(unsigned i) {
|
||||
|
@ -329,7 +329,7 @@ namespace qe {
|
|||
for (unsigned i = 0; i < m_solvers.size(); ++i) {
|
||||
dealloc(m_solvers[i]);
|
||||
}
|
||||
m_fml = 0;
|
||||
m_fml = nullptr;
|
||||
m_Ms.reset();
|
||||
m_fparamv.reset();
|
||||
m_solvers.reset();
|
||||
|
|
|
@ -56,7 +56,7 @@ class qe_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("qe", *g);
|
||||
m_fparams.m_model = g->models_enabled();
|
||||
proof_ref new_pr(m);
|
||||
|
@ -72,7 +72,7 @@ class qe_tactic : public tactic {
|
|||
if (!has_quantifiers(f))
|
||||
continue;
|
||||
m_qe(m.mk_true(), f, new_f);
|
||||
new_pr = 0;
|
||||
new_pr = nullptr;
|
||||
if (produce_proofs) {
|
||||
new_pr = m.mk_modus_ponens(g->pr(i), new_pr);
|
||||
}
|
||||
|
|
|
@ -706,7 +706,7 @@ namespace qe {
|
|||
m_asms.reset();
|
||||
m_pred_abs.reset();
|
||||
m_vars.reset();
|
||||
m_model = 0;
|
||||
m_model = nullptr;
|
||||
m_fa.reset();
|
||||
m_ex.reset();
|
||||
m_free_vars.reset();
|
||||
|
@ -956,7 +956,7 @@ namespace qe {
|
|||
ptr_vector<expr> todo;
|
||||
trail.push_back(fml);
|
||||
todo.push_back(fml);
|
||||
expr* e = 0, *r = 0;
|
||||
expr* e = nullptr, *r = nullptr;
|
||||
|
||||
while (!todo.empty()) {
|
||||
check_cancel();
|
||||
|
@ -1196,8 +1196,8 @@ namespace qe {
|
|||
m_mode(mode),
|
||||
m_avars(m),
|
||||
m_free_vars(m),
|
||||
m_objective(0),
|
||||
m_value(0),
|
||||
m_objective(nullptr),
|
||||
m_value(nullptr),
|
||||
m_was_sat(false),
|
||||
m_gt(m)
|
||||
{
|
||||
|
@ -1224,7 +1224,7 @@ namespace qe {
|
|||
ptr_vector<expr> fmls;
|
||||
expr_ref_vector defs(m);
|
||||
expr_ref fml(m);
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
in->get_formulas(fmls);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue