diff --git a/src/model/model_evaluator.cpp b/src/model/model_evaluator.cpp index 61bf8df96..415b162b4 100644 --- a/src/model/model_evaluator.cpp +++ b/src/model/model_evaluator.cpp @@ -202,7 +202,8 @@ struct evaluator_cfg : public default_rewriter_cfg { return BR_REWRITE1; } } - if (st == BR_FAILED && num == 0 && m_ar.is_as_array(f)) { +#if 0 + if (st == BR_FAILED && num == 0 && m_ar.is_as_array(f) && m_model_completion) { func_decl* g = nullptr; VERIFY(m_ar.is_as_array(f, g)); expr* def = nullptr; @@ -221,6 +222,7 @@ struct evaluator_cfg : public default_rewriter_cfg { return BR_DONE; } } +#endif CTRACE("model_evaluator", st != BR_FAILED, tout << result << "\n";); return st; diff --git a/src/sat/sat_asymm_branch.cpp b/src/sat/sat_asymm_branch.cpp index 60362363c..d3f7b78a0 100644 --- a/src/sat/sat_asymm_branch.cpp +++ b/src/sat/sat_asymm_branch.cpp @@ -44,26 +44,32 @@ namespace sat { unsigned m_elim_literals; unsigned m_elim_learned_literals; unsigned m_tr; + unsigned m_units; report(asymm_branch & a): m_asymm_branch(a), m_elim_literals(a.m_elim_literals), - m_elim_learned_literals(a.m_elim_learned_literals), - m_tr(a.m_tr) { + m_elim_learned_literals(a.m_elim_learned_literals), + m_tr(a.m_tr), + m_units(a.s.init_trail_size()) { m_watch.start(); } ~report() { m_watch.stop(); - IF_VERBOSE(SAT_VB_LVL, + IF_VERBOSE(2, unsigned num_learned = (m_asymm_branch.m_elim_learned_literals - m_elim_learned_literals); unsigned num_total = (m_asymm_branch.m_elim_literals - m_elim_literals); - verbose_stream() - << " (sat-asymm-branch :elim-literals " << (num_total - num_learned) - << " :elim-learned-literals " << num_learned - << " :hte " << (m_asymm_branch.m_tr - m_tr) - << " :cost " << m_asymm_branch.m_counter - << mem_stat() - << " :time " << std::fixed << std::setprecision(2) << m_watch.get_seconds() << ")\n";); + unsigned num_units = (m_asymm_branch.s.init_trail_size() - m_units); + unsigned elim_lits = (num_total - num_learned); + unsigned tr = (m_asymm_branch.m_tr - m_tr); + verbose_stream() << " (sat-asymm-branch"; + if (elim_lits > 0) verbose_stream() << " :elim-literals " << elim_lits; + if (num_learned > 0) verbose_stream() << " :elim-learned-literals " << num_learned; + if (num_units > 0) verbose_stream() << " :units " << num_units; + if (tr > 0) verbose_stream() << " :hte " << tr; + verbose_stream() << " :cost " << m_asymm_branch.m_counter; + verbose_stream() << mem_stat(); + verbose_stream() << m_watch << ")\n";); } }; @@ -84,11 +90,11 @@ namespace sat { if (s.m_inconsistent) break; unsigned num_elim = m_elim_literals + m_tr - elim; - IF_VERBOSE(2, verbose_stream() << "(sat-asymm-branch-step :elim " << num_elim << ")\n";); + IF_VERBOSE(4, verbose_stream() << "(sat-asymm-branch-step :elim " << num_elim << ")\n";); if (num_elim == 0) break; } - IF_VERBOSE(2, if (m_elim_learned_literals > eliml0) + IF_VERBOSE(4, if (m_elim_learned_literals > eliml0) verbose_stream() << "(sat-asymm-branch :elim " << m_elim_learned_literals - eliml0 << ")\n";); return m_elim_literals > elim0; } @@ -98,7 +104,7 @@ namespace sat { unsigned elim = m_elim_literals; process(nullptr, s.m_clauses); s.propagate(false); - IF_VERBOSE(2, if (m_elim_learned_literals > eliml0) + IF_VERBOSE(4, if (m_elim_learned_literals > eliml0) verbose_stream() << "(sat-asymm-branch :elim " << m_elim_learned_literals - eliml0 << ")\n";); return m_elim_literals > elim; } diff --git a/src/sat/sat_cleaner.cpp b/src/sat/sat_cleaner.cpp index 728931f15..d8181a8e0 100644 --- a/src/sat/sat_cleaner.cpp +++ b/src/sat/sat_cleaner.cpp @@ -165,12 +165,11 @@ namespace sat { } ~report() { m_watch.stop(); - IF_VERBOSE(SAT_VB_LVL, - verbose_stream() << " (sat-cleaner :elim-literals " << (m_cleaner.m_elim_literals - m_elim_literals) - << " :elim-clauses " << (m_cleaner.m_elim_clauses - m_elim_clauses) - << " :cost " << m_cleaner.m_cleanup_counter - << mk_stat(m_cleaner.s) - << " :time " << std::fixed << std::setprecision(2) << m_watch.get_seconds() << ")\n";); + IF_VERBOSE(2, + verbose_stream() << " (sat-cleaner"; + verbose_stream() << " :elim-literals " << (m_cleaner.m_elim_literals - m_elim_literals); + verbose_stream() << " :elim-clauses " << (m_cleaner.m_elim_clauses - m_elim_clauses); + verbose_stream() << " :cost " << m_cleaner.m_cleanup_counter << m_watch << ")\n";); } }; diff --git a/src/sat/sat_config.cpp b/src/sat/sat_config.cpp index 6e415e7f3..57adf5132 100644 --- a/src/sat/sat_config.cpp +++ b/src/sat/sat_config.cpp @@ -130,9 +130,9 @@ namespace sat { } // These parameters are not exposed - m_next_simplify1 = _p.get_uint("next_simplify", 30000); + m_next_simplify1 = _p.get_uint("next_simplify", 90000); m_simplify_mult2 = _p.get_double("simplify_mult2", 1.5); - m_simplify_max = _p.get_uint("simplify_max", 500000); + m_simplify_max = _p.get_uint("simplify_max", 1000000); // -------------------------------- m_simplify_delay = p.simplify_delay(); diff --git a/src/sat/sat_elim_vars.cpp b/src/sat/sat_elim_vars.cpp index 299fbace1..4b475a181 100644 --- a/src/sat/sat_elim_vars.cpp +++ b/src/sat/sat_elim_vars.cpp @@ -167,7 +167,6 @@ namespace sat{ if (simp.cleanup_clause(c)) return; - if (v0 == 39063) IF_VERBOSE(0, verbose_stream() << "bdd: " << c << "\n"); switch (c.size()) { case 0: s.set_conflict(justification()); diff --git a/src/sat/sat_probing.cpp b/src/sat/sat_probing.cpp index 15d8e8e7e..54c1ee23d 100644 --- a/src/sat/sat_probing.cpp +++ b/src/sat/sat_probing.cpp @@ -176,7 +176,7 @@ namespace sat { struct probing::report { probing & m_probing; stopwatch m_watch; - unsigned m_num_assigned; + unsigned m_num_assigned; report(probing & p): m_probing(p), m_num_assigned(p.m_num_assigned) { @@ -185,12 +185,13 @@ namespace sat { ~report() { m_watch.stop(); - IF_VERBOSE(SAT_VB_LVL, - verbose_stream() << " (sat-probing :probing-assigned " - << (m_probing.m_num_assigned - m_num_assigned) - << " :cost " << m_probing.m_counter; + unsigned units = (m_probing.m_num_assigned - m_num_assigned); + IF_VERBOSE(2, + verbose_stream() << " (sat-probing"; + if (units > 0) verbose_stream() << " :probing-assigned " << units; + verbose_stream() << " :cost " << m_probing.m_counter; if (m_probing.m_stopped_at != 0) verbose_stream() << " :stopped-at " << m_probing.m_stopped_at; - verbose_stream() << mem_stat() << " :time " << std::fixed << std::setprecision(2) << m_watch.get_seconds() << ")\n";); + verbose_stream() << mem_stat() << m_watch << ")\n";); } }; diff --git a/src/sat/sat_scc.cpp b/src/sat/sat_scc.cpp index 52641736a..79c599609 100644 --- a/src/sat/sat_scc.cpp +++ b/src/sat/sat_scc.cpp @@ -56,11 +56,10 @@ namespace sat { ~report() { m_watch.stop(); unsigned elim_bin = m_scc.m_num_elim_bin - m_num_elim_bin; - IF_VERBOSE(SAT_VB_LVL, + IF_VERBOSE(2, verbose_stream() << " (sat-scc :elim-vars " << (m_scc.m_num_elim - m_num_elim); if (elim_bin > 0) verbose_stream() << " :elim-bin " << elim_bin; - verbose_stream() << mk_stat(m_scc.m_solver) - << " :time " << std::fixed << std::setprecision(2) << m_watch.get_seconds() << ")\n";); + verbose_stream() << m_watch << ")\n";); } }; diff --git a/src/sat/sat_solver.cpp b/src/sat/sat_solver.cpp index 00ce093be..7f2fcb45d 100644 --- a/src/sat/sat_solver.cpp +++ b/src/sat/sat_solver.cpp @@ -1721,7 +1721,6 @@ namespace sat { m_next_simplify = m_conflicts_since_init + m_config.m_simplify_max; } - if (m_par) m_par->set_phase(*this); #if 0 @@ -1962,7 +1961,7 @@ namespace sat { m_restart_next_out = 1; } else { - m_restart_next_out = (3*m_restart_next_out)/2 + 1; + m_restart_next_out = std::min(m_conflicts_since_init + 50000, (3*m_restart_next_out)/2 + 1); } log_stats(); } diff --git a/src/sat/sat_types.h b/src/sat/sat_types.h index 7710d62d2..cbe0cab4c 100644 --- a/src/sat/sat_types.h +++ b/src/sat/sat_types.h @@ -26,6 +26,7 @@ Revision History: #include "util/common_msgs.h" #include "util/vector.h" #include "util/uint_set.h" +#include "util/stopwatch.h" #include namespace sat { @@ -223,6 +224,10 @@ namespace sat { return out << std::fixed << std::setprecision(2) << mem; } + inline std::ostream& operator<<(std::ostream& out, stopwatch const& sw) { + return out << " :time " << std::fixed << std::setprecision(2) << sw.get_seconds(); + } + struct dimacs_lit { literal m_lit; dimacs_lit(literal l):m_lit(l) {}