mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 17:38:45 +00:00
merge with master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
c513f3ca09
883 changed files with 13979 additions and 16480 deletions
|
@ -121,7 +121,7 @@ namespace smt {
|
|||
bool visited = true;
|
||||
family_id fid = to_app(n)->get_family_id();
|
||||
theory * th = m_theories.get_plugin(fid);
|
||||
bool def_int = th == 0 || th->default_internalizer();
|
||||
bool def_int = th == nullptr || th->default_internalizer();
|
||||
if (!def_int) {
|
||||
ptr_buffer<expr> descendants;
|
||||
get_foreign_descendants(to_app(n), fid, descendants);
|
||||
|
@ -301,7 +301,7 @@ namespace smt {
|
|||
e->mark_as_interpreted();
|
||||
app_ref eq(m_manager.mk_eq(fapp, val), m_manager);
|
||||
TRACE("assert_distinct", tout << "eq: " << mk_pp(eq, m_manager) << "\n";);
|
||||
assert_default(eq, 0);
|
||||
assert_default(eq, nullptr);
|
||||
mark_as_relevant(eq.get());
|
||||
// TODO: we may want to hide the auxiliary values val and the function f from the model.
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ namespace smt {
|
|||
else {
|
||||
TRACE("internalize_bug", tout << "creating enode for #" << n->get_id() << "\n";);
|
||||
mk_enode(to_app(n),
|
||||
true, /* supress arguments, we not not use CC for this kind of enode */
|
||||
true, /* suppress arguments, we not not use CC for this kind of enode */
|
||||
true, /* bool enode must be merged with true/false, since it is not in the context of a gate */
|
||||
false /* CC is not enabled */ );
|
||||
set_enode_flag(v, false);
|
||||
|
@ -453,7 +453,7 @@ namespace smt {
|
|||
// must be associated with an enode.
|
||||
if (!e_internalized(n)) {
|
||||
mk_enode(to_app(n),
|
||||
true, /* supress arguments, we not not use CC for this kind of enode */
|
||||
true, /* suppress arguments, we not not use CC for this kind of enode */
|
||||
true /* bool enode must be merged with true/false, since it is not in the context of a gate */,
|
||||
false /* CC is not enabled */);
|
||||
}
|
||||
|
@ -631,7 +631,7 @@ namespace smt {
|
|||
set_merge_tf_trail(enode * n):
|
||||
m_node(n) {
|
||||
}
|
||||
virtual void undo(context & ctx) {
|
||||
void undo(context & ctx) override {
|
||||
m_node->m_merge_tf = false;
|
||||
}
|
||||
};
|
||||
|
@ -667,7 +667,7 @@ namespace smt {
|
|||
set_enode_flag_trail(bool_var v):
|
||||
m_var(v) {
|
||||
}
|
||||
virtual void undo(context & ctx) {
|
||||
void undo(context & ctx) override {
|
||||
bool_var_data & data = ctx.m_bdata[m_var];
|
||||
data.reset_enode_flag();
|
||||
}
|
||||
|
@ -695,7 +695,7 @@ namespace smt {
|
|||
void context::internalize_term(app * n) {
|
||||
if (e_internalized(n)) {
|
||||
theory * th = m_theories.get_plugin(n->get_family_id());
|
||||
if (th != 0) {
|
||||
if (th != nullptr) {
|
||||
// This code is necessary because some theories may decide
|
||||
// not to create theory variables for a nested application.
|
||||
// Example:
|
||||
|
@ -739,7 +739,7 @@ namespace smt {
|
|||
app_ref eq1(mk_eq_atom(n, t), m_manager);
|
||||
app_ref eq2(mk_eq_atom(n, e), m_manager);
|
||||
mk_enode(n,
|
||||
true /* supress arguments, I don't want to apply CC on ite terms */,
|
||||
true /* suppress arguments, I don't want to apply CC on ite terms */,
|
||||
false /* it is a term, so it should not be merged with true/false */,
|
||||
false /* CC is not enabled */);
|
||||
internalize(c, true);
|
||||
|
@ -797,7 +797,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
enode * e = mk_enode(n,
|
||||
false, /* do not supress args */
|
||||
false, /* do not suppress args */
|
||||
false, /* it is a term, so it should not be merged with true/false */
|
||||
true);
|
||||
apply_sort_cnstr(n, e);
|
||||
|
@ -1271,7 +1271,7 @@ namespace smt {
|
|||
case CLS_AUX: {
|
||||
literal_buffer simp_lits;
|
||||
if (!simplify_aux_clause_literals(num_lits, lits, simp_lits))
|
||||
return 0; // clause is equivalent to true;
|
||||
return nullptr; // clause is equivalent to true;
|
||||
DEBUG_CODE({
|
||||
for (unsigned i = 0; i < simp_lits.size(); i++) {
|
||||
SASSERT(get_assignment(simp_lits[i]) == l_true);
|
||||
|
@ -1284,7 +1284,7 @@ namespace smt {
|
|||
}
|
||||
case CLS_AUX_LEMMA: {
|
||||
if (!simplify_aux_lemma_literals(num_lits, lits))
|
||||
return 0; // clause is equivalent to true
|
||||
return nullptr; // clause is equivalent to true
|
||||
// simplify_aux_lemma_literals does not delete literals assigned to false, so
|
||||
// it is not necessary to create a unit_resolution_justification
|
||||
break;
|
||||
|
@ -1303,14 +1303,14 @@ namespace smt {
|
|||
if (j && !j->in_region())
|
||||
m_justifications.push_back(j);
|
||||
TRACE("mk_clause", tout << "empty clause... setting conflict\n";);
|
||||
set_conflict(j == 0 ? b_justification::mk_axiom() : b_justification(j));
|
||||
set_conflict(j == nullptr ? b_justification::mk_axiom() : b_justification(j));
|
||||
SASSERT(inconsistent());
|
||||
return 0;
|
||||
return nullptr;
|
||||
case 1:
|
||||
if (j && !j->in_region())
|
||||
m_justifications.push_back(j);
|
||||
assign(lits[0], j);
|
||||
return 0;
|
||||
return nullptr;
|
||||
case 2:
|
||||
if (use_binary_clause_opt(lits[0], lits[1], lemma)) {
|
||||
literal l1 = lits[0];
|
||||
|
@ -1321,7 +1321,7 @@ namespace smt {
|
|||
assign(l1, b_justification(~l2));
|
||||
|
||||
m_stats.m_num_mk_bin_clause++;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
default: {
|
||||
m_stats.m_num_mk_clause++;
|
||||
|
@ -1405,7 +1405,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
void context::mk_th_axiom(theory_id tid, unsigned num_lits, literal * lits, unsigned num_params, parameter * params) {
|
||||
justification * js = 0;
|
||||
justification * js = nullptr;
|
||||
TRACE("mk_th_axiom",
|
||||
display_literals_verbose(tout, num_lits, lits);
|
||||
tout << "\n";);
|
||||
|
@ -1450,12 +1450,12 @@ namespace smt {
|
|||
|
||||
void context::mk_gate_clause(unsigned num_lits, literal * lits) {
|
||||
if (m_manager.proofs_enabled()) {
|
||||
proof * pr = mk_clause_def_axiom(num_lits, lits, 0);
|
||||
proof * pr = mk_clause_def_axiom(num_lits, lits, nullptr);
|
||||
TRACE("gate_clause", tout << mk_ll_pp(pr, m_manager););
|
||||
mk_clause(num_lits, lits, mk_justification(justification_proof_wrapper(*this, pr)));
|
||||
}
|
||||
else {
|
||||
mk_clause(num_lits, lits, 0);
|
||||
mk_clause(num_lits, lits, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1488,7 +1488,7 @@ namespace smt {
|
|||
mk_clause(num_lits, lits, mk_justification(justification_proof_wrapper(*this, pr)));
|
||||
}
|
||||
else {
|
||||
mk_clause(num_lits, lits, 0);
|
||||
mk_clause(num_lits, lits, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1507,7 +1507,7 @@ namespace smt {
|
|||
relevancy_eh * eh = m_relevancy_propagator->mk_and_relevancy_eh(n);
|
||||
unsigned num = n->get_num_args();
|
||||
for (unsigned i = 0; i < num; i++) {
|
||||
// if one child is assigned to false, the the and-parent must be notified
|
||||
// if one child is assigned to false, the and-parent must be notified
|
||||
literal l = get_literal(n->get_arg(i));
|
||||
add_rel_watch(~l, eh);
|
||||
}
|
||||
|
@ -1519,7 +1519,7 @@ namespace smt {
|
|||
relevancy_eh * eh = m_relevancy_propagator->mk_or_relevancy_eh(n);
|
||||
unsigned num = n->get_num_args();
|
||||
for (unsigned i = 0; i < num; i++) {
|
||||
// if one child is assigned to true, the the or-parent must be notified
|
||||
// if one child is assigned to true, the or-parent must be notified
|
||||
literal l = get_literal(n->get_arg(i));
|
||||
add_rel_watch(l, eh);
|
||||
}
|
||||
|
@ -1613,7 +1613,7 @@ namespace smt {
|
|||
SASSERT(m_th_var != null_theory_var);
|
||||
}
|
||||
|
||||
virtual void undo(context & ctx) {
|
||||
void undo(context & ctx) override {
|
||||
theory_var v = m_enode->get_th_var(m_th_id);
|
||||
SASSERT(v != null_theory_var);
|
||||
SASSERT(m_th_var == v);
|
||||
|
@ -1638,7 +1638,7 @@ namespace smt {
|
|||
m_old_th_var(old_var) {
|
||||
}
|
||||
|
||||
virtual void undo(context & ctx) {
|
||||
void undo(context & ctx) override {
|
||||
SASSERT(m_enode->get_th_var(m_th_id) != null_theory_var);
|
||||
m_enode->replace_th_var(m_old_th_var, m_th_id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue