47 int Fra_FraigSat(
Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit,
int nLearnedStart,
int nLearnedDelta,
int nLearnedPerce,
int fFlipBits,
int fAndOuts,
int fNewSolver,
int fVerbose )
72 printf(
"CNF stats: Vars = %6d. Clauses = %7d. Literals = %8d. ", pCnf->
nVars, pCnf->
nClauses, pCnf->
nLiterals );
128 status =
sat_solver2_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
134 else if ( status ==
l_True )
168 int status, RetValue;
184 printf(
"CNF stats: Vars = %6d. Clauses = %7d. Literals = %8d. ", pCnf->
nVars, pCnf->
nClauses, pCnf->
nLiterals );
249 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
255 else if ( status ==
l_True )
322 int nBTLimitStart = 300;
323 int nBTLimitFirst = 2;
324 int nBTLimitLast = nConfLimit;
347 RetValue =
Fra_FraigSat( pAig, (ABC_INT64_T)2*nBTLimitStart, (ABC_INT64_T)0, 0, 0, 0, 1, 0, 0, 0 );
368 pParams->nBTLimitNode = nBTLimitFirst;
369 pParams->nBTLimitMiter = nBTLimitStart;
370 pParams->fDontShowBar = 1;
372 for ( i = 0; i < 6; i++ )
394 printf(
"Fraiging (i=%d): Nodes = %6d. ", i+1,
Aig_ManNodeNum(pAig) );
420 pParams->nBTLimitNode = 8 * pParams->nBTLimitNode;
421 pParams->nBTLimitMiter = 2 * pParams->nBTLimitMiter;
425 if ( RetValue == -1 )
428 RetValue =
Fra_FraigSat( pAig, (ABC_INT64_T)nBTLimitLast, (ABC_INT64_T)0, 0, 0, 0, 1, 0, 0, 0 );
455 int i, RetValue = 1, nOutputs;
465 printf(
"Verifying part %4d (out of %4d) PI = %5d. PO = %5d. And = %6d. Lev = %4d.\r",
490 if ( RetValue == -1 )
492 printf(
"Timed out after verifying %d partitions (out of %d).\n", nOutputs,
Vec_PtrSize(vParts) );
522 printf(
"Abc_CommandAbc8Cec(): Miters have different number of PIs.\n" );
527 printf(
"Abc_CommandAbc8Cec(): Miters have different number of POs.\n" );
550 printf(
"Networks are equivalent. " );
553 else if ( RetValue == 0 )
555 printf(
"Networks are NOT EQUIVALENT. " );
560 printf(
"Networks are UNDECIDED. " );
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int sat_solver2_nclauses(sat_solver2 *s)
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Aig_Man_t * Dar_ManBalanceXor(Aig_Man_t *pAig, int fExor, int fUpdateLevel, int fVerbose)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
int Cnf_DataWriteOrClause(void *pSat, Cnf_Dat_t *pCnf)
int Aig_ManCountXors(Aig_Man_t *p)
int sat_solver_solve(sat_solver *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
void sat_solver2_delete(sat_solver2 *s)
void sat_solver_delete(sat_solver *s)
void Cnf_DataTranformPolarity(Cnf_Dat_t *pCnf, int fTransformPos)
#define ABC_ALLOC(type, num)
ABC_NAMESPACE_IMPL_START int Fra_FraigSat(Aig_Man_t *pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int nLearnedStart, int nLearnedDelta, int nLearnedPerce, int fFlipBits, int fAndOuts, int fNewSolver, int fVerbose)
DECLARATIONS ///.
void Sat_Solver2PrintStats(FILE *pFile, sat_solver2 *p)
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
ABC_NAMESPACE_IMPL_START Aig_Man_t * Dar_ManRwsat(Aig_Man_t *pAig, int fBalance, int fVerbose)
DECLARATIONS ///.
static int Aig_ManNodeNum(Aig_Man_t *p)
int Fra_FraigCecPartitioned(Aig_Man_t *pMan1, Aig_Man_t *pMan2, int nConfLimit, int nPartSize, int fSmart, int fVerbose)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static int Aig_ManCoNum(Aig_Man_t *p)
void * Cnf_DataWriteIntoSolver2(Cnf_Dat_t *p, int nFrames, int fInit)
void Fra_ParamsDefault(Fra_Par_t *pParams)
DECLARATIONS ///.
#define Aig_ManForEachNode(p, pObj, i)
int sat_solver2_simplify(sat_solver2 *s)
Vec_Int_t * Cnf_DataCollectPiSatNums(Cnf_Dat_t *pCnf, Aig_Man_t *p)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
Aig_Man_t * Dar_ManRewriteDefault(Aig_Man_t *pAig)
DECLARATIONS ///.
int Fra_FraigCec(Aig_Man_t **ppAig, int nConfLimit, int fVerbose)
int Aig_ObjRecognizeExor(Aig_Obj_t *pObj, Aig_Obj_t **ppFan0, Aig_Obj_t **ppFan1)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
int Cnf_DataWriteAndClauses(void *p, Cnf_Dat_t *pCnf)
#define ABC_NAMESPACE_IMPL_START
int Fra_FraigCecTop(Aig_Man_t *pMan1, Aig_Man_t *pMan2, int nConfLimit, int nPartSize, int fSmart, int fVerbose)
int Aig_ManLevelNum(Aig_Man_t *p)
int Cnf_DataWriteOrClause2(void *p, Cnf_Dat_t *pCnf)
static int Aig_ManRegNum(Aig_Man_t *p)
int sat_solver_simplify(sat_solver *s)
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
typedefABC_NAMESPACE_HEADER_START struct Fra_Par_t_ Fra_Par_t
INCLUDES ///.
static int sat_solver2_nvars(sat_solver2 *s)
int Aig_ObjIsMuxType(Aig_Obj_t *pObj)
Aig_Man_t * Fra_FraigPerform(Aig_Man_t *pManAig, Fra_Par_t *pPars)
void Cnf_DataFree(Cnf_Dat_t *p)
int sat_solver2_solve(sat_solver2 *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
int * Sat_Solver2GetModel(sat_solver2 *p, int *pVars, int nVars)
Vec_Ptr_t * Aig_ManMiterPartitioned(Aig_Man_t *p1, Aig_Man_t *p2, int nPartSize, int fSmart)
void Sat_SolverPrintStats(FILE *pFile, sat_solver *p)
int Fra_FraigMiterStatus(Aig_Man_t *p)
DECLARATIONS ///.
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
int * Sat_SolverGetModel(sat_solver *p, int *pVars, int nVars)
static void Vec_PtrFree(Vec_Ptr_t *p)