3#include "SolverCdclInterface.hpp"
4#include "containers/ClauseBuffer.hpp"
5#include "containers/ClauseDatabase.hpp"
6#include "containers/ClauseUtils.hpp"
7#include "utils/Threading.hpp"
35 void setPhase(
const unsigned int var,
const bool phase);
53 void addClauses(
const std::vector<ClauseExchangePtr>& clauses);
56 void addInitialClauses(
const std::vector<simpleClause>& clauses,
unsigned int nbVars)
override;
73 void diversify(
const SeedGenerator& getSeed)
override;
75 void getHeuristicData(std::vector<int>** flipActivity,
76 std::vector<int>** nbPropagations,
77 std::vector<int>** nbDecisionVar);
79 void setHeuristicData(std::vector<int>* flipActivity,
80 std::vector<int>* nbPropagations,
81 std::vector<int>* nbDecisionVar);
89 const std::shared_ptr<ClauseDatabase>& clauseDB);
94 const std::shared_ptr<ClauseDatabase>& clauseDB);
Wrapper for boost::lockfree::queue to manage ClauseExchange objects.
Definition ClauseBuffer.hpp:26
Instance of a Glucose solver.
Definition GlucoseSyrup.hpp:23
std::vector< int > getFinalAnalysis()
Get the final analysis in case of UNSAT result.
ClauseBuffer clausesToAdd
Buffer used to add permanent clauses.
Definition GlucoseSyrup.hpp:107
void setSolverInterrupt()
Interrupt resolution, solving cannot continue until interrupt is unset.
friend void glucoseExportClause(void *, Glucose::Clause &)
Callback to export clauses.
friend bool glucoseImportClause(void *, int *, Glucose::vec< Glucose::Lit > &)
Callback to import clauses.
virtual ~GlucoseSyrup()
Destructor.
void addInitialClauses(const std::vector< simpleClause > &clauses, unsigned int nbVars) override
Add a list of initial clauses to the formula.
friend Glucose::Lit glucoseImportUnary(void *)
Callback to import unit clauses.
void addClauses(const std::vector< ClauseExchangePtr > &clauses)
Add a list of permanent clauses to the formula.
void unsetSolverInterrupt()
Remove the SAT solving interrupt request.
void printWinningLog() override
Print the winning log.
void printStatistics()
Get solver statistics.
std::vector< int > getModel()
Return the model in case of SAT result.
void bumpVariableActivity(const int var, const int times)
Bump activity of a given variable.
std::unique_ptr< ClauseDatabase > unitsToImport
Database used to import units. (TODO use a lockfree queue as in lingeling)
Definition GlucoseSyrup.hpp:104
std::vector< int > getSatAssumptions()
Get current assumptions.
GlucoseSyrup(int id, const std::shared_ptr< ClauseDatabase > &clauseDB)
Constructor.
int getDivisionVariable()
Get a variable suitable for search splitting.
friend void glucoseExportUnary(void *, Glucose::Lit &)
Callback to export unit clauses.
unsigned int getVariablesCount()
Get the number of variables of the current resolution.
void importClauses(const std::vector< ClauseExchangePtr > &clauses)
Add a list of learned clauses to the formula.
void setPhase(const unsigned int var, const bool phase)
Set initial phase for a given variable.
SatResult solve(const std::vector< int > &cube)
Solve the formula with a given cube.
void addClause(ClauseExchangePtr clause)
Add a permanent clause to the formula.
GlucoseSyrup(const GlucoseSyrup &other, int id, const std::shared_ptr< ClauseDatabase > &clauseDB)
Copy constructor.
void diversify(const SeedGenerator &getSeed) override
Native diversification.
bool importClause(const ClauseExchangePtr &clause)
Add a learned clause to the formula.
void loadFormula(const char *filename)
Load formula from a given dimacs file, return false if failed.
Glucose::ParallelSolver * solver
Pointer to a Glucose solver.
Definition GlucoseSyrup.hpp:101
Definition GlucoseSyrup.hpp:16
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