74 p->nBTLimit = nBTLimit;
126 if ( (s0 & 1) == (s1 & 1) )
164 int Repr = -1, EntPrev = -1, Ent, i;
276 1291, 1699, 1999, 2357, 2953, 3313, 3907, 4177,
277 4831, 5147, 5647, 6343, 6899, 7103, 7873, 8147 };
281 for ( i = 0; i <
nWords; i++ )
282 uHash ^= ~pSim[i] * s_Primes[i & 0xf];
284 for ( i = 0; i <
nWords; i++ )
285 uHash ^= pSim[i] * s_Primes[i & 0xf];
286 return (
int)(uHash % nTableSize);
303 int * pTable, nTableSize, Key, i, k;
310 if ( pTable[Key] == 0 )
378 assert( p->pGia->pReprs == NULL );
478 printf(
"!!! no refinement !!!\n" );
592 if ( pRepr == NULL || pRepr->
fMark0 )
644 unsigned * pInfo, * pPres;
646 for ( i = 0; i < nLits; i++ )
654 for ( i = 0; i < nLits; i++ )
679 for ( k = 1; k < 32; k++ )
682 return (
int)(k < 32);
735 printf(
"nFails = %7d. nProves = %7d. nBoth = %7d. nTotal = %7d.\n",
736 nFails, nProves, nBoth, nTotal );
764 Vec_Ptr_t * vClasses, * vMembers, * vOldRootsNew;
765 Gia_Obj_t * pRoot, * pMember, * pMemberPrev, * pRepr, * pTempRepr;
766 int i, k, nIter, iRoot, iRootNew, iMember, iMemberPrev, status, fOneFailed;
767 int nSaved = 0, nRecords = 0, nUndec = 0, nClassRefs = 0, nTsat = 0, nMiniSat = 0;
768 clock_t clk, timeTsat = 0, timeMiniSat = 0, timeSim = 0, timeTotal = clock();
774 Pars.nBTLimit = p->nBTLimit;
796 timeTsat += clock() - clk;
802 timeMiniSat += clock() - clk;
809 else if ( status == 0 )
812 else if ( fUseMiniSat )
817 timeMiniSat += clock() - clk;
826 timeTsat += clock() - clk;
835 else if ( status == 1 )
851 for ( nIter = 0;
Vec_PtrSize(vOldRoots) > 0; nIter++ )
886 assert( iMemberPrev != iMember );
892 timeTsat += clock() - clk;
898 timeMiniSat += clock() - clk;
905 else if ( status == 0 )
908 else if ( fUseMiniSat )
913 timeMiniSat += clock() - clk;
922 timeTsat += clock() - clk;
941 else if ( status == 1 )
958 pMemberPrev = pMember;
971 timeSim += clock() - clk;
999 printf(
"nSaved = %d nRecords = %d nUndec = %d nClassRefs = %d nMiniSat = %d nTas = %d\n",
1000 nSaved, nRecords, nUndec, nClassRefs, nMiniSat, nTsat );
1002 ABC_PRT(
"MiniSat", timeMiniSat );
1004 ABC_PRT(
"Total ", clock() - timeTotal );
1035 int i, Lev, nLevels, nIters;
1046 for ( i = 0; i < 3; i++ )
1051 ABC_PRT(
"Sim", clock() - clk );
1054 ABC_PRT(
"Ref", clock() - clk );
1057 for ( Lev = 1; Lev < nLevels; Lev++ )
1060 printf(
"LEVEL %3d (out of %3d) ", Lev, nLevels );
1065 printf(
"Iters = %3d " );
1066 ABC_PRT(
"Time", clock() - clk );
Tas_Man_t * Tas_ManAlloc(Gia_Man_t *pAig, int nBTLimit)
static int Gia_ObjLevelId(Gia_Man_t *p, int Id)
static int * Vec_IntArray(Vec_Int_t *p)
void Gia_ManCreateRefs(Gia_Man_t *p)
static void Gia_ObjUnsetRepr(Gia_Man_t *p, int Id)
void Gia_ComputeEquivalences(Gia_Man_t *pGia, int nBTLimit, int fUseMiniSat, int fVerbose)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Hcd_ManCompareConst(unsigned s)
static int Abc_PrimeCudd(unsigned int p)
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START int Gia_ComputeEquivalencesLevel(Hcd_Man_t *p, Gia_Man_t *pGiaLev, Vec_Ptr_t *vOldRoots, int Level, int fUseMiniSat)
static int Gia_ObjIsClass(Gia_Man_t *p, int Id)
static int Gia_ObjPhase(Gia_Obj_t *pObj)
void Gia_ManStop(Gia_Man_t *p)
void Tas_ManStop(Tas_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
void Gia_GiarfInsertPattern(Hcd_Man_t *p, Vec_Int_t *vCex, int k)
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Hcd_ManClassesRehash(Hcd_Man_t *p, Vec_Int_t *vRefined)
static int Abc_InfoHasBit(unsigned *p, int i)
static Gia_Obj_t * Gia_ObjFromLit(Gia_Man_t *p, int iLit)
static void Abc_InfoXorBit(unsigned *p, int i)
static int Gia_ManAppendCi(Gia_Man_t *p)
static void Vec_PtrCleanSimInfo(Vec_Ptr_t *vInfo, int iWord, int nWords)
static int Gia_ObjIsHead(Gia_Man_t *p, int Id)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
static unsigned * Hcd_ObjSimP(Hcd_Man_t *p, int Id)
int Gia_GiarfStorePattern(Vec_Ptr_t *vSimInfo, Vec_Ptr_t *vPres, Vec_Int_t *vCex)
static int Vec_PtrSize(Vec_Ptr_t *p)
Vec_Ptr_t * Gia_CollectRelatedClasses(Gia_Man_t *pGia, Vec_Ptr_t *vRoots)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
void Gia_ManEquivPrintClasses(Gia_Man_t *p, int fVerbose, float Mem)
Gia_Man_t * Gia_GenerateReducedLevel(Gia_Man_t *p, int Level, Vec_Ptr_t **pvRoots)
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
#define Gia_ManForEachCi(p, pObj, i)
void Cec_ManSavePattern(Cec_ManSat_t *p, Gia_Obj_t *pObj1, Gia_Obj_t *pObj2)
static void Gia_ObjSetRepr(Gia_Man_t *p, int Id, int Num)
static int s_Primes[MAX_PRIMES]
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Abc_LitIsCompl(int Lit)
static Gia_Obj_t * Gia_ObjTempRepr(Gia_Man_t *p, int i, int Level)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Hcd_ManClassesCreate(Hcd_Man_t *p)
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
void Hcd_ManClassesRefine(Hcd_Man_t *p)
static void Gia_ObjSetProved(Gia_Man_t *p, int Id)
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Gia_ObjIsConst(Gia_Man_t *p, int Id)
#define ABC_NAMESPACE_IMPL_END
unsigned Gia_Resimulate_rec(Hcd_Man_t *p, int iObj)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
void Gia_ManEquivStop(Hcd_Man_t *p)
#define Gia_ClassForEachObj1(p, i, iObj)
#define Gia_ManForEachAnd(p, pObj, i)
static unsigned Hcd_ObjSim(Hcd_Man_t *p, int Id)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Vec_Int_t * Cec_ManSatReadCex(Cec_ManSat_t *p)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
int Hcd_ManClassRefineOne(Hcd_Man_t *p, int i)
void Gia_ManFillValue(Gia_Man_t *p)
int Hcd_ManClassClassRemoveOne(Hcd_Man_t *p, int i)
Vec_Int_t * Tas_ReadModel(Tas_Man_t *p)
static char s1[largest_string]
void Hcd_ManSimulationInit(Hcd_Man_t *p)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
#define Gia_ClassForEachObj(p, i, iObj)
static int Gia_ObjIsTravIdCurrentId(Gia_Man_t *p, int Id)
#define ABC_NAMESPACE_IMPL_START
static void Gia_ObjSetNext(Gia_Man_t *p, int Id, int Num)
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 Gia_ResimulateAndRefine(Hcd_Man_t *p, int i)
int Gia_GiarfStorePatternTry(Vec_Ptr_t *vInfo, Vec_Ptr_t *vPres, int iBit, int *pLits, int nLits)
void Cec_ManSatStop(Cec_ManSat_t *p)
static int Gia_ManCiNum(Gia_Man_t *p)
static int Gia_ObjIsTail(Gia_Man_t *p, int Id)
int Hcd_ManHashKey(unsigned *pSim, int nWords, int nTableSize)
static int Vec_IntSize(Vec_Int_t *p)
int Cec_ManSatCheckNodeTwo(Cec_ManSat_t *p, Gia_Obj_t *pObj1, Gia_Obj_t *pObj2)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_IMPL_START struct Hcd_Man_t_ Hcd_Man_t
DECLARATIONS ///.
static unsigned Hcd_ObjSetSim(Hcd_Man_t *p, int Id, unsigned n)
static int Hcd_ManCompareEqual(unsigned s0, unsigned s1)
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)
int Cec_ManSatCheckNode(Cec_ManSat_t *p, Gia_Obj_t *pObj)
static int Abc_Lit2Var(int Lit)
#define ABC_CALLOC(type, num)
void Gia_GiarfPrintClasses(Gia_Man_t *pGia)
Hcd_Man_t * Gia_ManEquivStart(Gia_Man_t *pGia, int nBTLimit, int fVerbose)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFailed(Gia_Man_t *p, int Id)
static int Gia_ObjProved(Gia_Man_t *p, int Id)
typedefABC_NAMESPACE_HEADER_START struct Cec_ParSat_t_ Cec_ParSat_t
INCLUDES ///.
static void Vec_PtrClear(Vec_Ptr_t *p)
void Gia_ManSetPhase(Gia_Man_t *p)
int Gia_ManLevelNum(Gia_Man_t *p)
int Tas_ManSolve(Tas_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pObj2)
void Gia_ManHashAlloc(Gia_Man_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 Hcd_ManSimulateSimple(Hcd_Man_t *p)
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
static void Gia_ObjSetTravIdCurrentId(Gia_Man_t *p, int Id)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
Cec_ManSat_t * Cec_ManSatCreate(Gia_Man_t *pAig, Cec_ParSat_t *pPars)
DECLARATIONS ///.
void Cec_ManSatSetDefaultParams(Cec_ParSat_t *p)
DECLARATIONS ///.
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static void Gia_ObjSetFailed(Gia_Man_t *p, int Id)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Gia_ObjRepr(Gia_Man_t *p, int Id)
int nTotal
DECLARATIONS ///.
static Vec_Ptr_t * Vec_PtrAllocSimInfo(int nEntries, int nWords)
Gia_Obj_t * Gia_CollectClassMembers(Gia_Man_t *p, Gia_Obj_t *pRepr, Vec_Ptr_t *vMembers, int Level)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
void Hcd_ManClassCreate(Gia_Man_t *pGia, Vec_Int_t *vClass)