53 for ( i = 0; i < (int)pC->
size; i++ )
56 fprintf( pFile,
"0" );
57 fprintf( pFile,
"\n" );
80 for ( i = 0; i < p->
size; i++ )
85 pFile = fopen( pFileName,
"wb" );
88 printf(
"Sat_SolverWriteDimacs(): Cannot open the ouput file.\n" );
103 for ( i = 0; i < p->
size; i++ )
105 fprintf( pFile,
"%s%d%s\n",
107 i + (
int)(incrementVars>0),
108 (incrementVars) ?
" 0" :
"");
112 for (; assumpBegin != assumpEnd; assumpBegin++) {
113 fprintf( pFile,
"%s%d%s\n",
115 lit_var(*assumpBegin) + (
int)(incrementVars>0),
116 (incrementVars) ?
" 0" :
"");
120 fprintf( pFile,
"\n" );
132 for ( i = 0; i < p->
size; i++ )
137 pFile = fopen( pFileName,
"wb" );
140 printf(
"Sat_SolverWriteDimacs(): Cannot open the ouput file.\n" );
155 for ( i = 0; i < p->
size; i++ )
157 fprintf( pFile,
"%s%d%s\n",
159 i + (
int)(incrementVars>0),
160 (incrementVars) ?
" 0" :
"");
164 for (; assumpBegin != assumpEnd; assumpBegin++) {
165 fprintf( pFile,
"%s%d%s\n",
167 lit_var(*assumpBegin) + (
int)(incrementVars>0),
168 (incrementVars) ?
" 0" :
"");
172 fprintf( pFile,
"\n" );
243 Mem += (
sizeof(s->
activity[0]) == 4) ?
sizeof(unsigned) :
sizeof(
double);
244 Mem += 2 *
sizeof(
veci);
271 for ( i = 0; i <
nVars; i++ )
292 for ( i = 0; i <
nVars; i++ )
#define Sat_MemForEachClause2(p, c, i, k)
static int lit_var(lit l)
void Sat_SolverDoubleClauses(sat_solver *p, int iVar)
static ABC_NAMESPACE_IMPL_START void Sat_SolverClauseWriteDimacs(FILE *pFile, clause *pC, int fIncrement)
DECLARATIONS ///.
static int sat_solver2_var_value(sat_solver2 *s, int v)
static int sat_solver_var_value(sat_solver *s, int v)
void Sat_Solver2PrintStats(FILE *pFile, sat_solver2 *s)
void Sat_Solver2WriteDimacs(sat_solver2 *p, char *pFileName, lit *assumpBegin, lit *assumpEnd, int incrementVars)
#define ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_START
void Sat_SolverWriteDimacs(sat_solver *p, char *pFileName, lit *assumpBegin, lit *assumpEnd, int incrementVars)
void Sat_SolverPrintStats(FILE *pFile, sat_solver *p)
static int lit_sign(lit l)
int * Sat_Solver2GetModel(sat_solver2 *p, int *pVars, int nVars)
#define ABC_CALLOC(type, num)
#define Sat_MemForEachClause(p, c, i, k)
int Sat_Solver2GetVarMem(sat_solver2 *s)
static int Sat_MemEntryNum(Sat_Mem_t *p, int lrn)
int * Sat_SolverGetModel(sat_solver *p, int *pVars, int nVars)