mirror of
https://github.com/Z3Prover/z3
synced 2025-10-08 00:41:56 +00:00
DoC: code cleanups
Signed-off-by: Nuno Lopes <a-nlopes@microsoft.com>
This commit is contained in:
parent
8d1177bf3f
commit
115ab12ade
5 changed files with 30 additions and 34 deletions
|
@ -48,7 +48,7 @@ class doc_manager {
|
|||
project_resolve
|
||||
};
|
||||
project_action_t pick_resolvent(
|
||||
tbv const& pos, tbv_vector const& neg, bool const* to_delete, unsigned& idx);
|
||||
tbv const& pos, tbv_vector const& neg, bit_vector const& to_delete, unsigned& idx);
|
||||
public:
|
||||
doc_manager(unsigned num_bits);
|
||||
~doc_manager();
|
||||
|
@ -88,17 +88,17 @@ public:
|
|||
std::ostream& display(std::ostream& out, doc const& b) const;
|
||||
std::ostream& display(std::ostream& out, doc const& b, unsigned hi, unsigned lo) const;
|
||||
unsigned num_tbits() const { return m.num_tbits(); }
|
||||
doc* project(doc_manager& dstm, unsigned n, bool const* to_delete, doc const& src);
|
||||
doc* project(doc_manager& dstm, unsigned n, bit_vector const& to_delete, doc const& src);
|
||||
bool well_formed(doc const& d) const;
|
||||
bool merge(doc& d, unsigned lo, unsigned length, subset_ints const& equalities, bit_vector const& discard_cols);
|
||||
void set(doc& d, unsigned idx, tbit value);
|
||||
|
||||
void verify_project(ast_manager& m, doc_manager& dstm, bool const* to_delete, doc const& src, doc const& dst);
|
||||
void verify_project(ast_manager& m, doc_manager& dstm, bit_vector const& to_delete, doc const& src, doc const& dst);
|
||||
private:
|
||||
unsigned diff_by_012(tbv const& pos, tbv const& neg, unsigned& index);
|
||||
bool merge(doc& d, unsigned idx, subset_ints const& equalities, bit_vector const& discard_cols);
|
||||
void project_rename(expr_ref& fml, bool const* to_delete);
|
||||
void project_expand(expr_ref& fml, bool const* to_delete);
|
||||
void project_rename(expr_ref& fml, bit_vector const& to_delete);
|
||||
void project_expand(expr_ref& fml, bit_vector const& to_delete);
|
||||
expr_ref to_formula(ast_manager& m, doc const& src);
|
||||
void check_equiv(ast_manager& m, expr* fml1, expr* fml2);
|
||||
};
|
||||
|
@ -171,11 +171,13 @@ public:
|
|||
SASSERT(t);
|
||||
unsigned sz = size(), j = 0;
|
||||
bool found = false;
|
||||
for (unsigned i = 0; i < sz; ++i, ++j) {
|
||||
unsigned i = 0;
|
||||
for ( ; i < sz; ++i, ++j) {
|
||||
if (m.contains(*m_elems[i], *t)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if (!found && m.contains(*t, *m_elems[i])) {
|
||||
if (m.contains(*t, *m_elems[i])) {
|
||||
m.deallocate(m_elems[i]);
|
||||
--j;
|
||||
}
|
||||
|
@ -185,6 +187,7 @@ public:
|
|||
}
|
||||
if (j != sz) m_elems.resize(j);
|
||||
if (found) {
|
||||
SASSERT(j == i);
|
||||
m.deallocate(t);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue