3#include "containers/ClauseBuffer.hpp"
4#include "containers/ClauseDatabase.hpp"
5#include "utils/Threading.hpp"
7#include "SolverCdclInterface.hpp"
29namespace MapleCOMSPS {
48 void setPhase(
const unsigned int var,
const bool phase);
66 void addClauses(
const std::vector<ClauseExchangePtr>& clauses);
69 void addInitialClauses(
const std::vector<simpleClause>& clauses,
unsigned int nbVars)
override;
105 void setStrengthening(
bool b);
109 void initshuffle(
int id) {};
Wrapper for boost::lockfree::queue to manage ClauseExchange objects.
Definition ClauseBuffer.hpp:26
Instance of a MapleCOMSPS solver.
Definition MapleCOMSPSSolver.hpp:39
void bumpVariableActivity(const int var, const int times)
Bump activity of a given variable.
int getDivisionVariable()
Get a variable suitable for search splitting.
void setPhase(const unsigned int var, const bool phase)
Set initial phase for a given variable.
void addClauses(const std::vector< ClauseExchangePtr > &clauses)
Add a list of permanent clauses to the formula.
void addInitialClauses(const std::vector< simpleClause > &clauses, unsigned int nbVars) override
Add a list of initial clauses to the formula.
MapleCOMSPSSolver(const MapleCOMSPSSolver &other, int id, const std::shared_ptr< ClauseDatabase > &clauseDB)
Copy constructor.
void printWinningLog() override
Print the winning log.
void loadFormula(const char *filename) override
Load formula from a given dimacs file, return false if failed.
void importClauses(const std::vector< ClauseExchangePtr > &clauses)
Add a list of learned clauses to the formula.
std::unique_ptr< ClauseDatabase > unitsToImport
Buffer used to import clauses (units included).
Definition MapleCOMSPSSolver.hpp:117
std::atomic< bool > stopSolver
Used to stop or continue the resolution.
Definition MapleCOMSPSSolver.hpp:123
ClauseBuffer clausesToAdd
Buffer used to add permanent clauses.
Definition MapleCOMSPSSolver.hpp:120
void setSolverInterrupt()
Interrupt resolution, solving cannot continue until interrupt is unset.
void unsetSolverInterrupt()
Remove the SAT solving interrupt request.
unsigned int getVariablesCount()
Get the number of variables of the current resolution.
friend MapleCOMSPS::Lit cbkMapleCOMSPSImportUnit(void *)
Callback to export/import clauses.
void addClause(ClauseExchangePtr clause)
Add a permanent clause to the formula.
MapleCOMSPSSolver(int id, const std::shared_ptr< ClauseDatabase > &clauseDB)
Constructor.
void printStatistics()
Get solver statistics.
std::vector< int > getFinalAnalysis()
Get the final analysis in case of UNSAT result.
virtual ~MapleCOMSPSSolver()
Destructor.
std::vector< int > getModel()
Return the model in case of SAT result.
SatResult solve(const std::vector< int > &cube)
Solve the formula with a given cube.
bool importClause(const ClauseExchangePtr &clause)
Add a learned clause to the formula.
MapleCOMSPS::SimpSolver * solver
Pointer to a MapleCOMSPS solver.
Definition MapleCOMSPSSolver.hpp:113
std::vector< int > getSatAssumptions()
Get current assumptions.
void diversify(const SeedGenerator &getSeed)
Native diversification.
Definition MapleCOMSPSSolver.hpp:33
Interface for CDCL (Conflict-Driven Clause Learning) solvers This class provides a common interface f...
Definition SolverCdclInterface.hpp:58
SatResult
Enumeration for SAT solver results.
Definition SolverInterface.hpp:39
Definition MapleCOMSPSSolver.hpp:15