mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
bool_vector, some spacer tidy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2ed26e8e73
commit
b889b110ee
106 changed files with 239 additions and 266 deletions
|
@ -440,7 +440,7 @@ typename symbolic_automata<T, M>::automaton_t* symbolic_automata<T, M>::mk_produ
|
|||
inv[mv.dst()].push_back(move_t(m, mv.dst(), mv.src(), mv.t()));
|
||||
}
|
||||
|
||||
svector<bool> back_reachable(n, false);
|
||||
bool_vector back_reachable(n, false);
|
||||
for (unsigned f : final) {
|
||||
back_reachable[f] = true;
|
||||
}
|
||||
|
|
|
@ -748,7 +748,7 @@ namespace dd {
|
|||
void bdd_manager::gc() {
|
||||
m_free_nodes.reset();
|
||||
IF_VERBOSE(13, verbose_stream() << "(bdd :gc " << m_nodes.size() << ")\n";);
|
||||
svector<bool> reachable(m_nodes.size(), false);
|
||||
bool_vector reachable(m_nodes.size(), false);
|
||||
for (unsigned i = m_bdd_stack.size(); i-- > 0; ) {
|
||||
reachable[m_bdd_stack[i]] = true;
|
||||
m_todo.push_back(m_bdd_stack[i]);
|
||||
|
|
|
@ -952,12 +952,12 @@ namespace dd {
|
|||
}
|
||||
|
||||
bool pdd_manager::is_reachable(PDD p) {
|
||||
svector<bool> reachable(m_nodes.size(), false);
|
||||
bool_vector reachable(m_nodes.size(), false);
|
||||
compute_reachable(reachable);
|
||||
return reachable[p];
|
||||
}
|
||||
|
||||
void pdd_manager::compute_reachable(svector<bool>& reachable) {
|
||||
void pdd_manager::compute_reachable(bool_vector& reachable) {
|
||||
for (unsigned i = m_pdd_stack.size(); i-- > 0; ) {
|
||||
reachable[m_pdd_stack[i]] = true;
|
||||
m_todo.push_back(m_pdd_stack[i]);
|
||||
|
@ -994,7 +994,7 @@ namespace dd {
|
|||
m_free_nodes.reset();
|
||||
SASSERT(well_formed());
|
||||
IF_VERBOSE(13, verbose_stream() << "(pdd :gc " << m_nodes.size() << ")\n";);
|
||||
svector<bool> reachable(m_nodes.size(), false);
|
||||
bool_vector reachable(m_nodes.size(), false);
|
||||
compute_reachable(reachable);
|
||||
for (unsigned i = m_nodes.size(); i-- > pdd_no_op; ) {
|
||||
if (!reachable[i]) {
|
||||
|
|
|
@ -227,7 +227,7 @@ namespace dd {
|
|||
bool var_is_leaf(PDD p, unsigned v);
|
||||
|
||||
bool is_reachable(PDD p);
|
||||
void compute_reachable(svector<bool>& reachable);
|
||||
void compute_reachable(bool_vector& reachable);
|
||||
void try_gc();
|
||||
void reserve_var(unsigned v);
|
||||
bool well_formed();
|
||||
|
|
|
@ -88,7 +88,7 @@ class hilbert_basis {
|
|||
|
||||
reslimit& m_limit;
|
||||
vector<num_vector> m_ineqs; // set of asserted inequalities
|
||||
svector<bool> m_iseq; // inequalities that are equalities
|
||||
bool_vector m_iseq; // inequalities that are equalities
|
||||
num_vector m_store; // store of vectors
|
||||
svector<offset_t> m_basis; // vector of current basis
|
||||
svector<offset_t> m_free_list; // free list of unused storage
|
||||
|
|
|
@ -75,7 +75,7 @@ void const_iterator_mon::advance_mask() {
|
|||
const_iterator_mon::self_type const_iterator_mon::operator++() { self_type i = *this; operator++(1); return i; }
|
||||
const_iterator_mon::self_type const_iterator_mon::operator++(int) { advance_mask(); return *this; }
|
||||
|
||||
const_iterator_mon::const_iterator_mon(const svector<bool>& mask, const factorization_factory *f) :
|
||||
const_iterator_mon::const_iterator_mon(const bool_vector& mask, const factorization_factory *f) :
|
||||
m_mask(mask),
|
||||
m_ff(f) ,
|
||||
m_full_factorization_returned(false)
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
|
||||
struct const_iterator_mon {
|
||||
// fields
|
||||
svector<bool> m_mask;
|
||||
bool_vector m_mask;
|
||||
const factorization_factory * m_ff;
|
||||
bool m_full_factorization_returned;
|
||||
|
||||
|
@ -97,7 +97,7 @@ struct const_iterator_mon {
|
|||
self_type operator++();
|
||||
self_type operator++(int);
|
||||
|
||||
const_iterator_mon(const svector<bool>& mask, const factorization_factory *f);
|
||||
const_iterator_mon(const bool_vector& mask, const factorization_factory *f);
|
||||
|
||||
bool operator==(const self_type &other) const;
|
||||
bool operator!=(const self_type &other) const;
|
||||
|
@ -119,15 +119,15 @@ struct factorization_factory {
|
|||
m_vars(vars), m_monic(m) {
|
||||
}
|
||||
|
||||
svector<bool> get_mask() const {
|
||||
bool_vector get_mask() const {
|
||||
// we keep the last element always in the first factor to avoid
|
||||
// repeating a pair twice, that is why m_mask is shorter by one then m_vars
|
||||
|
||||
return
|
||||
m_vars.size() != 2 ?
|
||||
svector<bool>(m_vars.size() - 1, false)
|
||||
bool_vector(m_vars.size() - 1, false)
|
||||
:
|
||||
svector<bool>(1, true); // init mask as in the end() since the full iteration will do the job
|
||||
bool_vector(1, true); // init mask as in the end() since the full iteration will do the job
|
||||
}
|
||||
|
||||
const_iterator_mon begin() const {
|
||||
|
@ -135,7 +135,7 @@ struct factorization_factory {
|
|||
}
|
||||
|
||||
const_iterator_mon end() const {
|
||||
svector<bool> mask(m_vars.size() - 1, true);
|
||||
bool_vector mask(m_vars.size() - 1, true);
|
||||
auto it = const_iterator_mon(mask, this);
|
||||
it.m_full_factorization_returned = true;
|
||||
return it;
|
||||
|
|
|
@ -74,7 +74,7 @@ class var_eqs {
|
|||
|
||||
trail_stack<var_eqs> m_stack;
|
||||
mutable svector<var_frame> m_todo;
|
||||
mutable svector<bool> m_marked;
|
||||
mutable bool_vector m_marked;
|
||||
mutable unsigned_vector m_marked_trail;
|
||||
mutable svector<eq_justification> m_justtrail;
|
||||
|
||||
|
|
|
@ -1272,7 +1272,7 @@ namespace polynomial {
|
|||
SASSERT(sz == num_vars());
|
||||
DEBUG_CODE({
|
||||
// check whether xs is really a permutation
|
||||
svector<bool> found;
|
||||
bool_vector found;
|
||||
found.resize(num_vars(), false);
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
SASSERT(xs[i] < num_vars());
|
||||
|
@ -3218,7 +3218,7 @@ namespace polynomial {
|
|||
}
|
||||
};
|
||||
|
||||
svector<bool> m_found_vars;
|
||||
bool_vector m_found_vars;
|
||||
void vars(polynomial const * p, var_vector & xs) {
|
||||
xs.reset();
|
||||
m_found_vars.reserve(num_vars(), false);
|
||||
|
|
|
@ -138,7 +138,7 @@ namespace upolynomial {
|
|||
// the factors to select from
|
||||
factors_type const & m_factors;
|
||||
// which factors are enabled
|
||||
svector<bool> m_enabled;
|
||||
bool_vector m_enabled;
|
||||
// the size of the current selection
|
||||
int m_current_size;
|
||||
// the current selection: indices at positions < m_current_size, other values are maxed out
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace opt {
|
|||
static const unsigned m_objective_id = 0;
|
||||
vector<unsigned_vector> m_var2row_ids;
|
||||
vector<rational> m_var2value;
|
||||
svector<bool> m_var2is_int;
|
||||
bool_vector m_var2is_int;
|
||||
vector<var> m_new_vars;
|
||||
unsigned_vector m_lub, m_glb, m_mod;
|
||||
unsigned_vector m_above, m_below;
|
||||
|
|
|
@ -224,7 +224,7 @@ namespace smt {
|
|||
node src = m_graph.get_source(m_enter_id);
|
||||
node tgt = m_graph.get_target(m_enter_id);
|
||||
svector<edge_id> path;
|
||||
svector<bool> against;
|
||||
bool_vector against;
|
||||
m_tree->get_path(src, tgt, path, against);
|
||||
SASSERT(path.size() >= 1);
|
||||
for (unsigned i = 0; i < path.size(); ++i) {
|
||||
|
@ -241,7 +241,7 @@ namespace smt {
|
|||
m_delta.set_invalid();
|
||||
edge_id leave_id = null_edge_id;
|
||||
svector<edge_id> path;
|
||||
svector<bool> against;
|
||||
bool_vector against;
|
||||
m_tree->get_path(src, tgt, path, against);
|
||||
SASSERT(path.size() >= 1);
|
||||
for (unsigned i = 0; i < path.size(); ++i) {
|
||||
|
|
|
@ -476,7 +476,7 @@ private:
|
|||
interval_manager m_im;
|
||||
scoped_numeral_vector m_num_buffer;
|
||||
|
||||
svector<bool> m_is_int;
|
||||
bool_vector m_is_int;
|
||||
ptr_vector<definition> m_defs;
|
||||
vector<watch_list> m_wlist;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue