mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
parent
26eb23c05b
commit
f1abc71c35
11 changed files with 71 additions and 68 deletions
|
@ -29,7 +29,7 @@ namespace sat {
|
|||
}
|
||||
|
||||
vector<cut_set> const& aig_cuts::operator()() {
|
||||
if (true || m_config.m_full) flush_roots();
|
||||
if (m_config.m_full) flush_roots();
|
||||
unsigned_vector node_ids = filter_valid_nodes();
|
||||
TRACE("aig_simplifier", display(tout););
|
||||
augment(node_ids);
|
||||
|
@ -412,7 +412,7 @@ namespace sat {
|
|||
}
|
||||
|
||||
bool aig_cuts::insert_aux(unsigned v, node const& n) {
|
||||
if (false && !m_config.m_full) return false;
|
||||
if (!m_config.m_full) return false;
|
||||
unsigned num_gt = 0, num_eq = 0;
|
||||
for (node const& n2 : m_aig[v]) {
|
||||
if (eq(n, n2)) return false;
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace sat {
|
|||
unsigned m_max_aux;
|
||||
unsigned m_max_insertions;
|
||||
bool m_full;
|
||||
config(): m_max_cutset_size(20), m_max_aux(5), m_max_insertions(20), m_full(false) {}
|
||||
config(): m_max_cutset_size(20), m_max_aux(5), m_max_insertions(20), m_full(true) {}
|
||||
};
|
||||
private:
|
||||
|
||||
|
|
|
@ -228,17 +228,18 @@ namespace sat {
|
|||
xf.set(on_xor);
|
||||
xf(clauses);
|
||||
|
||||
if (m_config.m_enable_lut) {
|
||||
std::function<void(uint64_t, bool_var_vector const&, bool_var)> on_lut =
|
||||
[&,this](uint64_t lut, bool_var_vector const& vars, bool_var v) {
|
||||
m_stats.m_xluts++;
|
||||
m_aig_cuts.add_cut(v, lut, vars);
|
||||
};
|
||||
lut_finder lf(s);
|
||||
lf.set(on_lut);
|
||||
lf(clauses);
|
||||
}
|
||||
|
||||
#if 0
|
||||
std::function<void(uint64_t, bool_var_vector const&, bool_var)> on_lut =
|
||||
[&,this](uint64_t lut, bool_var_vector const& vars, bool_var v) {
|
||||
m_stats.m_xluts++;
|
||||
m_aig_cuts.add_cut(v, lut, vars);
|
||||
};
|
||||
lut_finder lf(s);
|
||||
lf.set(on_lut);
|
||||
lf(clauses);
|
||||
|
||||
|
||||
statistics st;
|
||||
collect_statistics(st);
|
||||
st.display(std::cout);
|
||||
|
|
|
@ -36,6 +36,7 @@ namespace sat {
|
|||
struct config {
|
||||
bool m_enable_units; // enable learning units
|
||||
bool m_enable_dont_cares; // enable applying don't cares to LUTs
|
||||
bool m_enable_lut; // enable lut finding
|
||||
bool m_learn_implies; // learn binary clauses
|
||||
bool m_learned2aig; // add learned clauses to AIGs used by cut-set enumeration
|
||||
bool m_validate_cuts; // enable direct validation of generated cuts
|
||||
|
@ -44,11 +45,12 @@ namespace sat {
|
|||
config():
|
||||
m_enable_units(true),
|
||||
m_enable_dont_cares(true),
|
||||
m_enable_lut(false),
|
||||
m_learn_implies(false),
|
||||
m_learned2aig(true),
|
||||
m_validate_cuts(false),
|
||||
m_validate_lemmas(false),
|
||||
m_simulate_eqs(true) {}
|
||||
m_simulate_eqs(false) {}
|
||||
};
|
||||
private:
|
||||
struct report;
|
||||
|
|
|
@ -1930,7 +1930,7 @@ namespace sat {
|
|||
anf.collect_statistics(m_aux_stats);
|
||||
// TBD: throttle anf_delay based on yield
|
||||
}
|
||||
|
||||
|
||||
if (m_aig_simplifier && m_simplifications > m_config.m_aig_delay && !inconsistent()) {
|
||||
(*m_aig_simplifier)();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue