Skip to content

Expose MiniSAT's interrupt() #1750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/solvers/sat/satcheck_minisat2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ void satcheck_minisat2_baset<T>::set_polarity(literalt a, bool value)
}
}

template<typename T>
void satcheck_minisat2_baset<T>::interrupt()
{
solver->interrupt();
}

template<typename T>
void satcheck_minisat2_baset<T>::clear_interrupt()
{
solver->clearInterrupt();
}

const std::string satcheck_minisat_no_simplifiert::solver_text()
{
return "MiniSAT 2.2.1 without simplifier";
Expand Down
6 changes: 6 additions & 0 deletions src/solvers/sat/satcheck_minisat2.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class satcheck_minisat2_baset:public cnf_solvert
// extra MiniSat feature: default branching decision
void set_polarity(literalt a, bool value);

// extra MiniSat feature: interrupt running SAT query
void interrupt();

// extra MiniSat feature: permit previously interrupted SAT query to continue
void clear_interrupt();

virtual bool is_in_conflict(literalt a) const override;
virtual bool has_set_assumptions() const final { return true; }
virtual bool has_is_in_conflict() const final { return true; }
Expand Down