Skip to content

Commit

Permalink
remove reference to tactic.h
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Dec 22, 2023
1 parent 7adb402 commit cd331b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/ast/sls/bvsls_opt_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ bvsls_opt_engine::optimization_result bvsls_opt_engine::optimize(

if (is_sat != l_true) {
do {
checkpoint();
if (!m_manager.inc())
return res;

IF_VERBOSE(1, verbose_stream() << "Satisfying... restarts left:" << (m_max_restarts - m_stats.m_restarts) << std::endl;);
is_sat = search();
Expand Down Expand Up @@ -136,7 +137,8 @@ expr_ref bvsls_opt_engine::maximize()

while (m_mpz_manager.lt(score, max_score) && check_restart(m_stats.m_moves))
{
checkpoint();
if (!m_manager.inc())
goto bailout;
m_stats.m_moves++;
m_mpz_manager.set(old_score, score);
new_const = (unsigned)-1;
Expand Down
13 changes: 6 additions & 7 deletions src/ast/sls/sls_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Module Name:
#include "ast/ast_pp.h"
#include "ast/rewriter/var_subst.h"
#include "model/model_pp.h"
#include "tactic/tactic.h"
#include "util/luby.h"

#include "params/sls_params.hpp"
Expand Down Expand Up @@ -91,14 +90,12 @@ void sls_engine::collect_statistics(statistics& st) const {
st.update("sls moves/sec", m_stats.m_moves / seconds);
}

void sls_engine::checkpoint() {
tactic::checkpoint(m_manager);
}

bool sls_engine::full_eval(model & mdl) {
model::scoped_model_completion _scm(mdl, true);
for (expr* a : m_assertions) {
checkpoint();
if (!m_manager.inc())
return false;
if (!mdl.is_true(a)) {
TRACE("sls", tout << "Evaluation: false\n";);
return false;
Expand Down Expand Up @@ -422,7 +419,8 @@ lbool sls_engine::search() {
unsigned sz = m_assertions.size();

while (check_restart(m_stats.m_moves)) {
checkpoint();
if (!m_manager.inc())
return l_undef;
m_stats.m_moves++;

// Andreas: Every base restart interval ...
Expand Down Expand Up @@ -532,7 +530,8 @@ lbool sls_engine::operator()() {
lbool res = l_undef;

do {
checkpoint();
if (!m_manager.inc())
return l_undef;

// report_tactic_progress("Searching... restarts left:", m_max_restarts - m_stats.m_restarts);
res = search();
Expand Down
1 change: 0 additions & 1 deletion src/ast/sls/sls_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class sls_engine {
unsynch_mpz_manager& get_mpz_manager() { return m_mpz_manager; }

protected:
void checkpoint();

bool what_if(func_decl * fd, const unsigned & fd_inx, const mpz & temp,
double & best_score, unsigned & best_const, mpz & best_value);
Expand Down

0 comments on commit cd331b8

Please sign in to comment.