49 assert( nSize >= 0 && nSize < (1<<30) );
75 for ( i = 0; i < p->nLits; i++ )
78 p->Sign |= ((
word)1 << (p->Lits[i] % 63));
82 for ( i = p->nLits; i < p->
nTotal; i++ )
102 assert( iRemove >= 0 && iRemove < pSet->nLits );
104 p->nLits = pSet->nLits - 1;
105 p->nTotal = pSet->nTotal - 1;
108 for ( i = 0; i < pSet->nTotal; i++ )
112 p->Lits[k++] = pSet->Lits[i];
113 if ( i >= pSet->nLits )
115 p->Sign |= ((
word)1 << (pSet->Lits[i] % 63));
136 assert( nLits >= 0 && nLits <= pSet->nLits );
139 p->nTotal = nLits + pSet->nTotal - pSet->nLits;
142 for ( i = 0; i < nLits; i++ )
145 p->Lits[k++] = pLits[i];
146 p->Sign |= ((
word)1 << (pLits[i] % 63));
149 for ( i = pSet->nLits; i < pSet->
nTotal; i++ )
150 p->Lits[k++] = pSet->Lits[i];
171 p->nLits = pSet->nLits;
172 p->nTotal = pSet->nTotal;
174 p->Sign = pSet->Sign;
175 for ( i = 0; i < pSet->nTotal; i++ )
176 p->Lits[i] = pSet->Lits[i];
210 if ( --p->nRefs == 0 )
230 for ( i = 0; i < nRegs; i++ )
233 for ( i = 0; i < p->nLits; i++ )
235 if ( p->Lits[i] == -1 )
245 pBuff[k++] = pBuff[i];
248 fprintf( pFile,
"%s", pBuff );
265 int * pOldInt, * pNewInt;
266 assert( pOld->nLits > 0 );
267 assert( pNew->nLits > 0 );
268 if ( pOld->nLits < pNew->nLits )
270 if ( (pOld->Sign & pNew->Sign) != pNew->Sign )
272 pOldInt = pOld->Lits + pOld->nLits - 1;
273 pNewInt = pNew->Lits + pNew->nLits - 1;
274 while ( pNew->Lits <= pNewInt )
276 if ( pOld->Lits > pOldInt )
280 if ( *pNewInt == *pOldInt )
281 pNewInt--, pOldInt--;
282 else if ( *pNewInt < *pOldInt )
303 int * pOldInt, * pNewInt;
304 assert( pOld->nLits > 0 );
305 assert( pNew->nLits > 0 );
306 pOldInt = pOld->Lits + pOld->nLits - 1;
307 pNewInt = pNew->Lits + pNew->nLits - 1;
308 while ( pNew->Lits <= pNewInt )
311 if ( *pNewInt == -1 )
316 if ( pOld->Lits > pOldInt )
320 if ( *pNewInt == *pOldInt )
321 pNewInt--, pOldInt--;
322 else if ( *pNewInt < *pOldInt )
344 for ( i = 0; i < pCube->nLits; i++ )
346 assert( pCube->Lits[i] != -1 );
349 if (
lit_sign( pCube->Lits[i] ) == 0 )
371 for ( i = 0; i < p1->nLits && i < p2->nLits; i++ )
373 if ( p1->Lits[i] > p2->Lits[i] )
375 if ( p1->Lits[i] < p2->Lits[i] )
378 if ( i == p1->nLits && i < p2->nLits )
380 if ( i < p1->nLits && i == p2->nLits )
439 if ( --p->
nRefs == 0 )
632 return ((
int)pNode->
fMarkA == Value);
643 pCube->Sign |= ((
word)1 << (pCube->Lits[pCube->nLits-1] % 63));
693 for ( i = 0; i < 4; i++ )
699 for ( v = 0; v < pCube->nLits; v++ )
701 if ( pCube->Lits[v] == -1 )
708 if ( v < pCube->nLits )
Pdr_Set_t * Pdr_SetRef(Pdr_Set_t *p)
Pdr_Obl_t * Pdr_QueueHead(Pdr_Man_t *p)
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Pdr_SetCompare(Pdr_Set_t **pp1, Pdr_Set_t **pp2)
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
static int lit_var(lit l)
Pdr_Set_t * Pdr_SetCreateFrom(Pdr_Set_t *pSet, int iRemove)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Pdr_Set_t * Pdr_SetCreate(Vec_Int_t *vLits, Vec_Int_t *vPiLits)
static int Abc_Var2Lit(int Var, int fCompl)
Pdr_Set_t * Pdr_SetCreateSubset(Pdr_Set_t *pSet, int *pLits, int nLits)
ABC_NAMESPACE_IMPL_START Pdr_Set_t * Pdr_SetAlloc(int nSize)
DECLARATIONS ///.
void Pdr_QueuePrint(Pdr_Man_t *p)
#define ABC_ALLOC(type, num)
void Pdr_SetPrint(FILE *pFile, Pdr_Set_t *p, int nRegs, Vec_Int_t *vFlopCounts)
Pdr_Set_t * Pdr_SetDup(Pdr_Set_t *pSet)
static int Abc_MaxInt(int a, int b)
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
void Pdr_SetDeref(Pdr_Set_t *p)
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Pdr_ObjSatValue(Aig_Man_t *pAig, Aig_Obj_t *pNode, int fCompl)
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Vec_IntSelectSort(int *pArray, int nSize)
void Pdr_QueueStop(Pdr_Man_t *p)
int Pdr_NtkFindSatAssign_rec(Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Pdr_Set_t *pCube, int Heur)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
int Pdr_QueueIsEmpty(Pdr_Man_t *p)
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
static Aig_Obj_t * Saig_ManLi(Aig_Man_t *p, int i)
typedefABC_NAMESPACE_HEADER_START struct Pdr_Set_t_ Pdr_Set_t
INCLUDES ///.
Pdr_Obl_t * Pdr_QueuePop(Pdr_Man_t *p)
int Pdr_ManCubeJust(Pdr_Man_t *p, int k, Pdr_Set_t *pCube)
void Pdr_QueuePush(Pdr_Man_t *p, Pdr_Obl_t *pObl)
static void Abc_Print(int level, const char *format,...)
Pdr_Obl_t * Pdr_OblRef(Pdr_Obl_t *p)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
int Pdr_ManCheckContainment(Pdr_Man_t *p, int k, Pdr_Set_t *pSet)
static int Vec_IntSize(Vec_Int_t *p)
void Pdr_OblDeref(Pdr_Obl_t *p)
void Pdr_QueueClean(Pdr_Man_t *p)
static int lit_sign(lit l)
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
int Pdr_SetIsInit(Pdr_Set_t *pCube, int iRemove)
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
static int Aig_ObjId(Aig_Obj_t *pObj)
int Pdr_SetContains(Pdr_Set_t *pOld, Pdr_Set_t *pNew)
Pdr_Obl_t * Pdr_OblStart(int k, int prio, Pdr_Set_t *pState, Pdr_Obl_t *pNext)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
int Pdr_SetContainsSimple(Pdr_Set_t *pOld, Pdr_Set_t *pNew)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int nTotal
DECLARATIONS ///.
static int Aig_ObjCioId(Aig_Obj_t *pObj)