90 printf(
"Saig_ManCexRemap(): The initial counter-example is invalid.\n" );
95 pCex->iFrame = pCexAbs->iFrame;
96 pCex->iPo = pCexAbs->iPo;
98 for ( f = 0; f <= pCexAbs->iFrame; f++ )
104 if (
Abc_InfoHasBit( pCexAbs->pData, pCexAbs->nRegs + pCexAbs->nPis * f + i ) )
111 printf(
"Saig_ManCexRemap(): Counter-example is invalid.\n" );
117 Abc_Print( 1,
"Counter-example verification is successful.\n" );
118 Abc_Print( 1,
"Output %d of miter \"%s\" was asserted in frame %d. \n", pCex->iPo, p->pName, pCex->iFrame );
138 assert( pAbs->vCiNumsOrig != NULL );
158 Aig_Man_t *
Saig_ManCexRefine(
Aig_Man_t *
p,
Aig_Man_t * pAbs,
Vec_Int_t * vFlops,
int nFrames,
int nConfMaxOne,
int fUseBdds,
int fUseDprove,
int fVerbose,
int * pnUseStart,
int * piRetValue,
int * pnFrames )
161 int i, Entry, RetValue;
174 pPars->nTimeOut = 10;
175 pPars->fVerbose = fVerbose;
176 if ( pPars->fVerbose )
177 printf(
"Running property directed reachability...\n" );
179 if ( pAbsOrpos->pSeqModel )
181 pAbs->pSeqModel = pAbsOrpos->pSeqModel;
182 pAbsOrpos->pSeqModel = NULL;
206 Saig_BmcPerform( pAbs, pnUseStart? *pnUseStart: 0, nFrames, 2000, 0, nConfMaxOne, 0, fVerbose, 0, pnFrames, 0 );
208 if ( pAbs->pSeqModel == NULL )
211 *pnUseStart = pAbs->pSeqModel->iFrame;
214 if ( vFlopsNew == NULL )
218 printf(
"Discovered a true counter-example!\n" );
267 if ( vFlopsNew == NULL )
274 printf(
"Refinement did not happen. Discovered a true counter-example.\n" );
288 if ( nFfToAddMax > 0 &&
Vec_IntSize(vFlopsNew) > nFfToAddMax )
297 printf(
"Filtering flops based on cost (%d -> %d).\n",
Vec_IntSize(vFlopsNew),
Vec_IntSize(vFlopsNewBest) );
300 vFlopsNew = vFlopsNewBest;
378 printf(
"Gia_ManCexAbstractionRefine(): Abstraction latch map is missing.\n" );
385 pGia->
pCexSeq = pNew->pSeqModel; pNew->pSeqModel = NULL;
417 printf(
"Performing counter-example-based refinement.\n" );
433 printf(
"Refining abstraction...\n" );
434 for ( Iter = 0; ; Iter++ )
436 pTemp =
Saig_ManCexRefine( p, pAbs, vFlops, pPars->
nFramesBmc, pPars->
nConfMaxBmc, pPars->
fUseBdds, pPars->
fUseDprove, pPars->
fVerbose, pPars->
fUseStart?&nUseStart:NULL, &pPars->
Status, &pPars->
nFramesDone );
440 p->pSeqModel = pAbs->pSeqModel;
441 pAbs->pSeqModel = NULL;
447 printf(
"ITER %4d : ", Iter );
456 printf(
"Refinements is stopped because flop reduction is less than %d%%\n", pPars->
nRatio );
int Saig_ManCexRefineStep(Aig_Man_t *p, Vec_Int_t *vFlops, Vec_Int_t *vFlopClasses, Abc_Cex_t *pCex, int nFfToAddMax, int fTryFour, int fSensePath, int fVerbose)
void Bbr_ManSetDefaultParams(Saig_ParBbr_t *p)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
void Pdr_ManSetDefaultParams(Pdr_Par_t *pPars)
MACRO DEFINITIONS ///.
Vec_Int_t * Gia_ManFlops2Classes(Gia_Man_t *pGia, Vec_Int_t *vFlops)
typedefABC_NAMESPACE_HEADER_START struct Pdr_Par_t_ Pdr_Par_t
INCLUDES ///.
static int Abc_InfoHasBit(unsigned *p, int i)
ABC_NAMESPACE_IMPL_START Abc_Cex_t * Abc_CexAlloc(int nRegs, int nRealPis, int nFrames)
DECLARATIONS ///.
Aig_Man_t * Saig_ManDupAbstraction(Aig_Man_t *pAig, Vec_Int_t *vFlops)
int Saig_ManVerifyCex(Aig_Man_t *pAig, Abc_Cex_t *p)
void Aig_ManPrintStats(Aig_Man_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
int Saig_BmcPerform(Aig_Man_t *pAig, int nStart, int nFramesMax, int nNodesMax, int nTimeOut, int nConfMaxOne, int nConfMaxAll, int fVerbose, int fVerbOverwrite, int *piFrames, int fSilent)
static abctime Abc_Clock()
Aig_Man_t * Saig_ManCexRefine(Aig_Man_t *p, Aig_Man_t *pAbs, Vec_Int_t *vFlops, int nFrames, int nConfMaxOne, int fUseBdds, int fUseDprove, int fVerbose, int *pnUseStart, int *piRetValue, int *pnFrames)
static Vec_Int_t * Vec_IntStartNatural(int nSize)
static void Vec_IntSort(Vec_Int_t *p, int fReverse)
Vec_Int_t * Saig_ManCbaFilterFlops(Aig_Man_t *pAig, Abc_Cex_t *pAbsCex, Vec_Int_t *vFlopClasses, Vec_Int_t *vAbsFfsToAdd, int nFfsToSelect)
FUNCTION DEFINITIONS ///.
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Int_t * Vec_IntStart(int nSize)
Vec_Int_t * Gia_ManClasses2Flops(Vec_Int_t *vFlopClasses)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
Vec_Int_t * Saig_ManExtendCounterExampleTest2(Aig_Man_t *p, int iFirstPi, Abc_Cex_t *pCex, int fVerbose)
int Gia_ManCexAbstractionRefine(Gia_Man_t *pGia, Abc_Cex_t *pCex, int nFfToAddMax, int fTryFour, int fSensePath, int fVerbose)
Aig_Man_t * Gia_ManToAig(Gia_Man_t *p, int fChoices)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
void Aig_ManSetCioIds(Aig_Man_t *p)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Abc_Print(int level, const char *format,...)
void Ioa_WriteAiger(Aig_Man_t *pMan, char *pFileName, int fWriteSymbols, int fCompact)
Vec_Int_t * Saig_ManCexAbstractionFlops(Aig_Man_t *p, Gia_ParAbs_t *pPars)
Aig_Man_t * Saig_ManDupOrpos(Aig_Man_t *p)
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_START
static void Abc_InfoSetBit(unsigned *p, int i)
static int Aig_ManRegNum(Aig_Man_t *p)
int Pdr_ManSolve(Aig_Man_t *p, Pdr_Par_t *pPars)
static int Vec_IntSize(Vec_Int_t *p)
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Abc_Cex_t * Saig_ManCexRemap(Aig_Man_t *p, Aig_Man_t *pAbs, Abc_Cex_t *pCexAbs)
static void Vec_IntFree(Vec_Int_t *p)
void Abc_CexFree(Abc_Cex_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Vec_Int_t * Saig_ManExtendCounterExampleTest3(Aig_Man_t *pAig, int iFirstFlopPi, Abc_Cex_t *pCex, int fVerbose)
int Saig_ManFindFailedPoCex(Aig_Man_t *pAig, Abc_Cex_t *p)
ABC_NAMESPACE_IMPL_START void Gia_ManAbsSetDefaultParams(Gia_ParAbs_t *p)
DECLARATIONS ///.
int Saig_ManCexFirstFlopPi(Aig_Man_t *p, Aig_Man_t *pAbs)
int Aig_ManVerifyUsingBdds(Aig_Man_t *p, Saig_ParBbr_t *pPars)
#define Saig_ManForEachPi(p, pObj, i)
static int Gia_ManRegNum(Gia_Man_t *p)