3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-08 17:01:55 +00:00

fix format bug (issue 126) and smaller nits in sat solver (const annotation, disable elimination of external or already elimianted variables)

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-10-04 18:35:18 -07:00
parent fbb01f3699
commit 6a3f75822d
12 changed files with 22 additions and 17 deletions

View file

@ -918,7 +918,11 @@ namespace sat {
void process(literal l) {
TRACE("blocked_clause", tout << "processing: " << l << "\n";);
model_converter::entry * new_entry = 0;
if (s.is_external(l.var()) || s.was_eliminated(l.var()))
return;
{
m_to_remove.reset();
{
clause_use_list & occs = s.m_use_list.get(l);
@ -1339,6 +1343,7 @@ namespace sat {
}
TRACE("resolution", tout << "found var to eliminate, before: " << before_clauses << " after: " << after_clauses << "\n";);
// eliminate variable
model_converter::entry & mc_entry = s.m_mc.mk(model_converter::ELIM_VAR, v);
save_clauses(mc_entry, m_pos_cls);
@ -1421,6 +1426,7 @@ namespace sat {
};
void simplifier::elim_vars() {
IF_VERBOSE(10, s.display(verbose_stream()););
elim_var_report rpt(*this);
bool_var_vector vars;
order_vars_for_elim(vars);
@ -1466,7 +1472,7 @@ namespace sat {
sat_simplifier_params::collect_param_descrs(r);
}
void simplifier::collect_statistics(statistics & st) {
void simplifier::collect_statistics(statistics & st) const {
st.update("subsumed", m_num_subsumed);
st.update("subsumption resolution", m_num_sub_res);
st.update("elim literals", m_num_elim_lits);