3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

Use nullptr.

This commit is contained in:
Bruce Mitchener 2018-02-12 14:05:55 +07:00
parent f01328c65f
commit 76eb7b9ede
625 changed files with 4639 additions and 4639 deletions

View file

@ -150,7 +150,7 @@ namespace datalog {
check_relation_plugin::check_relation_plugin(relation_manager& rm):
relation_plugin(check_relation_plugin::get_name(), rm),
m(rm.get_context().get_manager()),
m_base(0) {
m_base(nullptr) {
}
check_relation_plugin::~check_relation_plugin() {
}
@ -158,7 +158,7 @@ namespace datalog {
return dynamic_cast<check_relation&>(r);
}
check_relation* check_relation_plugin::get(relation_base* r) {
return r?dynamic_cast<check_relation*>(r):0;
return r?dynamic_cast<check_relation*>(r):nullptr;
}
check_relation const & check_relation_plugin::get(relation_base const& r) {
return dynamic_cast<check_relation const&>(r);
@ -207,7 +207,7 @@ namespace datalog {
const relation_base & t1, const relation_base & t2,
unsigned col_cnt, const unsigned * cols1, const unsigned * cols2) {
relation_join_fn* j = m_base->mk_join_fn(get(t1).rb(), get(t2).rb(), col_cnt, cols1, cols2);
return j?alloc(join_fn, j, t1.get_signature(), t2.get_signature(), col_cnt, cols1, cols2):0;
return j?alloc(join_fn, j, t1.get_signature(), t2.get_signature(), col_cnt, cols1, cols2):nullptr;
}
class check_relation_plugin::join_project_fn : public convenient_relation_join_project_fn {
@ -239,7 +239,7 @@ namespace datalog {
relation_join_fn* j = m_base->mk_join_project_fn(get(t1).rb(), get(t2).rb(), col_cnt, cols1, cols2,
removed_col_cnt, removed_cols);
return j?alloc(join_project_fn, j, t1.get_signature(), t2.get_signature(), col_cnt, cols1, cols2,
removed_col_cnt, removed_cols):0;
removed_col_cnt, removed_cols):nullptr;
}
void check_relation_plugin::verify_filter_project(
@ -499,8 +499,8 @@ namespace datalog {
expr_ref fml0 = r.m_fml;
expr_ref delta0(r.m_fml.get_manager());
if (d) d->to_formula(delta0);
(*m_union)(r.rb(), src.rb(), d?(&d->rb()):0);
r.get_plugin().verify_union(fml0, src.rb(), r.rb(), delta0, d?(&d->rb()):0);
(*m_union)(r.rb(), src.rb(), d?(&d->rb()):nullptr);
r.get_plugin().verify_union(fml0, src.rb(), r.rb(), delta0, d?(&d->rb()):nullptr);
r.rb().to_formula(r.m_fml);
if (d) d->rb().to_formula(d->m_fml);
}
@ -508,16 +508,16 @@ namespace datalog {
relation_union_fn * check_relation_plugin::mk_union_fn(
const relation_base & tgt, const relation_base & src,
const relation_base * delta) {
relation_base const* d1 = delta?(&(get(*delta).rb())):0;
relation_base const* d1 = delta?(&(get(*delta).rb())):nullptr;
relation_union_fn* u = m_base->mk_union_fn(get(tgt).rb(), get(src).rb(), d1);
return u?alloc(union_fn, u):0;
return u?alloc(union_fn, u):nullptr;
}
relation_union_fn * check_relation_plugin::mk_widen_fn(
const relation_base & tgt, const relation_base & src,
const relation_base * delta) {
relation_base const* d1 = delta?(&(get(*delta).rb())):0;
relation_base const* d1 = delta?(&(get(*delta).rb())):nullptr;
relation_union_fn* u = m_base->mk_widen_fn(get(tgt).rb(), get(src).rb(), d1);
return u?alloc(union_fn, u):0;
return u?alloc(union_fn, u):nullptr;
}
class check_relation_plugin::filter_identical_fn : public relation_mutator_fn {
@ -553,7 +553,7 @@ namespace datalog {
relation_mutator_fn * check_relation_plugin::mk_filter_identical_fn(
const relation_base & t, unsigned col_cnt, const unsigned * identical_cols) {
relation_mutator_fn* r = m_base->mk_filter_identical_fn(get(t).rb(), col_cnt, identical_cols);
return r?alloc(filter_identical_fn, r, col_cnt, identical_cols):0;
return r?alloc(filter_identical_fn, r, col_cnt, identical_cols):nullptr;
}
class check_relation_plugin::filter_interpreted_fn : public relation_mutator_fn {
@ -579,7 +579,7 @@ namespace datalog {
relation_mutator_fn * check_relation_plugin::mk_filter_interpreted_fn(const relation_base & t, app * condition) {
relation_mutator_fn* r = m_base->mk_filter_interpreted_fn(get(t).rb(), condition);
app_ref cond(condition, m);
return r?alloc(filter_interpreted_fn, r, cond):0;
return r?alloc(filter_interpreted_fn, r, cond):nullptr;
}
class check_relation_plugin::project_fn : public convenient_relation_project_fn {
@ -608,7 +608,7 @@ namespace datalog {
const relation_base & t, unsigned col_cnt,
const unsigned * removed_cols) {
relation_transformer_fn* p = m_base->mk_project_fn(get(t).rb(), col_cnt, removed_cols);
return p?alloc(project_fn, p, t, col_cnt, removed_cols):0;
return p?alloc(project_fn, p, t, col_cnt, removed_cols):nullptr;
}
class check_relation_plugin::rename_fn : public convenient_relation_rename_fn {
@ -635,7 +635,7 @@ namespace datalog {
const relation_base & r,
unsigned cycle_len, const unsigned * permutation_cycle) {
relation_transformer_fn* p = m_base->mk_rename_fn(get(r).rb(), cycle_len, permutation_cycle);
return p?alloc(rename_fn, p, r, cycle_len, permutation_cycle):0;
return p?alloc(rename_fn, p, r, cycle_len, permutation_cycle):nullptr;
}
class check_relation_plugin::filter_equal_fn : public relation_mutator_fn {
@ -663,7 +663,7 @@ namespace datalog {
relation_mutator_fn * check_relation_plugin::mk_filter_equal_fn(
const relation_base & t, const relation_element & value, unsigned col) {
relation_mutator_fn* r = m_base->mk_filter_equal_fn(get(t).rb(), value, col);
return r?alloc(filter_equal_fn, r, t, value, col):0;
return r?alloc(filter_equal_fn, r, t, value, col):nullptr;
}
@ -700,7 +700,7 @@ namespace datalog {
const relation_base& neg, unsigned joined_col_cnt, const unsigned *t_cols,
const unsigned *negated_cols) {
relation_intersection_filter_fn* f = m_base->mk_filter_by_negation_fn(get(t).rb(), get(neg).rb(), joined_col_cnt, t_cols, negated_cols);
return f?alloc(negation_filter_fn, f, joined_col_cnt, t_cols, negated_cols):0;
return f?alloc(negation_filter_fn, f, joined_col_cnt, t_cols, negated_cols):nullptr;
}
/*
@ -779,7 +779,7 @@ namespace datalog {
unsigned removed_col_cnt, const unsigned * removed_cols) {
relation_transformer_fn* r = m_base->mk_filter_interpreted_and_project_fn(get(t).rb(), condition, removed_col_cnt, removed_cols);
app_ref cond(condition, m);
return r?alloc(filter_proj_fn, r, t, cond, removed_col_cnt, removed_cols):0;
return r?alloc(filter_proj_fn, r, t, cond, removed_col_cnt, removed_cols):nullptr;
}