ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
eSLIM::KissatSolver Class Reference

#include <satInterfaces.hpp>

Public Member Functions

 KissatSolver ()
 
 ~KissatSolver ()
 
void init (int max_var)
 
void addClause (int *pLits, int nLits)
 
int solve ()
 
Vec_Int_tgetModelVec ()
 

Detailed Description

Definition at line 63 of file satInterfaces.hpp.

Constructor & Destructor Documentation

◆ KissatSolver()

eSLIM::KissatSolver::KissatSolver ( )
inline

Definition at line 147 of file satInterfaces.hpp.

147 {
148 solver = kissat_init();
149 }
kissat * kissat_init(void)
Definition internal.c:27
Here is the call graph for this function:

◆ ~KissatSolver()

eSLIM::KissatSolver::~KissatSolver ( )
inline

Definition at line 151 of file satInterfaces.hpp.

151 {
152 kissat_release(solver);
153 }
void kissat_release(kissat *solver)
Definition internal.c:81
Here is the call graph for this function:

Member Function Documentation

◆ addClause()

void eSLIM::KissatSolver::addClause ( int * pLits,
int nLits )
inline

Definition at line 160 of file satInterfaces.hpp.

160 {
161 for ( int i = 0; i < nLits; i++ ) {
162 if (pLits[i] == 0) {
163 continue;
164 }
165 kissat_add (solver, Abc_LitIsCompl(pLits[i]) ? -Abc_Lit2Var(pLits[i]) : Abc_Lit2Var(pLits[i]));
166 }
167 kissat_add (solver, 0);
168 }
void kissat_add(kissat *solver, int elit)
Definition internal.c:268
Here is the call graph for this function:

◆ getModelVec()

Vec_Int_t * eSLIM::KissatSolver::getModelVec ( )
inline

Definition at line 185 of file satInterfaces.hpp.

185 {
186 Vec_Int_t* assignment = Vec_IntAlloc( max_var );
187 for (int v = 1; v <= max_var; v++) {
188 Vec_IntSetEntryFull( assignment, Abc_AbsInt(val(v)), val(v) > 0 );
189 }
190 return assignment;
191 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37

◆ init()

void eSLIM::KissatSolver::init ( int max_var)
inline

Definition at line 155 of file satInterfaces.hpp.

155 {
156 this->max_var = max_var;
157 kissat_reserve(solver, max_var);
158 }
void kissat_reserve(kissat *solver, int max_var)
Definition internal.c:169
Here is the call graph for this function:

◆ solve()

int eSLIM::KissatSolver::solve ( )
inline

Definition at line 170 of file satInterfaces.hpp.

170 {
171 int status = kissat_solve(solver);
172 return status;
173 }
int kissat_solve(kissat *solver)
Definition internal.c:477
Here is the call graph for this function:

The documentation for this class was generated from the following file: