3#include "containers/ClauseBuffer.hpp"
4#include "containers/ClauseDatabase.hpp"
5#include "containers/ClauseUtils.hpp"
6#include "utils/Threading.hpp"
9#include <unordered_map>
11#include "KissatFamily.hpp"
12#include "SolverCdclInterface.hpp"
19#include "kissat-inc/src/kissat.h"
23typedef struct kissat kissat_mab;
30 void setBumpVar(
int v);
42 void setPhase(
const unsigned int var,
const bool phase);
60 void addClauses(
const std::vector<ClauseExchangePtr>& clauses);
63 void addInitialClauses(
const std::vector<simpleClause>& clauses,
unsigned int nbVars)
override;
69 void importClauses(
const std::vector<ClauseExchangePtr>& clauses)
override;
76 void setFamily(KissatFamily family) { this->family = family; };
82 void diversify(
const SeedGenerator& getSeed)
override;
110 friend char KissatIncExportClause(
void*, kissat*);
Wrapper for boost::lockfree::queue to manage ClauseExchange objects.
Definition ClauseBuffer.hpp:26
Instance of a KissatINCSolver solver.
Definition KissatINCSolver.hpp:28
void unsetSolverInterrupt()
Remove the SAT solving interrupt request.
virtual ~KissatINCSolver()
Destructor.
void bumpVariableActivity(const int var, const int times)
Bump activity of a given variable.
void diversify(const SeedGenerator &getSeed) override
Native diversification.
friend char KissatIncImportClause(void *, kissat *)
Callback to export/import clauses used by real kissat.
void printWinningLog() override
Print the winning log.
void setPhase(const unsigned int var, const bool phase)
Set initial phase for a given variable.
std::vector< int > getSatAssumptions()
Get current assumptions.
void importClauses(const std::vector< ClauseExchangePtr > &clauses) override
Add a list of learned clauses to the formula.
std::atomic< bool > stopSolver
Used to stop or continue the resolution.
Definition KissatINCSolver.hpp:106
void addClauses(const std::vector< ClauseExchangePtr > &clauses)
Add a list of permanent clauses to the formula.
void loadFormula(const char *filename)
Load formula from a given dimacs file, return false if failed.
void printStatistics()
Get solver statistics.
std::vector< int > getModel()
Return the model in case of SAT result.
kissat_mab * solver
Pointer to a KissatINCSolver solver.
Definition KissatINCSolver.hpp:98
void addInitialClauses(const std::vector< simpleClause > &clauses, unsigned int nbVars) override
Add a list of initial clauses to the formula.
bool importClause(const ClauseExchangePtr &clause) override
Add a learned clause to the formula.
unsigned int getVariablesCount()
Get the number of variables of the current resolution.
ClauseBuffer clausesToAdd
Buffer used to add permanent clauses.
Definition KissatINCSolver.hpp:103
void addClause(ClauseExchangePtr clause)
Add a permanent clause to the formula.
KissatINCSolver(int id, const std::shared_ptr< ClauseDatabase > &clauseDB)
Constructor.
SatResult solve(const std::vector< int > &cube)
Solve the formula with a given cube.
std::vector< int > getFinalAnalysis()
Get the final analysis in case of UNSAT result.
int getDivisionVariable()
Get a variable suitable for search splitting.
void setSolverInterrupt()
Interrupt resolution, solving cannot continue until interrupt is unset.
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