111 int f, i, iPrev, iObj, iPrevNew, iObjNew;
127 for ( f = 0; f < nFrames+fScorr; f++ )
159 if ( iPrevNew != iObjNew && iPrevNew != 0 && iObjNew != 1 )
172 if ( iPrevNew != iObjNew && iPrevNew != 0 && iObjNew != 1 )
191 if ( iPrevNew != iObjNew )
228 int f, i, iPrevNew, iObjNew;
229 assert( (!fScorr && nFrames > 1) || (fScorr && nFrames > 0) || nPrefix );
243 for ( f = 0; f < nFrames+nPrefix+fScorr; f++ )
251 for ( f = nPrefix; f < nFrames+nPrefix; f++ )
261 if ( iPrevNew != iObjNew )
298 for ( k = 0; k < nFlops; k++ )
301 for ( w = 0; w <
nWords; w++ )
307 for ( w = 0; w <
nWords; w++ )
326 unsigned * pInfoObj, * pInfoRepr;
336 for ( w = 0; w <
nWords; w++ )
337 assert( pInfoObj[w] == 0 );
345 for ( w = 0; w <
nWords; w++ )
346 pInfoObj[w] = pInfoRepr[w];
397 unsigned * pInfoObj, * pInfoRepr;
398 int w, i, iObj, iRepr,
nWords;
405 for ( w = 0; w <
nWords; w++ )
407 assert( pInfoObj[w] == 0 );
408 pInfoObj[w] = pInfoRepr[w];
426 unsigned * pInfo, * pPres;
428 for ( i = 0; i < nLits; i++ )
436 for ( i = 0; i < nLits; i++ )
464 int k, nSize, kMax = 0;
478 for ( k = 0; k < nSize; k++ )
481 for ( k = 1; k < nBits; k++ )
508 int k, iLit, nLits, Out, iBit = 1;
520 for ( k = 0; k < nLits; k++ )
527 if ( ++iBit == nBits )
549 int RetValue = 0, iStart = 0;
586 int RetValue = 0, iStart = 0;
614 int i, status, iRepr, iObj;
727 int nLits, CounterX = 0, Counter0 = 0,
Counter = 0;
728 int i, Entry, nProve = 0, nDispr = 0, nFail = 0;
750 else if ( Entry == 0 )
752 else if ( Entry == -1 )
755 Abc_Print( 1,
"p =%6d d =%6d f =%6d ", nProve, nDispr, nFail );
780 int fChanges, RetValue;
791 pParsSat->nBTLimit = pPars->
nBTLimit;
792 pParsSat->fVerbose = pPars->
fVerbose;
805 pParsSat->nBTLimit *= 10;
842 int i, Iter, iObj, iRepr, fPrev, Total, Count0, Count1;
863 for ( Iter = 0; Iter < 100; Iter++ )
882 fChanges += fPrev ^ pObjRo->
fMark1;
894 printf(
"%5d -> %5d (%3d) ", Count0, Count1, Iter );
911 int nIterMax = 100000;
913 int fRunBmcFirst = 1;
923 abctime clkSat = 0, clkSim = 0, clkSrm = 0;
927 Abc_Print( 1,
"Cec_ManLatchCorrespondence(): Not a sequential AIG.\n" );
941 if ( pAig->
pReprs == NULL )
948 pParsSat->nBTLimit = pPars->
nBTLimit;
949 pParsSat->fVerbose = pPars->
fVerbose;
952 pParsSat->nBTLimit =
Abc_MinInt( pParsSat->nBTLimit, 1000 );
955 Abc_Print( 1,
"Obj = %7d. And = %7d. Conf = %5d. Fr = %d. Lcorr = %d. Ring = %d. CSat = %d.\n",
965 ((int (*)(
void *))pPars->
pFunc)( pPars->
pData );
966 ((int (*)(
void *))pPars->
pFunc)( pPars->
pData );
970 Abc_Print( 1,
"Stopped signal correspondence after BMC.\n" );
975 for ( r = 0; r < nIterMax; r++ )
980 Abc_Print( 1,
"Stopped signal correspondence after %d refiment iterations.\n", r );
1025 ((int (*)(
void *))pPars->
pFunc)( pPars->
pData );
1029 printf(
"Iterative refinement is stopped after iteration %d\n", r );
1030 printf(
"because the property output is no longer a candidate constant.\n" );
1038 if ( r == nIterMax )
1039 Abc_Print( 1,
"The refinement was not finished. The result may be incorrect.\n" );
1048 ABC_PRTP(
"Srm ", clkSrm, clkTotal );
1049 ABC_PRTP(
"Sat ", clkSat, clkTotal );
1050 ABC_PRTP(
"Sim ", clkSim, clkTotal );
1051 ABC_PRTP(
"Other", clkTotal-clkSat-clkSrm-clkSim, clkTotal );
1071 unsigned * pInitState;
1077 for ( f = 0; f < nFrames; f++ )
1125 Abc_Print( 1,
"Original flop %s is proved equivalent to flop %s.\n",
1129 Abc_Print( 1,
"Original flop %s is proved equivalent to internal node %d.\n",
1150 unsigned * pInitState;
1157 if ( RetValue == 0 )
1204 Abc_Print( 1,
"NBeg = %d. NEnd = %d. (Gain = %6.2f %%). RBeg = %d. REnd = %d. (Gain = %6.2f %%).\n",
1211 Abc_Print( 1,
"The reduced AIG was produced using %d-th invariants and will not verify.\n", pPars->
nPrefix );
1216 Abc_Print( 1,
"Flop output names are not available. Use command \"&get -n\".\n" );
static int * Vec_IntArray(Vec_Int_t *p)
static void Gia_ObjSetCopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj, int iLit)
Gia_Man_t * Gia_ManCorrSpecReduce(Gia_Man_t *p, int nFrames, int fScorr, Vec_Int_t **pvOutputs, int fRings)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
int Cec_ManSimClassesPrepare(Cec_ManSim_t *p, int LevelMax)
static int Gia_ObjPhase(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
static int Gia_ObjPhaseReal(Gia_Obj_t *pObj)
void Gia_ManStop(Gia_Man_t *p)
#define Gia_ManForEachCo(p, pObj, i)
static int Gia_ManPoNum(Gia_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
void Cec_ManStartSimInfo(Vec_Ptr_t *vInfo, int nFlops)
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Abc_InfoHasBit(unsigned *p, int i)
static int Gia_ObjFanin1CopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
Vec_Int_t * Cec_ManSatSolveMiter(Gia_Man_t *pAig, Cec_ParSat_t *pPars, Vec_Str_t **pvStatus)
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
static int Gia_ObjIsCand(Gia_Obj_t *pObj)
static void Abc_InfoXorBit(unsigned *p, int i)
static int Gia_ManAppendCi(Gia_Man_t *p)
void Cec_ManRefinedClassPrintStats(Gia_Man_t *p, Vec_Str_t *vStatus, int iIter, abctime Time)
MACRO DEFINITIONS ///.
#define Vec_StrForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
static void Vec_PtrCleanSimInfo(Vec_Ptr_t *vInfo, int iWord, int nWords)
int Cec_ManLSCorrespondenceClasses(Gia_Man_t *pAig, Cec_ParCor_t *pPars)
static int Gia_ObjIsHead(Gia_Man_t *p, int Id)
void Cec_ManSimStop(Cec_ManSim_t *p)
static ABC_NAMESPACE_IMPL_START void Gia_ManCorrSpecReduce_rec(Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pObj, int f, int nPrefix)
DECLARATIONS ///.
static void Vec_IntErase(Vec_Int_t *p)
int Cec_ManLoadCounterExamples2(Vec_Ptr_t *vInfo, Vec_Int_t *vCexStore, int iStart)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Gia_Man_t * Gia_ManCorrReduce(Gia_Man_t *p)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
static int Vec_PtrSize(Vec_Ptr_t *p)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
void Gia_ManCleanMark1(Gia_Man_t *p)
int Gia_ManCheckRefinements(Gia_Man_t *p, Vec_Str_t *vStatus, Vec_Int_t *vOutputs, Cec_ManSim_t *pSim, int fRings)
Cec_ManSim_t * Cec_ManSimStart(Gia_Man_t *pAig, Cec_ParSim_t *pPars)
Vec_Int_t * Cbs_ManSolveMiterNc(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int fVerbose)
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
#define ABC_PRTP(a, t, T)
void Cec_ManSimSetDefaultParams(Cec_ParSim_t *p)
#define Gia_ManForEachCi(p, pObj, i)
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Gia_Man_t * Gia_ManEquivToChoices(Gia_Man_t *p, int nSnapshots)
static int Gia_ManAndNum(Gia_Man_t *p)
void Gia_ManCreateValueRefs(Gia_Man_t *p)
static int Abc_MinInt(int a, int b)
static int Abc_LitIsCompl(int Lit)
static char Vec_StrEntry(Vec_Str_t *p, int i)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManSeqCleanup(Gia_Man_t *p)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Cec_ManLSCorrespondenceBmc(Gia_Man_t *pAig, Cec_ParCor_t *pPars, int nPrefs)
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
static void Vec_StrFree(Vec_Str_t *p)
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
int Cec_ManLoadCounterExamples(Vec_Ptr_t *vInfo, Vec_Int_t *vCexStore, int iStart)
static Gia_Obj_t * Gia_ObjRoToRi(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned * Cec_ManComputeInitState(Gia_Man_t *pAig, int nFrames)
static int Gia_ObjIsConst(Gia_Man_t *p, int Id)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ClassForEachObj1(p, i, iObj)
int Cec_ManLSCorrAnalyzeDependence(Gia_Man_t *p, Vec_Int_t *vEquivs, Vec_Str_t *vStatus)
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManFillValue(Gia_Man_t *p)
#define Gia_ManForEachPi(p, pObj, i)
int Cec_ManResimulateCounterExamplesComb(Cec_ManSim_t *pSim, Vec_Int_t *vCexStore)
void Gia_ManCorrPerformRemapping(Vec_Int_t *vPairs, Vec_Ptr_t *vInfo)
static void Abc_Print(int level, const char *format,...)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
int Cec_ManLoadCounterExamplesTry(Vec_Ptr_t *vInfo, Vec_Ptr_t *vPres, int iBit, int *pLits, int nLits)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static void Abc_InfoSetBit(unsigned *p, int i)
static Gia_Obj_t * Gia_ObjReprObj(Gia_Man_t *p, int Id)
void Cec_ManPrintFlopEquivs(Gia_Man_t *p)
static int Vec_StrSize(Vec_Str_t *p)
static int Gia_ManCiNum(Gia_Man_t *p)
int Cec_ManSimClassesRefine(Cec_ManSim_t *p)
static int Abc_LitNot(int Lit)
static int Vec_PtrReadWordsSimInfo(Vec_Ptr_t *p)
static int Gia_ObjHasSameRepr(Gia_Man_t *p, int i, int k)
void Gia_ManCorrReduce_rec(Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntSize(Vec_Int_t *p)
Gia_Man_t * Gia_ManDupFlip(Gia_Man_t *p, int *pInitState)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static int Gia_ObjIsNone(Gia_Man_t *p, int Id)
#define ABC_CALLOC(type, num)
static int Abc_Lit2Var(int Lit)
void Gia_ManCorrRemapSimInfo(Gia_Man_t *p, Vec_Ptr_t *vInfo)
static int Gia_ObjFaninId0p(Gia_Man_t *p, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
static int Gia_ManCorrSpecReal(Gia_Man_t *pNew, Gia_Man_t *p, Gia_Obj_t *pObj, int f, int nPrefix)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFailed(Gia_Man_t *p, int Id)
#define Gia_ManForEachRo(p, pObj, i)
static int Abc_BitWordNum(int nBits)
typedefABC_NAMESPACE_HEADER_START struct Cec_ParSat_t_ Cec_ParSat_t
INCLUDES ///.
void Gia_ManSetPhase(Gia_Man_t *p)
#define Gia_ManForEachRi(p, pObj, i)
void Gia_ManHashAlloc(Gia_Man_t *p)
#define Gia_ManForEachObj1(p, pObj, i)
Gia_Man_t * Gia_ManCorrSpecReduceInit(Gia_Man_t *p, int nFrames, int nPrefix, int fScorr, Vec_Int_t **pvOutputs, int fRings)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
static int Gia_ManPiNum(Gia_Man_t *p)
int Cec_ManResimulateCounterExamples(Cec_ManSim_t *pSim, Vec_Int_t *vCexStore, int nFrames)
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int Cec_ManSimClassRemoveOne(Cec_ManSim_t *p, int i)
static int Gia_ObjFanin0CopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
void Cec_ManSatSetDefaultParams(Cec_ParSat_t *p)
DECLARATIONS ///.
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ObjCioId(Gia_Obj_t *pObj)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Gia_ObjRepr(Gia_Man_t *p, int Id)
Vec_Int_t * Tas_ManSolveMiterNc(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int fVerbose)
int Cec_ManSeqResimulate(Cec_ManSim_t *p, Vec_Ptr_t *vInfo)
static Vec_Ptr_t * Vec_PtrAllocSimInfo(int nEntries, int nWords)
Gia_Man_t * Cec_ManLSCorrespondence(Gia_Man_t *pAig, Cec_ParCor_t *pPars)
static void Vec_PtrFree(Vec_Ptr_t *p)
void Gia_ManHashStop(Gia_Man_t *p)
static int Gia_ManCoNum(Gia_Man_t *p)
Vec_Int_t * Gia_ManCorrCreateRemapping(Gia_Man_t *p)
static int Gia_ObjHasRepr(Gia_Man_t *p, int Id)
static int Gia_ObjCopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
static int Gia_ManRegNum(Gia_Man_t *p)