29 0x984b6ad9,0x18a6eed3,0x950353e2,0x6222f6eb,0xdfbedd47,0xef0f9023,0xac932a26,0x590eaf55,
30 0x97d0a034,0xdc36cd2e,0x22736b37,0xdc9066b0,0x2eb2f98b,0x5d9c7baf,0x85747c9e,0x8aca1055,
31 0x50d66b74,0x2f01ae9e,0xa1a80123,0x3e1ce2dc,0xebedbc57,0x4e68bc34,0x855ee0cf,0x17275120,
32 0x2ae7f2df,0xf71039eb,0x7c283eec,0x70cd1137,0x7cf651f3,0xa87bfa7a,0x14d87f02,0xe82e197d,
33 0x8d8a5ebe,0x1e6a15dc,0x197d49db,0x5bab9c89,0x4b55dea7,0x55dede49,0x9a6a8080,0xe5e51035,
34 0xe148d658,0x8a17eb3b,0xe22e4b38,0xe5be2a9a,0xbe938cbb,0x3b981069,0x7f9c0c8e,0xf756df10,
35 0x8fa783f7,0x252062ce,0x3dc46b4b,0xf70f6432,0x3f378276,0x44b137a1,0x2bf74b77,0x04892ed6,
36 0xfd318de1,0xd58c235e,0x94c6d25b,0x7aa5f218,0x35c9e921,0x5732fbbb,0x06026481,0xf584a44f,
37 0x946e1b5f,0x8463d5b2,0x4ebca7b2,0x54887b15,0x08d1e804,0x5b22067d,0x794580f6,0xb351ea43,
38 0xbce555b9,0x19ae2194,0xd32f1396,0x6fc1a7f1,0x1fd8a867,0x3a89fdb0,0xea49c61c,0x25f8a879,
39 0xde1e6437,0x7c74afca,0x8ba63e50,0xb1572074,0xe4655092,0xdb6f8b1c,0xc2955f3c,0x327f85ba,
40 0x60a17021,0x95bd261d,0xdea94f28,0x04528b65,0xbe0109cc,0x26dd5688,0x6ab2729d,0xc4f029ce,
41 0xacf7a0be,0x4c912f55,0x34c06e65,0x4fbb938e,0x1533fb5f,0x03da06bd,0x48262889,0xc2523d7d,
42 0x28a71d57,0x89f9713a,0xf574c551,0x7a99deb5,0x52834d91,0x5a6f4484,0xc67ba946,0x13ae698f,
43 0x3e390f34,0x34fc9593,0x894c7932,0x6cf414a3,0xdb7928ab,0x13a3b8a3,0x4b381c1d,0xa10b54cb,
44 0x55359d9d,0x35a3422a,0x58d1b551,0x0fd4de20,0x199eb3f4,0x167e09e2,0x3ee6a956,0x5371a7fa,
45 0xd424efda,0x74f521c5,0xcb899ff6,0x4a42e4f4,0x747917b6,0x4b08df0b,0x090c7a39,0x11e909e4,
46 0x258e2e32,0xd9fad92d,0x48fe5f69,0x0545cde6,0x55937b37,0x9b4ae4e4,0x1332b40e,0xc3792351,
47 0xaff982ef,0x4dba132a,0x38b81ef1,0x28e641bf,0x227208c1,0xec4bbe37,0xc4e1821c,0x512c9d09,
48 0xdaef1257,0xb63e7784,0x043e04d7,0x9c2cea47,0x45a0e59a,0x281315ca,0x849f0aac,0xa4071ed3,
49 0x0ef707b3,0xfe8dac02,0x12173864,0x471f6d46,0x24a53c0a,0x35ab9265,0xbbf77406,0xa2144e79,
50 0xb39a884a,0x0baf5b6d,0xcccee3dd,0x12c77584,0x2907325b,0xfd1adcd2,0xd16ee972,0x345ad6c1,
51 0x315ebe66,0xc7ad2b8d,0x99e82c8d,0xe52da8c8,0xba50f1d3,0x66689cd8,0x2e8e9138,0x43e15e74,
52 0xf1ced14d,0x188ec52a,0xe0ef3cbb,0xa958aedc,0x4107a1bc,0x5a9e7a3e,0x3bde939f,0xb5b28d5a,
53 0x596fe848,0xe85ad00c,0x0b6b3aae,0x44503086,0x25b5695c,0xc0c31dcd,0x5ee617f0,0x74d40c3a,
54 0xd2cb2b9f,0x1e19f5fa,0x81e24faf,0xa01ed68f,0xcee172fc,0x7fdf2e4d,0x002f4774,0x664f82dd,
55 0xc569c39a,0xa2d4dcbe,0xaadea306,0xa4c947bf,0xa413e4e3,0x81fb5486,0x8a404970,0x752c980c,
56 0x98d1d881,0x5c932c1e,0xeee65dfb,0x37592cdd,0x0fd4e65b,0xad1d383f,0x62a1452f,0x8872f68d,
57 0xb58c919b,0x345c8ee3,0xb583a6d6,0x43d72cb3,0x77aaa0aa,0xeb508242,0xf2db64f8,0x86294328,
58 0x82211731,0x1239a9d5,0x673ba5de,0xaf4af007,0x44203b19,0x2399d955,0xa175cd12,0x595928a7,
59 0x6918928b,0xde3126bb,0x6c99835c,0x63ba1fa2,0xdebbdff0,0x3d02e541,0xd6f7aac6,0xe80b4cd0,
60 0xd0fa29f1,0x804cac5e,0x2c226798,0x462f624c,0xad05b377,0x22924fcd,0xfbea205c,0x1b47586d
166 int i, k, iBegin, nSize;
170 printf(
"%5d : (%3d,%3d) ", i/2, iBegin, nSize );
174 for ( k = 0; k < nSize; k++ )
183 printf(
"Iter %4d : ", Iter );
184 printf(
"Entries =%8d. ", p->
nEntries );
186 printf(
"Uniques =%8d. ", p->
nUniques );
187 printf(
"Singles =%8d. ", p->
nSingles );
188 printf(
"%9.2f sec", (
float)(Time)/(
float)(CLOCKS_PER_SEC) );
207 int * pLevBegins, * pLevSizes;
208 int i, iObj, MaxLev = 0;
224 for ( i = 1; i < p->
nObjs; i++ )
233 for ( i = 0; i <= MaxLev; i++ )
235 assert( pLevSizes[i] > 0 );
238 pLevBegins[i+1] = pLevBegins[i] + pLevSizes[i];
242 for ( i = 1; i < p->
nObjs; i++ )
267 int i, iBegin, nSize;
302 int i, k, fSameValue, iBegin, iBeginOld, nSize, nSizeNew;
314 for ( k = 0; k < nSize; k++ )
335 for ( k = 1; k < nSize; k++ )
340 nSizeNew = iBegin + k - iBeginOld;
352 iBeginOld = iBegin + k;
356 nSizeNew = iBegin + k - iBeginOld;
391 int i, k, iBegin, nSize;
405 for ( k = 0; k < nSize; k++ )
414 for ( k = 0; k < nSize; k++ )
514 int i, iBegin = -1, nSize = -1;
551 printf(
"Broke ties in class %d of size %d at level %d.\n", i/2, nSize, p->
pLevels[
Gia_IsoGetItem(p, iBegin)] );
584 printf(
"Broke ties in last class of size %d at level %d.\n", nSize, p->
pLevels[
Gia_IsoGetItem(p, iBegin)] );
589 int i, k, iBegin0, iBegin, nSize, Shrink;
606 for ( k = 0; k < nSize; k++ )
615 printf(
"Broke ties in class of size %d at level %d.\n", nSize, p->
pLevels[
Gia_IsoGetItem(p, iBegin)] );
634 int i, k, iBegin, nSize,
Counter = 0;
640 for ( k = 0; k < nSize; k++ )
657 for ( k = 0; k < nSize; k++ )
662 printf(
"%5d : ", ++Counter );
663 printf(
"Obj %6d : Level = %4d. iBegin = %4d. Size = %4d.\n",
684 Gia_Obj_t * pObj, * pObjC, * pObj1, * pObj0;
722 int nIterMax = 10000;
726 int fRefined, fRefinedAll;
745 for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
757 for ( fRefinedAll = 1; i < nIterMax && fRefinedAll; )
760 for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
766 fRefinedAll |= fRefined;
768 for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
774 fRefinedAll |= fRefined;
786 for ( fRefinedAll = 1; i < nIterMax && fRefinedAll; )
789 for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 )
795 fRefinedAll |= fRefined;
797 for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 )
803 fRefinedAll |= fRefined;
920 Vec_PtrSort( vTemp, (
int (*)(
void))Gia_ObjCompareByValue );
929 Vec_PtrSort( vTemp, (
int (*)(
void))Gia_ObjCompareByValue );
1052 int i, nClasses = 0;
1078 Vec_Ptr_t * vEquivs, * vEquivs2, * vStrings;
1079 Vec_Int_t * vRemain, * vLevel, * vLevel2;
1081 int i, k, s, sStart, iPo,
Counter;
1082 int nClasses, nUsedPos;
1085 *pvPosEquivs = NULL;
1107 if ( vEquivs == NULL )
1114 printf(
"Reduced %d outputs to %d candidate classes (%d outputs are in %d non-trivial classes). ",
1132 if ( ++Counter % 100 == 0 )
1133 printf(
"%6d finished...\r", Counter );
1140 printf(
"%6d %6d %6d : ", i,
Vec_IntSize(vLevel), iPo );
1150 if ( ++Counter % 100 == 0 )
1151 printf(
"%6d finished...\r", Counter );
1211 printf(
"Reduced %d outputs to %d equivalence classes (%d outputs are in %d non-trivial classes). ",
1218 printf(
"Nontrivial classes:\n" );
1222 *pvPosEquivs = vEquivs;
1250 printf(
"Nontrivial classes:\n" );
1273 for ( i = 0; i < nPis; i++ )
1275 int iNew = rand() % nPis;
1276 ABC_SWAP(
int, pArray[i], pArray[iNew] );
1291 printf(
"Considering random permutation of the primary inputs of the AIG:\n" );
1310 printf(
"CEX for the init AIG is valid.\n" );
1312 printf(
"CEX for the init AIG is not valid.\n" );
1314 printf(
"CEX for the perm AIG is valid.\n" );
1316 printf(
"CEX for the perm AIG is not valid.\n" );
Gia_Man_t * Gia_ManIsoReduce(Gia_Man_t *pInit, Vec_Ptr_t **pvPosEquivs, Vec_Ptr_t **pvPiPerms, int fEstimate, int fDualOut, int fVerbose, int fVeryVerbose)
static int * Vec_IntArray(Vec_Int_t *p)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Gia_Man_t * Gia_ManDupCones(Gia_Man_t *p, int *pPos, int nPos, int fTrimPis)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
void Gia_IsoAssignOneClass(Gia_IsoMan_t *p, int fVerbose)
void Gia_ManStop(Gia_Man_t *p)
Gia_Man_t * Gia_ManTransformMiter(Gia_Man_t *p)
void Gia_ManFindCaninicalOrder_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vAnds)
static Vec_Int_t * Vec_IntDup(Vec_Int_t *pVec)
#define Gia_ManForEachCo(p, pObj, i)
int Gia_ManVerifyCex(Gia_Man_t *pAig, Abc_Cex_t *p, int fDualOut)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
void Gia_IsoManStop(Gia_IsoMan_t *p)
static int Gia_ManPoNum(Gia_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManIsoCanonicize(Gia_Man_t *p, int fVerbose)
Gia_Man_t * Gia_ManDupPerm(Gia_Man_t *p, Vec_Int_t *vPiPerm)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
static void Gia_IsoSetValue(Gia_IsoMan_t *p, int i, unsigned v)
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
int Gia_IsoSort(Gia_IsoMan_t *p)
void Gia_ManCleanValue(Gia_Man_t *p)
void Gia_IsoAssignOneClass2(Gia_IsoMan_t *p)
static int Abc_Var2Lit(int Var, int fCompl)
static void Vec_PtrSort(Vec_Ptr_t *p, int(*Vec_PtrSortCompare)()) ___unused
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
void Gia_IsoPrintClasses(Gia_IsoMan_t *p)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
Vec_Int_t * Gia_IsoTestGenPerm(int nPis)
static Vec_Int_t * Vec_IntStartNatural(int nSize)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static void Vec_IntSort(Vec_Int_t *p, int fReverse)
void Gia_IsoAssignUnique(Gia_IsoMan_t *p)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
Gia_Man_t * Gia_ManDupFromVecs(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos, int nRegs)
void Gia_IsoAssignOneClass3(Gia_IsoMan_t *p)
void Gia_ManFindCaninicalOrder(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos, Vec_Int_t **pvPiPerm)
#define ABC_SWAP(Type, a, b)
Gia_IsoMan_t * Gia_IsoManStart(Gia_Man_t *pGia)
FUNCTION DEFINITIONS ///.
Vec_Ptr_t * Gia_IsoCollectCosClasses(Gia_IsoMan_t *p, int fVerbose)
#define ABC_PRTP(a, t, T)
#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_ManDupAppendNew(Gia_Man_t *pOne, Gia_Man_t *pTwo)
static int Gia_ManAndNum(Gia_Man_t *p)
static unsigned Gia_IsoGetItem(Gia_IsoMan_t *p, int i)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
void Gia_IsoTestOld(Gia_Man_t *p, int fVerbose)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Vec_Str_t * Gia_AigerWriteIntoMemoryStrPart(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos, int nRegs)
int Vec_IntCountNonTrivial(Vec_Ptr_t *vEquivs, int *pnUsed)
static void Vec_StrFree(Vec_Str_t *p)
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
#define Gia_ManForEachAndReverse(p, pObj, i)
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 __int64 word
DECLARATIONS ///.
static void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_IsoPrint(Gia_IsoMan_t *p, int Iter, abctime Time)
#define ABC_NAMESPACE_IMPL_END
static void Vec_VecPrintInt(Vec_Vec_t *p, int fSkipSingles)
static int s_256Primes[ISO_MASK+1]
static void Vec_VecSortByFirstInt(Vec_Vec_t *p, int fReverse)
Vec_Str_t * Gia_ManIsoFindString(Gia_Man_t *p, int iPo, int fVerbose, Vec_Int_t **pvPiPerm)
#define Gia_ManForEachAnd(p, pObj, i)
Gia_Man_t * Gia_ManSeqStructSweep(Gia_Man_t *p, int fConst, int fEquiv, int fVerbose)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Abc_QuickSort3(word *pData, int nSize, int fDecrease)
#define Gia_ManForEachPi(p, pObj, i)
static unsigned Gia_IsoUpdate(Gia_IsoMan_t *p, int Iter, int iObj, int fCompl)
void Gia_IsoTest(Gia_Man_t *p, Abc_Cex_t *pCex, int fVerbose)
void Gia_IsoSimulate(Gia_IsoMan_t *p, int Iter)
static unsigned Gia_IsoGetValue(Gia_IsoMan_t *p, int i)
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
int Gia_ObjIsMuxType(Gia_Obj_t *pNode)
static int Gia_ManCiNum(Gia_Man_t *p)
void Gia_IsoSimulateBack(Gia_IsoMan_t *p, int Iter)
static int Vec_IntSize(Vec_Int_t *p)
static int Vec_StrCompareVec(Vec_Str_t *p1, Vec_Str_t *p2)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Gia_IsoManTransferUnique(Gia_IsoMan_t *p)
static void Vec_IntShrink(Vec_Int_t *p, int nSizeNew)
Gia_Obj_t * Gia_ObjRecognizeMux(Gia_Obj_t *pNode, Gia_Obj_t **ppNodeT, Gia_Obj_t **ppNodeE)
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)
void Gia_IsoRecognizeMuxes(Gia_Man_t *pGia)
#define ABC_CALLOC(type, num)
int Gia_ObjCompareByValue(Gia_Obj_t **pp1, Gia_Obj_t **pp2)
static unsigned Gia_IsoUpdateValue(int Value, int fCompl)
static int Gia_ObjIsPo(Gia_Man_t *p, Gia_Obj_t *pObj)
Abc_Cex_t * Abc_CexPermuteTwo(Abc_Cex_t *p, Vec_Int_t *vPermOld, Vec_Int_t *vPermNew)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
#define Gia_ManForEachRo(p, pObj, i)
static void Vec_VecFreeP(Vec_Vec_t **p)
static void Vec_PtrClear(Vec_Ptr_t *p)
static void Gia_IsoSetItem(Gia_IsoMan_t *p, int i, unsigned v)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
static void Vec_IntPrint(Vec_Int_t *vVec)
void Gia_IsoReportTopmost(Gia_IsoMan_t *p)
void Gia_ManIncrementTravId(Gia_Man_t *p)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
void Abc_CexFree(Abc_Cex_t *p)
static int Gia_ManPiNum(Gia_Man_t *p)
static void Vec_IntClear(Vec_Int_t *p)
void Gia_IsoPrepare(Gia_IsoMan_t *p)
#define Gia_ManForEachPo(p, pObj, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
Vec_Str_t * Gia_AigerWriteIntoMemoryStr(Gia_Man_t *p)
static void ** Vec_PtrArray(Vec_Ptr_t *p)
static int Gia_ObjCioId(Gia_Obj_t *pObj)
static int Gia_ManObjNum(Gia_Man_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
static int Gia_ManCoNum(Gia_Man_t *p)
Vec_Ptr_t * Gia_IsoDeriveEquivPos(Gia_Man_t *pGia, int fForward, int fVerbose)
static int Gia_ManRegNum(Gia_Man_t *p)