mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25: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
|
@ -1385,7 +1385,7 @@ public:
|
|||
template<typename Functor>
|
||||
bool find_shortest_path_aux(dl_var source, dl_var target, unsigned timestamp, Functor & f, bool zero_edge) {
|
||||
svector<bfs_elem> bfs_todo;
|
||||
svector<bool> bfs_mark;
|
||||
bool_vector bfs_mark;
|
||||
bfs_mark.resize(m_assignment.size(), false);
|
||||
|
||||
bfs_todo.push_back(bfs_elem(source, -1, null_edge_id));
|
||||
|
|
|
@ -334,7 +334,7 @@ void expr_strong_context_simplifier::simplify_basic(expr* fml, expr_ref& result)
|
|||
|
||||
ptr_vector<expr> todo;
|
||||
ptr_vector<expr> names;
|
||||
svector<bool> is_checked;
|
||||
bool_vector is_checked;
|
||||
svector<unsigned> parent_ids, self_ids;
|
||||
expr_ref_vector fresh_vars(m);
|
||||
expr_ref_vector trail(m);
|
||||
|
@ -484,7 +484,7 @@ void expr_strong_context_simplifier::simplify_model_based(expr* fml, expr_ref& r
|
|||
|
||||
ptr_vector<expr> todo;
|
||||
ptr_vector<expr> names;
|
||||
svector<bool> is_checked;
|
||||
bool_vector is_checked;
|
||||
svector<unsigned> parent_ids, self_ids;
|
||||
expr_ref_vector fresh_vars(m);
|
||||
expr_ref_vector trail(m);
|
||||
|
|
|
@ -797,7 +797,7 @@ namespace {
|
|||
code_tree * m_tree;
|
||||
unsigned m_num_choices;
|
||||
bool m_is_tmp_tree;
|
||||
svector<bool> m_mp_already_processed;
|
||||
bool_vector m_mp_already_processed;
|
||||
obj_map<expr, unsigned> m_matched_exprs;
|
||||
|
||||
struct pcheck_checked {
|
||||
|
@ -3106,10 +3106,10 @@ namespace {
|
|||
|
||||
// m_is_plbl[f] is true, then when f(c_1, ..., c_n) becomes relevant,
|
||||
// for each c_i. c_i->get_root()->lbls().insert(lbl_hash(f))
|
||||
svector<bool> m_is_plbl;
|
||||
bool_vector m_is_plbl;
|
||||
// m_is_clbl[f] is true, then when n=f(c_1, ..., c_n) becomes relevant,
|
||||
// n->get_root()->lbls().insert(lbl_hash(f))
|
||||
svector<bool> m_is_clbl; // children labels
|
||||
bool_vector m_is_clbl; // children labels
|
||||
|
||||
// auxiliary field used to update data-structures...
|
||||
typedef ptr_vector<func_decl> func_decls;
|
||||
|
|
|
@ -3989,7 +3989,7 @@ namespace smt {
|
|||
|
||||
#ifdef Z3DEBUG
|
||||
expr_ref_vector expr_lits(m);
|
||||
svector<bool> expr_signs;
|
||||
bool_vector expr_signs;
|
||||
for (unsigned i = 0; i < num_lits; i++) {
|
||||
literal l = lits[i];
|
||||
if (get_assignment(l) != l_false) {
|
||||
|
|
|
@ -1200,7 +1200,7 @@ namespace smt {
|
|||
|
||||
bool is_relevant_core(expr * n) const { return m_relevancy_propagator->is_relevant(n); }
|
||||
|
||||
svector<bool> m_relevant_conflict_literals;
|
||||
bool_vector m_relevant_conflict_literals;
|
||||
void record_relevancy(unsigned n, literal const* lits);
|
||||
void restore_relevancy(unsigned n, literal const* lits);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace smt {
|
|||
ast_manager & m_manager;
|
||||
bool m_conservative;
|
||||
unsigned m_num_vars;
|
||||
svector<bool> m_already_found; // mapping from var_idx -> bool
|
||||
bool_vector m_already_found; // mapping from var_idx -> bool
|
||||
vector<enode_set> m_candidates; // mapping from var_idx -> set of candidates
|
||||
vector<enode_set> m_tmp_candidates; // auxiliary mapping from var_idx -> set of candidates
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace smt {
|
|||
void get_descendants(node_id start, svector<node_id> & descendants);
|
||||
|
||||
virtual void update(edge_id enter_id, edge_id leave_id);
|
||||
void get_path(node_id start, node_id end, svector<edge_id> & path, svector<bool> & against);
|
||||
void get_path(node_id start, node_id end, svector<edge_id> & path, bool_vector & against);
|
||||
bool in_subtree_t2(node_id child);
|
||||
|
||||
bool check_well_formed();
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace smt {
|
|||
virtual void get_descendants(node_id start, svector<node_id> & descendants) = 0;
|
||||
|
||||
virtual void update(edge_id enter_id, edge_id leave_id) = 0;
|
||||
virtual void get_path(node_id start, node_id end, svector<edge_id> & path, svector<bool> & against) = 0;
|
||||
virtual void get_path(node_id start, node_id end, svector<edge_id> & path, bool_vector & against) = 0;
|
||||
virtual bool in_subtree_t2(node_id child) = 0;
|
||||
|
||||
virtual bool check_well_formed() = 0;
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
template<typename Ext>
|
||||
void thread_spanning_tree<Ext>::get_path(node_id start, node_id end, svector<edge_id> & path, svector<bool> & against) {
|
||||
void thread_spanning_tree<Ext>::get_path(node_id start, node_id end, svector<edge_id> & path, bool_vector & against) {
|
||||
node_id join = get_common_ancestor(start, end);
|
||||
path.reset();
|
||||
while (start != join) {
|
||||
|
@ -282,7 +282,7 @@ namespace smt {
|
|||
|
||||
// Check that m_thread traverses each node.
|
||||
// This gets checked using union-find as well.
|
||||
svector<bool> found(m_thread.size(), false);
|
||||
bool_vector found(m_thread.size(), false);
|
||||
found[root] = true;
|
||||
for (node_id x = m_thread[root]; x != root; x = m_thread[x]) {
|
||||
SASSERT(x != m_thread[x]);
|
||||
|
|
|
@ -1850,7 +1850,7 @@ namespace smt {
|
|||
if (get_context().inconsistent())
|
||||
return true; // property is only valid if the context is not in a conflict.
|
||||
if (is_root(v) && is_bv(v)) {
|
||||
svector<bool> bits[2];
|
||||
bool_vector bits[2];
|
||||
unsigned num_bits = 0;
|
||||
unsigned bv_sz = get_bv_size(v);
|
||||
bits[0].resize(bv_sz, false);
|
||||
|
@ -1878,7 +1878,7 @@ namespace smt {
|
|||
|
||||
zero_one_bits const & _bits = m_zero_one_bits[v];
|
||||
SASSERT(_bits.size() == num_bits);
|
||||
svector<bool> already_found;
|
||||
bool_vector already_found;
|
||||
already_found.resize(bv_sz, false);
|
||||
for (auto & zo : _bits) {
|
||||
SASSERT(find(zo.m_owner) == v);
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace smt {
|
|||
atoms m_bv2atoms;
|
||||
edges m_edges; // list of asserted edges
|
||||
matrix m_matrix;
|
||||
svector<bool> m_is_int;
|
||||
bool_vector m_is_int;
|
||||
vector<cell_trail> m_cell_trail;
|
||||
svector<scope> m_scopes;
|
||||
bool m_non_diff_logic_exprs;
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace smt {
|
|||
ptr_vector<eq_prop_info> m_eq_prop_infos;
|
||||
|
||||
app_ref_vector m_terms;
|
||||
svector<bool> m_signs;
|
||||
bool_vector m_signs;
|
||||
|
||||
ptr_vector<atom> m_atoms;
|
||||
ptr_vector<atom> m_asserted_atoms; // set of asserted atoms
|
||||
|
@ -337,7 +337,7 @@ namespace smt {
|
|||
|
||||
virtual void new_diseq_eh(theory_var v1, theory_var v2, justification& j);
|
||||
|
||||
bool decompose_linear(app_ref_vector& args, svector<bool>& signs);
|
||||
bool decompose_linear(app_ref_vector& args, bool_vector& signs);
|
||||
|
||||
bool is_sign(expr* n, bool& sign);
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ void theory_diff_logic<Ext>::del_atoms(unsigned old_size) {
|
|||
|
||||
|
||||
template<typename Ext>
|
||||
bool theory_diff_logic<Ext>::decompose_linear(app_ref_vector& terms, svector<bool>& signs) {
|
||||
bool theory_diff_logic<Ext>::decompose_linear(app_ref_vector& terms, bool_vector& signs) {
|
||||
for (unsigned i = 0; i < terms.size(); ++i) {
|
||||
app* n = terms.get(i);
|
||||
bool sign;
|
||||
|
|
|
@ -356,9 +356,9 @@ namespace smt {
|
|||
literal_vector m_antecedents;
|
||||
tracked_uint_set m_active_var_set;
|
||||
expr_ref_vector m_antecedent_exprs;
|
||||
svector<bool> m_antecedent_signs;
|
||||
bool_vector m_antecedent_signs;
|
||||
expr_ref_vector m_cardinality_exprs;
|
||||
svector<bool> m_cardinality_signs;
|
||||
bool_vector m_cardinality_signs;
|
||||
|
||||
void normalize_active_coeffs();
|
||||
void inc_coeff(literal l, int offset);
|
||||
|
|
|
@ -1033,7 +1033,7 @@ namespace smt {
|
|||
unsigned sz = g.get_num_nodes();
|
||||
svector<dl_var> nodes;
|
||||
num_children.resize(sz, 0);
|
||||
svector<bool> processed(sz, false);
|
||||
bool_vector processed(sz, false);
|
||||
for (unsigned i = 0; i < sz; ++i) nodes.push_back(i);
|
||||
while (!nodes.empty()) {
|
||||
dl_var v = nodes.back();
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace smt {
|
|||
/**
|
||||
\brief return the complement of variables that are currently assigned.
|
||||
*/
|
||||
void theory_wmaxsat::get_assignment(svector<bool>& result) {
|
||||
void theory_wmaxsat::get_assignment(bool_vector& result) {
|
||||
result.reset();
|
||||
|
||||
if (!m_found_optimal) {
|
||||
|
|
|
@ -53,12 +53,12 @@ namespace smt {
|
|||
bool m_can_propagate;
|
||||
bool m_normalize;
|
||||
rational m_den; // lcm of denominators for rational weights.
|
||||
svector<bool> m_assigned, m_enabled;
|
||||
bool_vector m_assigned, m_enabled;
|
||||
stats m_stats;
|
||||
public:
|
||||
theory_wmaxsat(ast_manager& m, generic_model_converter& mc);
|
||||
~theory_wmaxsat() override;
|
||||
void get_assignment(svector<bool>& result);
|
||||
void get_assignment(bool_vector& result);
|
||||
expr* assert_weighted(expr* fml, rational const& w);
|
||||
void disable_var(expr* var);
|
||||
bool_var register_var(app* var, bool attach);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue