Skip to content

Commit d3bf25c

Browse files
throttle value smt -> sls
1 parent d4100fc commit d3bf25c

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

src/ast/sls/sat_ddfw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ namespace sat {
430430
for (unsigned i = 0; i < num_vars(); ++i)
431431
m_model[i] = to_lbool(value(i));
432432
save_priorities();
433-
if (m_plugin && !m_in_external_flip && m_restart_count == 0)
433+
if (m_plugin && !m_in_external_flip && m_restart_count == 0 && m_model_save_count++ % 10 == 0)
434434
m_plugin->on_restart(); // import values if there are any updated ones.
435435
if (m_plugin && !m_in_external_flip)
436436
m_last_result = m_plugin->on_save_model();

src/ast/sls/sat_ddfw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ namespace sat {
9797
uint64_t m_last_flips_for_shift = 0;
9898
unsigned m_num_non_binary_clauses = 0;
9999
unsigned m_restart_count = 0, m_reinit_count = 0;
100+
unsigned m_model_save_count = 0;
100101
uint64_t m_restart_next = 0, m_reinit_next = 0;
101102
uint64_t m_flips = 0, m_last_flips = 0, m_shifts = 0;
102103
unsigned m_logs = 0;

src/ast/sls/sls_arith_base.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,8 +1571,8 @@ namespace sls {
15711571
todo.push_back(op.m_arg1);
15721572
todo.push_back(op.m_arg2);
15731573
}
1574-
if (m_vars[u].is_if_op()) {
1575-
auto const& ui = m_vars[u];
1574+
auto const& ui = m_vars[u];
1575+
if (ui.is_if_op()) {
15761576
expr* c = nullptr, * th = nullptr, * el = nullptr;
15771577
VERIFY(m.is_ite(ui.m_expr, c, th, el));
15781578
todo.push_back(mk_var(th));

src/ast/sls/sls_smt_plugin.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ namespace sls {
212212
m_sat_phase[v] = ctx.get_best_phase(v);
213213
}
214214

215-
bool smt_plugin::export_to_sls() {
215+
bool smt_plugin::export_to_sls() {
216216
bool updated = false;
217217
if (m_has_units) {
218218
std::lock_guard<std::mutex> lock(m_mutex);
@@ -274,7 +274,7 @@ namespace sls {
274274

275275
void smt_plugin::smt_values_to_sls() {
276276

277-
if (ctx.parallel_mode()) {
277+
if (true || ctx.parallel_mode()) {
278278
std::scoped_lock lock(m_mutex);
279279
m_sync_var_values.reset();
280280
for (auto const& [t, t_sync] : m_smt2sync_uninterp) {
@@ -310,9 +310,11 @@ namespace sls {
310310
void smt_plugin::sls_phase_to_smt() {
311311
if (!m_has_new_sls_phase)
312312
return;
313+
#if 0
313314
IF_VERBOSE(2, verbose_stream() << "SLS -> SMT phase. unsat size: " << m_min_unsat_size << "\n");
314315
for (auto v : m_shared_bool_vars)
315316
ctx.force_phase(sat::literal(v, !m_sls_phase[v]));
317+
#endif
316318
m_has_new_sls_phase = false;
317319
}
318320

src/sat/smt/sls_solver.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ namespace sls {
105105
m_smt_plugin->add_unit(lit);
106106
}
107107
}
108-
#if 0
109-
if (ctx.has_new_best_phase())
110-
m_smt_plugin->import_phase_from_smt();
111-
112-
#endif
113108

114109
m_smt_plugin->import_from_sls();
115110
}

0 commit comments

Comments
 (0)