mirror of
https://github.com/Z3Prover/z3
synced 2025-07-29 07:27:57 +00:00
remove spurious copies and inc_refs around ref_vector
This commit is contained in:
parent
eabe91cdef
commit
5de6628a5d
16 changed files with 49 additions and 53 deletions
|
@ -1594,7 +1594,7 @@ namespace smt {
|
|||
for (literal lit : m_assigned_literals) {
|
||||
expr_ref e(m_manager);
|
||||
literal2expr(lit, e);
|
||||
assignments.push_back(e);
|
||||
assignments.push_back(std::move(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4180,7 +4180,7 @@ namespace smt {
|
|||
SASSERT(get_justification(guess.var()).get_kind() == b_justification::AXIOM);
|
||||
expr_ref lit(m_manager);
|
||||
literal2expr(guess, lit);
|
||||
result.push_back(lit);
|
||||
result.push_back(std::move(lit));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1115,8 +1115,6 @@ namespace smt {
|
|||
|
||||
void internalize_assertions();
|
||||
|
||||
void assert_assumption(expr * a);
|
||||
|
||||
bool validate_assumptions(expr_ref_vector const& asms);
|
||||
|
||||
void init_assumptions(expr_ref_vector const& asms);
|
||||
|
@ -1129,8 +1127,6 @@ namespace smt {
|
|||
|
||||
void reset_assumptions();
|
||||
|
||||
void reset_clause();
|
||||
|
||||
void add_theory_assumptions(expr_ref_vector & theory_assumptions);
|
||||
|
||||
lbool mk_unsat_core(lbool result);
|
||||
|
@ -1585,8 +1581,6 @@ namespace smt {
|
|||
|
||||
//proof * const * get_asserted_formula_proofs() const { return m_asserted_formulas.get_formula_proofs(); }
|
||||
|
||||
void get_assumptions_core(ptr_vector<expr> & result);
|
||||
|
||||
void get_assertions(ptr_vector<expr> & result) { m_asserted_formulas.get_assertions(result); }
|
||||
|
||||
void display(std::ostream & out) const;
|
||||
|
|
|
@ -409,11 +409,11 @@ namespace smt {
|
|||
for (unsigned i = 0; i < num_antecedents; i++) {
|
||||
literal l = antecedents[i];
|
||||
literal2expr(l, n);
|
||||
fmls.push_back(n);
|
||||
fmls.push_back(std::move(n));
|
||||
}
|
||||
if (consequent != false_literal) {
|
||||
literal2expr(~consequent, n);
|
||||
fmls.push_back(n);
|
||||
fmls.push_back(std::move(n));
|
||||
}
|
||||
if (logic != symbol::null) out << "(set-logic " << logic << ")\n";
|
||||
visitor.collect(fmls);
|
||||
|
|
|
@ -281,7 +281,7 @@ namespace smt {
|
|||
for (unsigned i = 0; i < m_num_literals; i++) {
|
||||
expr_ref l(m);
|
||||
ctx.literal2expr(m_literals[i], l);
|
||||
lits.push_back(l);
|
||||
lits.push_back(std::move(l));
|
||||
}
|
||||
if (lits.size() == 1)
|
||||
return m.mk_th_lemma(m_th_id, lits.get(0), 0, nullptr, m_params.size(), m_params.c_ptr());
|
||||
|
@ -407,12 +407,7 @@ namespace smt {
|
|||
for (unsigned i = 0; i < m_num_literals; i++) {
|
||||
bool sign = GET_TAG(m_literals[i]) != 0;
|
||||
expr * v = UNTAG(expr*, m_literals[i]);
|
||||
expr_ref l(m);
|
||||
if (sign)
|
||||
l = m.mk_not(v);
|
||||
else
|
||||
l = v;
|
||||
lits.push_back(l);
|
||||
lits.push_back(sign ? m.mk_not(v) : v);
|
||||
}
|
||||
if (lits.size() == 1)
|
||||
return m.mk_th_lemma(m_th_id, lits.get(0), 0, nullptr, m_params.size(), m_params.c_ptr());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue