346 int fUseSimpleCnf = 0;
347 int fUseOldSimulation = 0;
359 int nNodesBeg, nRegsBeg;
379 printf(
"Partitioning was disabled to allow implication writing.\n" );
383 || (pManAig->vClockDoms &&
Vec_VecSize(pManAig->vClockDoms) > 0) )
394 pPars->nFramesP = pParams->
nFramesP;
395 pPars->nFramesK = pParams->
nFramesK;
396 pPars->nMaxImps = pParams->
nMaxImps;
397 pPars->nMaxLevs = pParams->
nMaxLevs;
398 pPars->fVerbose = pParams->
fVerbose;
399 pPars->fRewrite = pParams->
fRewrite;
401 pPars->fUseImps = pParams->
fUseImps;
403 pPars->fUse1Hot = pParams->
fUse1Hot;
405 assert( !(pPars->nFramesP > 0 && pPars->fUse1Hot) );
406 assert( !(pPars->nFramesK > 1 && pPars->fUse1Hot) );
410 p->
pPars->nBTLimitNode = 0;
412 if ( fUseOldSimulation )
414 if ( pPars->nFramesP > 0 )
417 printf(
"Fra_FraigInduction(): Prefix cannot be used.\n" );
419 p->
pSml =
Fra_SmlStart( pManAig, 0, pPars->nFramesK + 1, pPars->nSimWords );
427 if ( pPars->fVerbose )
428 printf(
"Simulating %d AIG nodes for %d cycles ... ",
Aig_ManNodeNum(pManAig), pPars->nFramesP + 32 );
430 if ( pPars->fVerbose )
437 if ( p->
pPars->fUse1Hot )
441 p->
pSml =
Fra_SmlStart( pManAig, 0, pPars->nFramesK + 1, pPars->nSimWords );
445 if ( pPars->fUseImps )
448 if ( pParams->
TimeLimit != 0.0 && Abc_Clock() > TimeToStop )
451 printf(
"Fra_FraigInduction(): Runtime limit exceeded.\n" );
480 if ( pParams->
TimeLimit != 0.0 && Abc_Clock() > TimeToStop )
483 printf(
"Fra_FraigInduction(): Runtime limit exceeded.\n" );
496 if ( p->
pPars->fRewrite )
500 if ( fUseSimpleCnf || pPars->fUseImps )
510 if ( p->
pSat == NULL )
511 printf(
"Fra_FraigInduction(): Computed CNF is not valid.\n" );
512 if ( pPars->fUseImps )
515 if ( p->
pSat == NULL )
516 printf(
"Fra_FraigInduction(): Adding implicationsn to CNF led to a conflict.\n" );
529 if ( pCnf->
pVarNums[pObj->Id] == -1 )
537 if ( p->pPars->fUse1Hot )
543 if ( pPars->fVerbose )
545 printf(
"%3d : C = %6d. Cl = %6d. L = %6d. LR = %6d. ",
548 if ( p->pCla->vImps )
549 printf(
"I = %6d. ",
Vec_IntSize(p->pCla->vImps) );
550 if ( p->pPars->fUse1Hot )
557 p->nSatCallsRecent = 0;
558 p->nSatCallsSkipped = 0;
560 if ( p->pPars->fUse1Hot )
563 if ( pPars->fVerbose )
573 memset( p->pMemFraig, 0,
sizeof(
Aig_Obj_t *) * p->nSizeAlloc * p->nFramesAll );
575 assert( p->vTimeouts == NULL );
577 printf(
"Fra_FraigInduction(): SAT solver timed out!\n" );
580 if ( p->pCla->fRefinement &&
582 nImpsOld == (p->pCla->vImps?
Vec_IntSize(p->pCla->vImps) : 0) &&
585 printf(
"Fra_FraigInduction(): Internal error. The result may not verify.\n" );
605 if ( p->pPars->fWriteImps && p->vOneHots &&
Fra_OneHotCount(p, p->vOneHots) )
610 printf(
"Care one-hotness clauses will be written into file \"%s\".\n", pFileName );
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Fra_Man_t * Fra_ManStart(Aig_Man_t *pManAig, Fra_Par_t *pParams)
void Aig_ManStop(Aig_Man_t *p)
Fra_Sml_t * Fra_SmlSimulateSeq(Aig_Man_t *pAig, int nPref, int nFrames, int nWords, int fCheckMiter)
int Aig_ManSeqCleanup(Aig_Man_t *p)
int Fra_ClassesCountLits(Fra_Cla_t *p)
Aig_Man_t * Aig_ManDupOrdered(Aig_Man_t *p)
void sat_solver_delete(sat_solver *s)
static void Fra_ObjSetFaninVec(Aig_Obj_t *pObj, Vec_Ptr_t *vFanins)
Vec_Int_t * Fra_ImpDerive(Fra_Man_t *p, int nImpMaxLimit, int nImpUseLimit, int fLatchCorr)
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
void Fra_ManClean(Fra_Man_t *p, int nNodesMax)
static int Aig_ManNodeNum(Aig_Man_t *p)
void Fra_ParamsDefaultSeq(Fra_Par_t *pParams)
Vec_Int_t * Fra_OneHotCompute(Fra_Man_t *p, Fra_Sml_t *pSim)
Fra_Sml_t * Fra_SmlStart(Aig_Man_t *pAig, int nPref, int nFrames, int nWordsFrame)
char * Ioa_FileNameGenericAppend(char *pBase, char *pSuffix)
void Fra_ClassesPrepare(Fra_Cla_t *p, int fLatchCorr, int nMaxLevs)
void Fra_FraigSweep(Fra_Man_t *pManAig)
void Aig_ManReprStart(Aig_Man_t *p, int nIdMax)
DECLARATIONS ///.
static void Fra_ObjSetSatNum(Aig_Obj_t *pObj, int Num)
void Fra_BmcPerform(Fra_Man_t *p, int nPref, int nDepth)
void Fra_ImpAddToSolver(Fra_Man_t *p, Vec_Int_t *vImps, int *pSatVarNums)
void Ioa_WriteAiger(Aig_Man_t *pMan, char *pFileName, int fWriteSymbols, int fCompact)
Aig_Man_t * Aig_ManDupRepr(Aig_Man_t *p, int fOrdered)
static int Aig_ManObjNumMax(Aig_Man_t *p)
Aig_Man_t * Fra_FraigInductionPart(Aig_Man_t *pAig, Fra_Ssw_t *pPars)
ABC_NAMESPACE_IMPL_START void Fra_FraigInductionRewrite(Fra_Man_t *p)
DECLARATIONS ///.
static int Aig_ManRegNum(Aig_Man_t *p)
void Fra_SmlSimulate(Fra_Man_t *p, int fInit)
void Fra_ClassesSelectRepr(Fra_Cla_t *p)
static int Vec_IntSize(Vec_Int_t *p)
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
#define Aig_ManForEachObj(p, pObj, i)
Cnf_Dat_t * Cnf_DeriveSimple(Aig_Man_t *p, int nOutputs)
typedefABC_NAMESPACE_HEADER_START struct Fra_Par_t_ Fra_Par_t
INCLUDES ///.
void Fra_ManStop(Fra_Man_t *p)
int Fra_OneHotCount(Fra_Man_t *p, Vec_Int_t *vOneHots)
void Fra_ClassesCopyReprs(Fra_Cla_t *p, Vec_Ptr_t *vFailed)
static int Vec_VecSize(Vec_Vec_t *p)
void Cnf_DataFree(Cnf_Dat_t *p)
void Fra_OneHotCheck(Fra_Man_t *p, Vec_Int_t *vOneHots)
Aig_Man_t * Fra_OneHotCreateExdc(Fra_Man_t *p, Vec_Int_t *vOneHots)
Aig_Man_t * Fra_FramesWithClasses(Fra_Man_t *p)
void Fra_SmlStop(Fra_Sml_t *p)
void Fra_OneHotAssume(Fra_Man_t *p, Vec_Int_t *vOneHots)