mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05: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
|
@ -295,7 +295,7 @@ namespace sat {
|
|||
bool m_clause_removed;
|
||||
bool m_constraint_removed;
|
||||
literal_vector m_roots;
|
||||
svector<bool> m_root_vars;
|
||||
bool_vector m_root_vars;
|
||||
unsigned_vector m_weights;
|
||||
svector<wliteral> m_wlits;
|
||||
bool subsumes(card& c1, card& c2, literal_vector& comp);
|
||||
|
|
|
@ -742,7 +742,7 @@ namespace sat {
|
|||
* Assume only the first definition for a node is used for all cuts.
|
||||
*/
|
||||
void aig_cuts::cut2clauses(on_clause_t& on_clause, unsigned v, cut const& c) {
|
||||
svector<bool> visited(m_aig.size(), false);
|
||||
bool_vector visited(m_aig.size(), false);
|
||||
for (unsigned u : c) visited[u] = true;
|
||||
unsigned_vector todo;
|
||||
todo.push_back(v);
|
||||
|
@ -797,7 +797,7 @@ namespace sat {
|
|||
reslimit lim;
|
||||
solver s;
|
||||
unsigned_vector vars;
|
||||
svector<bool> is_var;
|
||||
bool_vector is_var;
|
||||
|
||||
validator(aig_cuts& t):t(t),s(p, lim) {
|
||||
p.set_bool("cut_simplifier", false);
|
||||
|
|
|
@ -66,12 +66,12 @@ namespace sat {
|
|||
|
||||
solver& s;
|
||||
config m_config;
|
||||
svector<bool> m_relevant;
|
||||
bool_vector m_relevant;
|
||||
stats m_stats;
|
||||
statistics m_st;
|
||||
unsigned_vector m_eval_cache;
|
||||
unsigned m_eval_ts;
|
||||
svector<bool> m_used_for_evaluation;
|
||||
bool_vector m_used_for_evaluation;
|
||||
|
||||
void clauses2anf(pdd_solver& solver);
|
||||
void anf2clauses(pdd_solver& solver);
|
||||
|
|
|
@ -170,7 +170,7 @@ namespace sat {
|
|||
CASSERT("asymm_branch", s.check_invariant());
|
||||
TRACE("asymm_branch_detail", s.display(tout););
|
||||
report rpt(*this);
|
||||
svector<bool> saved_phase(s.m_phase);
|
||||
bool_vector saved_phase(s.m_phase);
|
||||
|
||||
bool change = true;
|
||||
unsigned counter = 0;
|
||||
|
|
|
@ -43,8 +43,8 @@ namespace sat {
|
|||
svector<bclause> m_L, m_R, m_live_clauses, m_new_L;
|
||||
clause_vector m_bin_clauses;
|
||||
svector<uint64_t> m_rbits;
|
||||
svector<bool> m_marked;
|
||||
svector<bool> m_removed; // set of clauses removed (not considered in clause set during BCE)
|
||||
bool_vector m_marked;
|
||||
bool_vector m_removed; // set of clauses removed (not considered in clause set during BCE)
|
||||
|
||||
void init(use_list& ul);
|
||||
void register_clause(clause* cls);
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace sat {
|
|||
random_gen& m_rand;
|
||||
unsigned m_num_vars;
|
||||
vector<literal_vector> m_dag;
|
||||
svector<bool> m_roots;
|
||||
bool_vector m_roots;
|
||||
svector<int> m_left, m_right;
|
||||
literal_vector m_root, m_parent;
|
||||
bool m_learned;
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace sat {
|
|||
unsigned m_stopped_at;
|
||||
vector<clause_vector> m_use_list;
|
||||
unsigned m_limit1, m_limit2;
|
||||
svector<bool> m_mark, m_mark2;
|
||||
bool_vector m_mark, m_mark2;
|
||||
literal_vector m_must_candidates, m_may_candidates;
|
||||
unsigned m_state;
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace sat {
|
|||
pbcoeff(unsigned id, unsigned coeff):
|
||||
m_constraint_id(id), m_coeff(coeff) {}
|
||||
};
|
||||
typedef svector<bool> bool_vector;
|
||||
typedef bool_vector bool_vector;
|
||||
typedef svector<pbcoeff> coeff_vector;
|
||||
|
||||
|
||||
|
@ -139,7 +139,7 @@ namespace sat {
|
|||
local_search_config m_config;
|
||||
|
||||
vector<var_info> m_vars; // variables
|
||||
svector<bool> m_best_phase; // best value in round
|
||||
bool_vector m_best_phase; // best value in round
|
||||
svector<bool_var> m_units; // unit clauses
|
||||
vector<constraint> m_constraints; // all constraints
|
||||
literal_vector m_assumptions; // temporary assumptions
|
||||
|
|
|
@ -2082,7 +2082,7 @@ namespace sat {
|
|||
}
|
||||
}
|
||||
|
||||
bool lookahead::backtrack(literal_vector& trail, svector<bool> & is_decision) {
|
||||
bool lookahead::backtrack(literal_vector& trail, bool_vector & is_decision) {
|
||||
m_cube_state.m_backtracks++;
|
||||
while (inconsistent()) {
|
||||
if (trail.empty()) return false;
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace sat {
|
|||
|
||||
struct cube_state {
|
||||
bool m_first;
|
||||
svector<bool> m_is_decision;
|
||||
bool_vector m_is_decision;
|
||||
literal_vector m_cube;
|
||||
double m_freevars_threshold;
|
||||
double m_psat_threshold;
|
||||
|
@ -540,7 +540,7 @@ namespace sat {
|
|||
void assign(literal l);
|
||||
void propagated(literal l);
|
||||
bool backtrack(literal_vector& trail);
|
||||
bool backtrack(literal_vector& trail, svector<bool> & is_decision);
|
||||
bool backtrack(literal_vector& trail, bool_vector & is_decision);
|
||||
lbool search();
|
||||
void init_model();
|
||||
std::ostream& display_binary(std::ostream& out) const;
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace sat {
|
|||
clause_filter(unsigned f, clause* cp):
|
||||
m_filter(f), m_clause(cp) {}
|
||||
};
|
||||
typedef svector<bool> bool_vector;
|
||||
typedef bool_vector bool_vector;
|
||||
unsigned m_max_lut_size;
|
||||
vector<svector<clause_filter>> m_clause_filters; // index of clauses.
|
||||
uint64_t m_combination; // bit-mask of parities that have been found
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace sat {
|
|||
private:
|
||||
vector<entry> m_entries; // entries accumulated during SAT search
|
||||
unsigned m_exposed_lim; // last entry that was exposed to model converter.
|
||||
svector<bool> m_mark; // literals that are used in asserted clauses.
|
||||
bool_vector m_mark; // literals that are used in asserted clauses.
|
||||
solver const* m_solver;
|
||||
elim_stackv m_elim_stack;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace sat {
|
|||
unsigned m_size;
|
||||
unsigned m_tail;
|
||||
unsigned_vector m_heads;
|
||||
svector<bool> m_at_end;
|
||||
bool_vector m_at_end;
|
||||
void next(unsigned& index);
|
||||
unsigned get_owner(unsigned index) const { return m_vectors[index]; }
|
||||
unsigned get_length(unsigned index) const { return m_vectors[index+1]; }
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace sat {
|
|||
clause_allocator m_alloc;
|
||||
clause_vector m_clause_db;
|
||||
svector<clause_info> m_clauses;
|
||||
svector<bool> m_values, m_best_values;
|
||||
bool_vector m_values, m_best_values;
|
||||
unsigned m_best_min_unsat;
|
||||
vector<unsigned_vector> m_use_list;
|
||||
unsigned_vector m_flat_use_list;
|
||||
|
|
|
@ -1002,7 +1002,7 @@ namespace sat {
|
|||
literal_vector m_intersection; // current resolution intersection
|
||||
literal_vector m_tautology; // literals that are used in blocking tautology
|
||||
literal_vector m_new_intersection;
|
||||
svector<bool> m_in_intersection;
|
||||
bool_vector m_in_intersection;
|
||||
unsigned m_ala_qhead;
|
||||
clause_wrapper m_clause;
|
||||
unsigned m_ala_cost;
|
||||
|
|
|
@ -118,11 +118,11 @@ namespace sat {
|
|||
vector<watch_list> m_watches;
|
||||
svector<lbool> m_assignment;
|
||||
svector<justification> m_justification;
|
||||
svector<bool> m_decision;
|
||||
svector<bool> m_mark;
|
||||
svector<bool> m_lit_mark;
|
||||
svector<bool> m_eliminated;
|
||||
svector<bool> m_external;
|
||||
bool_vector m_decision;
|
||||
bool_vector m_mark;
|
||||
bool_vector m_lit_mark;
|
||||
bool_vector m_eliminated;
|
||||
bool_vector m_external;
|
||||
unsigned_vector m_touched;
|
||||
unsigned m_touch_index;
|
||||
literal_vector m_replay_assign;
|
||||
|
@ -137,9 +137,9 @@ namespace sat {
|
|||
int m_action;
|
||||
double m_step_size;
|
||||
// phase
|
||||
svector<bool> m_phase;
|
||||
svector<bool> m_best_phase;
|
||||
svector<bool> m_prev_phase;
|
||||
bool_vector m_phase;
|
||||
bool_vector m_best_phase;
|
||||
bool_vector m_prev_phase;
|
||||
svector<char> m_assigned_since_gc;
|
||||
search_state m_search_state;
|
||||
unsigned m_search_unsat_conflicts;
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace sat {
|
|||
solver& s;
|
||||
local_search m_ls;
|
||||
random_gen m_rand;
|
||||
svector<bool> m_phase;
|
||||
bool_vector m_phase;
|
||||
svector<ema> m_phase_tf;
|
||||
var_priority m_priorities;
|
||||
unsigned m_luby_index;
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace sat {
|
|||
clause_filter(unsigned f, clause* cp):
|
||||
m_filter(f), m_clause(cp) {}
|
||||
};
|
||||
typedef svector<bool> bool_vector;
|
||||
typedef bool_vector bool_vector;
|
||||
unsigned m_max_xor_size;
|
||||
vector<svector<clause_filter>> m_clause_filters; // index of clauses.
|
||||
unsigned m_combination; // bit-mask of parities that have been found
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue