118 Rnm_ManRefineCollect_rec( p, pFanin, vVisited, vFlops );
125 Vec_Int_t * vLeaves, * vLits, * vPpi2Map;
126 Vec_Int_t * vVisited, * vFlops, * vCore, * vCoreFinal;
128 int i, k, f, Status, Entry, pLits[5], iBit = p->pCex->nRegs;
143 Rnm_ManRefineCollect_rec( p->pGia, pObj, vVisited, vFlops );
146 assert( p->pSat == NULL );
151 Rnm_ObjFindOrAddSatVar( p, pObj );
157 pLits[k] = Rnm_ObjFindOrAddSatVar( p, pFanin );
160 Ga2_ManCnfAddStatic( p->pSat, vCnf0, vCnf1, pLits, Rnm_ObjFindOrAddSatVar(p, pObj), Rnm_ObjFindOrAddSatVar(p, pObj)/2 );
172 vCoreFinal = Vec_IntAlloc( 100 );
173 for ( f = 0; f <= p->pCex->iFrame; f++, iBit += p->pCex->nPis )
211 assert( iBit == p->pCex->nBits );
240 Rnm_ObjSetSatVar( p, pObj, 0 );
243 Rnm_ObjSetSatVar( p, pFanin, 0 );
289 if ( fProfile && p->
nCalls )
294 printf(
"Abstraction refinement runtime statistics:\n" );
300 printf(
"Total calls = %d. Average refine = %.1f. GIA mem = %.3f MB. Other mem = %.3f MB.\n",
400 int f, i, iBit = p->
pCex->nRegs;
402 for ( f = 0; f <= p->
pCex->iFrame; f++, iBit += p->
pCex->nPis )
412 pRnm->Prio = pObj->
Value;
426 pRnm->Value = pRnm0->Value;
427 pRnm->Prio = pRnm0->Prio;
434 pRnm->Prio = pRnm0->Prio;
441 if ( pRnm->Value == 1 )
442 pRnm->Prio =
Abc_MaxInt( pRnm0->Prio, pRnm1->Prio );
444 pRnm->Prio =
Abc_MinInt( pRnm0->Prio, pRnm1->Prio );
446 pRnm->Prio = pRnm0->Prio;
448 pRnm->Prio = pRnm1->Prio;
453 if ( pRnm->Value != 1 )
454 printf(
"Output value is incorrect.\n" );
475 assert( pRnm->fVisit == 0 );
484 assert( (
int)pRnm->Prio > 0 );
485 for ( i = p->
pCex->iFrame; i >= 0; i-- )
504 if ( pFanout->
Value == 0 )
507 if ( pRnmF->fPPi || pRnmF->fVisit )
517 if ( ((pRnm0->Value ^
Gia_ObjFaninC0(pFanout)) == 0 && pRnm0->fVisit) ||
518 ((pRnm1->Value ^
Gia_ObjFaninC1(pFanout)) == 0 && pRnm1->fVisit) ||
519 ( ((pRnm0->Value ^
Gia_ObjFaninC0(pFanout)) == 1 && pRnm0->fVisit) &&
520 ((pRnm1->Value ^
Gia_ObjFaninC1(pFanout)) == 1 && pRnm1->fVisit) ) )
543 assert( (
int)pRnm->Prio > 0 );
546 for ( i = p->
pCex->iFrame; i >= 0; i-- )
570 if ( pRnm->Value == 1 )
572 if ( pRnm0->Prio > 0 )
574 if ( pRnm1->Prio > 0 )
581 if ( pRnm0->Prio <= pRnm1->Prio )
583 if ( pRnm0->Prio > 0 )
588 if ( pRnm1->Prio > 0 )
594 if ( pRnm0->Prio > 0 )
599 if ( pRnm1->Prio > 0 )
622 int i, f, iBit = pCex->nRegs;
624 for ( f = 0; f <= pCex->iFrame; f++, iBit += pCex->nPis )
631 else if ( pObj->
Value )
659 Abc_Print( 1,
"\nRefinement verification has failed!!!\n" );
722 if ( !fNewRefinement )
double Rnm_ManMemoryUsage(Rnm_Man_t *p)
static int sat_solver2_nlearnts(sat_solver2 *s)
static unsigned Ga2_ObjTruth(Gia_Man_t *p, Gia_Obj_t *pObj)
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)
void * Sat_ProofCore(sat_solver2 *s)
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)
void Rnm_ManCollect_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vObjs, int nAddOn)
Vec_Int_t * Ga2_ManCnfCompute(unsigned uTruth, int nVars, Vec_Int_t *vCover)
void Rnm_ManCleanValues(Rnm_Man_t *p)
Rnm_Man_t * Rnm_ManStart(Gia_Man_t *pGia)
FUNCTION DEFINITIONS ///.
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
#define ABC_REALLOC(type, obj, num)
void sat_solver2_delete(sat_solver2 *s)
Vec_Int_t * Rnm_ManFilterSelectedNew(Rnm_Man_t *p, Vec_Int_t *vOldPPis)
void Gia_ManCleanValue(Gia_Man_t *p)
void Gia_ManCleanMark0(Gia_Man_t *p)
void Rnm_ManJustifyPropFanout_rec(Rnm_Man_t *p, Gia_Obj_t *pObj, int f, Vec_Int_t *vSelect)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
static int Vec_IntFind(Vec_Int_t *p, int Entry)
#define ABC_ALLOC(type, num)
sat_solver2 * sat_solver2_new(void)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
static int * Vec_IntLimit(Vec_Int_t *p)
static int Abc_LitNotCond(int Lit, int c)
for(p=first;p->value< newval;p=p->next)
void Gia_ManCleanMark1(Gia_Man_t *p)
#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 Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Rnm_ManCollect(Rnm_Man_t *p)
void Rnm_ManStop(Rnm_Man_t *p, int fProfile)
void Rnm_ManJustify_rec(Rnm_Man_t *p, Gia_Obj_t *pObj, int f, Vec_Int_t *vSelect)
static Prf_Man_t * Prf_ManAlloc()
FUNCTION DECLARATIONS ///.
static void Vec_StrFree(Vec_Str_t *p)
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START void Ga2_ManCnfAddStatic(sat_solver2 *pSat, Vec_Int_t *vCnf0, Vec_Int_t *vCnf1, int *pLits, int iLitOut, int ProofId)
DECLARATIONS ///.
struct Rnm_Man_t_ Rnm_Man_t
static Gia_Obj_t * Gia_ObjRoToRi(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManStaticFanoutStop(Gia_Man_t *p)
static int Gia_ObjIsRi(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)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
void Gia_ManStaticFanoutStart(Gia_Man_t *p)
static int Vec_IntUniqify(Vec_Int_t *p)
static Vec_Str_t * Vec_StrStart(int nSize)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntCap(Vec_Int_t *p)
static void Abc_Print(int level, const char *format,...)
#define Gia_ObjForEachFanoutStatic(p, pObj, pFanout, i)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static void Prf_ManRestart(Prf_Man_t *p, Vec_Int_t *vId2Pr, int iFirst, int nWidth)
static int Gia_ObjTerSimGet1(Gia_Obj_t *pObj)
static int Vec_IntSize(Vec_Int_t *p)
static Vec_Int_t * Ga2_ObjLeaves(Gia_Man_t *p, Gia_Obj_t *pObj)
int Rnm_ManSensitize(Rnm_Man_t *p)
static Gia_Obj_t * Gia_ObjRiToRo(Gia_Man_t *p, Gia_Obj_t *pObj)
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)
Vec_Int_t * Rnm_ManFilterSelected(Rnm_Man_t *p, Vec_Int_t *vOldPPis)
#define ABC_CALLOC(type, num)
static int Gia_ObjIsPo(Gia_Man_t *p, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
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)
static void Prf_ManStopP(Prf_Man_t **p)
void Rnm_ManVerifyUsingTerSim(Gia_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vMap, Vec_Int_t *vObjs, Vec_Int_t *vRes)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
static Rnm_Obj_t * Rnm_ManObj(Rnm_Man_t *p, Gia_Obj_t *pObj, int f)
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)
typedefABC_NAMESPACE_HEADER_START struct Rnm_Obj_t_ Rnm_Obj_t
INCLUDES ///.
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Vec_Int_t * Rnm_ManRefine(Rnm_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vMap, int fPropFanout, int fNewRefinement, int fVerbose)
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)