124 if ( p->
pAig->pReprs[i] != NULL )
125 printf(
"Classes are not cleared!\n" );
131 p->
pAig->pReprs[pObj->
Id] = NULL;
149 for ( i = 0; (pTemp = pClass[i]); i++ );
167 int i, nNodes, nLits = 0;
192 int i, nNodes, nPairs = 0;
197 nPairs += nNodes * (nNodes - 1) / 2;
217 for ( i = 1; (pTemp = pClass[i]); i++ )
220 for ( i = 0; (pTemp = pClass[i]); i++ )
242 printf(
"Const = %5d. Class = %5d. Lit = %5d. ",
252 printf(
"Constants { " );
280 int i, k, nTableSize, nEntries, nNodes, iEntry;
302 if ( nMaxLevs && (
int)pObj->
Level > nMaxLevs )
315 if ( ppTable[iEntry] == NULL )
317 ppTable[iEntry] = pObj;
330 for ( i = 0; i < nTableSize; i++ )
331 if ( ppTable[i] && ppTable[i] !=
Fra_ObjNext(ppNexts, ppTable[i]) )
333 for ( pTemp =
Fra_ObjNext(ppNexts, ppTable[i]), k = 1;
339 assert( ppTable[i]->fMarkA == 0 );
402 assert( ppClass[0] != NULL && ppClass[1] != NULL );
405 for ( ppThis = ppClass + 1; (pObj = *ppThis); ppThis++ )
414 for ( ppThis = ppClass + 1; (pObj = *ppThis); ppThis++ )
465 if ( pClass[1] == NULL )
468 if ( pClass2[1] == NULL )
474 assert( pClass2[0] != NULL );
504 assert( pClass[0] != NULL );
530 int i, k, nRefis = 1;
569 assert( ppClass[0] != NULL );
572 if ( fRefineNewClass )
646 int * pWeights, WeightMax = 0, i, k, c;
658 WeightMax =
Abc_MaxInt( WeightMax, pWeights[i] );
666 if ( pWeights[pObj->
Id] >= WeightMax/Ratio )
676 for ( c = 1; ppClass[c]; c++ )
678 if ( pWeights[ppClass[c]->Id] >= WeightMax/Ratio )
679 ppClass[k++] = ppClass[c];
688 if ( ppClass[1] != NULL )
709 int i, c, cMinSupp, nSuppSizeMin, nSuppSizeCur;
717 for ( c = 0; pClass[c]; c++ )
721 if ( nSuppSizeMin > nSuppSizeCur ||
722 (nSuppSizeMin == nSuppSizeCur && pNodeMin->
Level > pClass[c]->
Level) )
724 nSuppSizeMin = nSuppSizeCur;
725 pNodeMin = pClass[c];
733 pClass[cMinSupp] = pClass[0];
734 pClass[0] = pNodeMin;
736 for ( c = 0; pClass[c]; c++ )
762 Aig_Obj_t * pObjNew, * pObjRepr, * pObjReprNew, * pMiter;
770 pObjReprNew =
Fra_ObjEqu( ppEquivs, pObjRepr );
801 int i, k, f, nFramesAll = nFramesK + 1;
817 for ( f = 0; f < nFramesAll; f++ )
832 if ( f == nFramesAll - 1 )
834 if ( f == nFramesAll - 2 )
849 printf(
"Assert miters = %6d. Output miters = %6d.\n",
850 pManFraig->nAsserts,
Aig_ManCoNum(pManFraig) - pManFraig->nAsserts );
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Abc_PrimeCudd(unsigned int p)
static Aig_Obj_t * Fra_ObjEqu(Aig_Obj_t **ppEquivs, Aig_Obj_t *pObj)
Aig_Obj_t ** pMemClassesFree
int Fra_SmlNodeIsConst(Aig_Obj_t *pObj)
int Fra_RefineClassLastIter(Fra_Cla_t *p, Vec_Ptr_t *vClasses)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
void Fra_ClassesSelectRepr(Fra_Cla_t *p)
Aig_Obj_t * Aig_Exor(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
static Aig_Obj_t * Fra_ObjChild0Equ(Aig_Obj_t **ppEquivs, Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
static Aig_Obj_t * Fra_ObjChild1Equ(Aig_Obj_t **ppEquivs, Aig_Obj_t *pObj)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
static int Aig_IsComplement(Aig_Obj_t *p)
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
void Fra_ClassesLatchCorr(Fra_Man_t *p)
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
static int Abc_MaxInt(int a, int b)
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void * Vec_PtrPop(Vec_Ptr_t *p)
int Fra_ClassesCountLits(Fra_Cla_t *p)
int Aig_SupportSize(Aig_Man_t *p, Aig_Obj_t *pObj)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
static void Fra_ObjSetNext(Aig_Obj_t **ppNexts, Aig_Obj_t *pObj, Aig_Obj_t *pNext)
int(* pFuncNodesAreEqual)(Aig_Obj_t *, Aig_Obj_t *)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static int Aig_ManCoNum(Aig_Man_t *p)
int Fra_ClassCount(Aig_Obj_t **pClass)
#define Aig_ManForEachNode(p, pObj, i)
void Aig_ManReprStart(Aig_Man_t *p, int nIdMax)
DECLARATIONS ///.
void Fra_PrintClass(Fra_Cla_t *p, Aig_Obj_t **pClass)
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
static void Fra_ClassesDeriveNode(Aig_Man_t *pManFraig, Aig_Obj_t *pObj, Aig_Obj_t **ppEquivs)
static void Fra_ObjSetEqu(Aig_Obj_t **ppEquivs, Aig_Obj_t *pObj, Aig_Obj_t *pNode)
Fra_Sml_t * Fra_SmlSimulateComb(Aig_Man_t *pAig, int nWords, int fCheckMiter)
void Fra_ClassesCopyReprs(Fra_Cla_t *p, Vec_Ptr_t *vFailed)
void Fra_ClassesPrepare(Fra_Cla_t *p, int fLatchCorr, int nMaxLevs)
static int Aig_ManCiNum(Aig_Man_t *p)
Aig_Obj_t ** Fra_RefineClassOne(Fra_Cla_t *p, Aig_Obj_t **ppClass)
#define ABC_NAMESPACE_IMPL_END
void Fra_ClassesPrint(Fra_Cla_t *p, int fVeryVerbose)
Aig_Man_t * Fra_ClassesDeriveAig(Fra_Cla_t *p, int nFramesK)
int Fra_ClassesRefine1(Fra_Cla_t *p, int fRefineNewClass, int *pSkipped)
int(* pFuncNodeIsConst)(Aig_Obj_t *)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static ABC_NAMESPACE_IMPL_START Aig_Obj_t * Fra_ObjNext(Aig_Obj_t **ppNexts, Aig_Obj_t *pObj)
DECLARATIONS ///.
static void Fra_ClassObjSetRepr(Aig_Obj_t *pObj, Aig_Obj_t *pNode)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
int Fra_SmlNodeHash(Aig_Obj_t *pObj, int nTableSize)
DECLARATIONS ///.
static int Aig_ManRegNum(Aig_Man_t *p)
void Fra_ClassesStop(Fra_Cla_t *p)
static int Vec_IntSize(Vec_Int_t *p)
#define Aig_ManForEachObj(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static Aig_Obj_t * Fra_ClassObjRepr(Aig_Obj_t *pObj)
int Fra_SmlNodeNotEquWeight(Fra_Sml_t *p, int Left, int Right)
int Fra_SmlNodesAreEqual(Aig_Obj_t *pObj0, Aig_Obj_t *pObj1)
#define Aig_ManForEachLoSeq(p, pObj, i)
Fra_Cla_t * Fra_ClassesStart(Aig_Man_t *pAig)
FUNCTION DEFINITIONS ///.
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
void Fra_ClassesPostprocess(Fra_Cla_t *p)
static void Vec_PtrClear(Vec_Ptr_t *p)
#define Aig_ManForEachLiSeq(p, pObj, i)
void Fra_ClassesTest(Fra_Cla_t *p, int Id1, int Id2)
int Fra_ClassesRefine(Fra_Cla_t *p)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
static void Vec_PtrShrink(Vec_Ptr_t *p, int nSizeNew)
char * Abc_UtilStrsav(char *s)
int(* pFuncNodeHash)(Aig_Obj_t *, int)
int Aig_ManCleanup(Aig_Man_t *p)
#define Aig_ManForEachPiSeq(p, pObj, i)
SEQUENTIAL ITERATORS ///.
int Fra_ClassesCountPairs(Fra_Cla_t *p)
#define ABC_FALLOC(type, num)
void Fra_SmlStop(Fra_Sml_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)