117 assert( f >= 0 && f <= p->pCex->iFrame );
118 return p->pObjs + f * p->nObjsFrame + pObj->
Value;
123 return p->pvVecs +
Gia_ObjId(p->pGia, pObj);
144 for ( w = 0; w < p->nMapWords; w++ )
146 for ( w = 0; w < p->nMapWords; w++ )
158 unsigned * pInfo, * pInfo0, * pInfo1;
169 for ( i = 0; i < p->nMapWords; i++ )
170 pInfo[i] = One ? (pInfo0[i] & pInfo1[i]) : (pInfo0[i] | pInfo1[i]);
175 for ( i = 0; i < p->nMapWords; i++ )
176 pInfo[i] = One ? (pInfo0[i] | pInfo1[i]) : (pInfo0[i] & pInfo1[i]);
229 if ( fProfile && p->nCalls )
231 double MemGia =
sizeof(
Gia_Man_t) +
sizeof(
Gia_Obj_t) * p->pGia->nObjsAlloc +
sizeof(int) * p->pGia->nTravIdsAlloc;
233 clock_t
timeOther = p->timeTotal - p->timeFwd - p->timeBwd - p->timeVer;
234 printf(
"Abstraction refinement runtime statistics:\n" );
235 ABC_PRTP(
"Sensetization", p->timeFwd, p->timeTotal );
236 ABC_PRTP(
"Justification", p->timeBwd, p->timeTotal );
237 ABC_PRTP(
"Verification ", p->timeVer, p->timeTotal );
238 ABC_PRTP(
"Other ", timeOther, p->timeTotal );
239 ABC_PRTP(
"TOTAL ", p->timeTotal, p->timeTotal );
240 printf(
"Total calls = %d. Average refine = %.1f. GIA mem = %.3f MB. Other mem = %.3f MB.\n",
241 p->nCalls, 1.0*p->nRefines/p->nCalls, MemGia/(1<<20), MemOther/(1<<20) );
319 int f, i, iBit = p->pCex->nRegs;
321 for ( f = 0; f <= p->pCex->iFrame; f++, iBit += p->pCex->nPis )
331 pRnm->Prio = pObj->
Value;
345 pRnm->Value = pRnm0->Value;
346 pRnm->Prio = pRnm0->Prio;
353 pRnm->Prio = pRnm0->Prio;
360 if ( pRnm->Value == 1 )
361 pRnm->Prio =
Abc_MaxInt( pRnm0->Prio, pRnm1->Prio );
363 pRnm->Prio =
Abc_MinInt( pRnm0->Prio, pRnm1->Prio );
365 pRnm->Prio = pRnm0->Prio;
367 pRnm->Prio = pRnm1->Prio;
370 assert( iBit == p->pCex->nBits );
372 if ( pRnm->Value != 1 )
373 printf(
"Output value is incorrect.\n" );
393 int i, f, iBit = pCex->nRegs;
395 for ( f = 0; f <= pCex->iFrame; f++, iBit += pCex->nPis )
402 else if ( pObj->
Value )
430 Abc_Print( 1,
"\nRefinement verification has failed!!!\n" );
449 if ( pObj->
fPhase && !fFirst )
527 printf(
"%d ", Entry );
571 for ( k = 0; k < Num; k++ )
572 printf(
"%c",
'0' + ((Entry>>k) & 1) );
592 int i, j, k, Entry, Entry2;
596 printf(
"Before: \n" );
610 if ( (Entry2 & Entry) == Entry2 )
619 printf(
"After: \n" );
640 int nGroupSize = (nPpis / 30) + (nPpis % 30 > 0);
646 printf(
"Considering %d PPIs combined into %d groups of size %d.\n", k, (k-1)/nGroupSize+1, nGroupSize );
647 return (k-1)/nGroupSize+1;
665 int nGroupSize = (nPpis / 30) + (nPpis % 30 > 0);
676 if ( (Entry >> (k++ / nGroupSize)) & 1 )
677 printf(
"1" ), Counter++;
684 printf(
" %3d \n", Counter );
703 int f, i, k, j, Entry, Entry2, iBit = p->pCex->nRegs;
709 for ( f = 0; f <= p->pCex->iFrame; f++, iBit += p->pCex->nPis )
775 assert( iBit == p->pCex->nBits );
777 printf(
"Output value is incorrect.\n" );
795 int f, i, iBit = p->pCex->nRegs;
801 for ( f = 0; f <= p->pCex->iFrame; f++, iBit += p->pCex->nPis )
844 assert( iBit == p->pCex->nBits );
846 printf(
"Output value is incorrect.\n" );
848 printf(
"Bounds: \n" );
868 clock_t clk, clk2 = clock();
874 p->fPropFanout = fPropFanout;
875 p->fVerbose = fVerbose;
889 printf(
"Empty set of justifying subsets.\n" );
904 p->timeVer += clock() - clk;
905 p->timeTotal += clock() - clk2;
static int * Vec_IntArray(Vec_Int_t *p)
static void Gia_ObjTerSimCo(Gia_Obj_t *pObj)
static void Gia_ObjTerSimRo(Gia_Man_t *p, Gia_Obj_t *pObj)
static void Gia_ObjTerSimSet0(Gia_Obj_t *pObj)
#define Vec_IntForEachEntryStop(vVec, Entry, i, Stop)
static void Rf2_ManPrintVector(Vec_Int_t *p, int Num)
static Vec_Int_t * Rf2_ObjVec(Rf2_Man_t *p, Gia_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
void Rf2_ManBounds(Rf2_Man_t *p)
void Rf2_ManCollect(Rf2_Man_t *p)
static int Gia_ManPoNum(Gia_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Abc_InfoHasBit(unsigned *p, int i)
Vec_Int_t * Rf2_ManRefine(Rf2_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vMap, int fPropFanout, int fVerbose)
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
static void Abc_InfoXorBit(unsigned *p, int i)
void Rf2_ManCollect_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vObjs)
#define Vec_VecForEachLevelInt(vGlob, vVec, i)
void Gia_ManCleanMark0(Gia_Man_t *p)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
static void Rf2_ObjCopy(Rf2_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pFanin)
int Rf2_ManAssignJustIds(Rf2_Man_t *p)
double Rf2_ManMemoryUsage(Rf2_Man_t *p)
static int Gia_WordCountOnes(unsigned uWord)
typedefABC_NAMESPACE_IMPL_START struct Rf2_Obj_t_ Rf2_Obj_t
DECLARATIONS ///.
static int Abc_MaxInt(int a, int b)
static void Vec_VecFree(Vec_Vec_t *p)
static void Vec_IntSort(Vec_Int_t *p, int fReverse)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
Vec_Int_t * Rf2_ManPropagate(Rf2_Man_t *p, int Limit)
void Gia_ManCleanMark1(Gia_Man_t *p)
static void Rf2_ObjPrint(Rf2_Man_t *p, Gia_Obj_t *pRoot)
static void Rf2_ManProcessVector(Vec_Int_t *p, int Limit)
static void Vec_VecClear(Vec_Vec_t *p)
void Rf2_ManVerifyUsingTerSim(Gia_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vMap, Vec_Int_t *vObjs, Vec_Int_t *vRes)
#define ABC_PRTP(a, t, T)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Abc_MinInt(int a, int b)
static int Rf2_ManCountPpis(Rf2_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
static void Rf2_ObjStart(Rf2_Man_t *p, Gia_Obj_t *pObj, int i)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static void Vec_VecPushInt(Vec_Vec_t *p, int Level, int Entry)
int Rf2_ManSensitize(Rf2_Man_t *p)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Rf2_ManGatherFanins(Rf2_Man_t *p, int Depth)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjRoToRi(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
static unsigned * Rf2_ObjN(Rf2_Man_t *p, Gia_Obj_t *pObj)
static Rf2_Obj_t * Rf2_ManObj(Rf2_Man_t *p, Gia_Obj_t *pObj, int f)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
static Vec_Vec_t * Vec_VecStart(int nSize)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
Rf2_Man_t * Rf2_ManStart(Gia_Man_t *pGia)
FUNCTION DEFINITIONS ///.
static int Vec_IntCap(Vec_Int_t *p)
static void Abc_Print(int level, const char *format,...)
static unsigned * Rf2_ObjA(Rf2_Man_t *p, Gia_Obj_t *pObj)
static void Rf2_ObjDeriveAnd(Rf2_Man_t *p, Gia_Obj_t *pObj, int One)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static void Abc_InfoSetBit(unsigned *p, int i)
static int Gia_ObjTerSimGet1(Gia_Obj_t *pObj)
static int Vec_IntSize(Vec_Int_t *p)
static void Vec_IntShrink(Vec_Int_t *p, int nSizeNew)
void Rf2_ManStop(Rf2_Man_t *p, int fProfile)
typedefABC_NAMESPACE_HEADER_START struct Rf2_Man_t_ Rf2_Man_t
INCLUDES ///.
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static void Gia_ObjTerSimSet1(Gia_Obj_t *pObj)
#define ABC_CALLOC(type, num)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
void Rf2_ManGatherFanins_rec(Rf2_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vFanins, int Depth, int RootId, int fFirst)
static void Rf2_ObjClear(Rf2_Man_t *p, Gia_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
void Gia_ManIncrementTravId(Gia_Man_t *p)
struct Gia_Man_t_ Gia_Man_t
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
static int Vec_IntPushUnique(Vec_Int_t *p, int Entry)
static void Rf2_ManPrintVectorSpecial(Rf2_Man_t *p, Vec_Int_t *vVec)
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static void Gia_ObjTerSimSetX(Gia_Obj_t *pObj)
static int Gia_ManObjNum(Gia_Man_t *p)
static void Gia_ObjTerSimAnd(Gia_Obj_t *pObj)
static int Gia_ObjIsPi(Gia_Man_t *p, Gia_Obj_t *pObj)