49 assert( nSize >= 0 && nSize < (1<<30) );
69 assert( Vec_IntSize(vLits) + Vec_IntSize(vPiLits) < (1<<30) );
71 p->nLits = Vec_IntSize(vLits);
72 p->nTotal = Vec_IntSize(vLits) + Vec_IntSize(vPiLits);
75 for ( i = 0; i <
p->nLits; i++ )
77 p->Lits[i] = Vec_IntEntry(vLits, i);
78 p->Sign |= ((
word)1 << (
p->Lits[i] % 63));
80 Vec_IntSelectSort(
p->Lits,
p->nLits );
82 for ( i =
p->nLits; i < p->
nTotal; i++ )
83 p->Lits[i] = Vec_IntEntry(vPiLits, i-
p->nLits);
102 assert( iRemove >= 0 && iRemove < pSet->nLits );
104 p->nLits = pSet->
nLits - 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 );
142 for ( i = 0; i < nLits; i++ )
145 p->Lits[k++] = pLits[i];
146 p->Sign |= ((
word)1 << (pLits[i] % 63));
148 Vec_IntSelectSort(
p->Lits,
p->nLits );
150 p->Lits[k++] = pSet->
Lits[i];
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 )
237 pBuff[Abc_Lit2Var(
p->Lits[i])] = (Abc_LitIsCompl(
p->Lits[i])?
'0':
'1');
245 pBuff[k++] = pBuff[i];
248 fprintf( pFile,
"%s", pBuff );
266 for ( i = 0; i <
p->nLits; i++)
267 printf (
"%d ",
p->Lits[i]);
289 if ( p2->nLits < nLits )
291 vCommonLits = Vec_IntAlloc( nLits );
292 vPiLits = Vec_IntAlloc( 1 );
293 for ( i = 0, j = 0; i < p1->nLits && j < p2->nLits; )
295 if ( p1->Lits[i] > p2->Lits[j] )
297 if ( Hash_IntExists( keep, p2->Lits[j] ) )
300 Vec_IntFree( vCommonLits );
301 Vec_IntFree( vPiLits );
306 else if ( p1->Lits[i] < p2->Lits[j] )
308 if ( Hash_IntExists( keep, p1->Lits[i] ) )
311 Vec_IntFree( vCommonLits );
312 Vec_IntFree( vPiLits );
319 Vec_IntPush( vCommonLits, p1->Lits[i] );
325 Vec_IntFree( vCommonLits );
326 Vec_IntFree( vPiLits );
327 return pIntersection;
347 for ( i = 0; i < nRegs; i++ )
350 for ( i = 0; i <
p->nLits; i++ )
352 if (
p->Lits[i] == -1 )
354 pBuff[Abc_Lit2Var(
p->Lits[i])] = (Abc_LitIsCompl(
p->Lits[i])?
'0':
'1');
361 pBuff[k++] = pBuff[i];
364 Vec_StrPushBuffer( vStr, pBuff, k );
365 Vec_StrPush( vStr,
' ' );
366 Vec_StrPush( vStr,
'1' );
367 Vec_StrPush( vStr,
'\n' );
384 int * pOldInt, * pNewInt;
393 while ( pNew->
Lits <= pNewInt )
395 if ( pOld->
Lits > pOldInt )
399 if ( *pNewInt == *pOldInt )
400 pNewInt--, pOldInt--;
401 else if ( *pNewInt < *pOldInt )
422 int * pOldInt, * pNewInt;
427 while ( pNew->
Lits <= pNewInt )
430 if ( *pNewInt == -1 )
435 if ( pOld->
Lits > pOldInt )
439 if ( *pNewInt == *pOldInt )
440 pNewInt--, pOldInt--;
441 else if ( *pNewInt < *pOldInt )
463 for ( i = 0; i < pCube->
nLits; i++ )
468 if ( Abc_LitIsCompl( pCube->
Lits[i] ) == 0 )
490 for ( i = 0; i < p1->nLits && i < p2->nLits; i++ )
492 if ( p1->Lits[i] > p2->Lits[i] )
494 if ( p1->Lits[i] < p2->Lits[i] )
497 if ( i == p1->nLits && i < p2->nLits )
499 if ( i < p1->nLits && i == p2->nLits )
558 if ( --
p->nRefs == 0 )
580 return p->pQueue == NULL;
613 if (
p->pQueue == NULL )
615 p->pQueue =
p->pQueue->pLink;
656 p->nQueMax = Abc_MaxInt(
p->nQueMax,
p->nQueCur );
658 if (
p->pQueue == NULL )
663 for ( ppPrev = &
p->pQueue, pTemp =
p->pQueue; pTemp; ppPrev = &pTemp->
pLink, pTemp = pTemp->
pLink )
684 for ( pObl =
p->pQueue; pObl; pObl = pObl->
pLink )
685 Abc_Print( 1,
"Frame = %2d. Prio = %8d.\n", pObl->
iFrame, pObl->
prio );
729 if ( Aig_ObjIsTravIdCurrent(pAig, pNode) )
748 if ( Aig_ObjIsConst1(pNode) )
750 if ( Aig_ObjIsTravIdCurrent(pAig, pNode) )
751 return ((
int)pNode->
fMarkA == Value);
752 Aig_ObjSetTravIdCurrent(pAig, pNode);
754 if ( Aig_ObjIsCi(pNode) )
756 if ( Saig_ObjIsLo(pAig, pNode) )
759 pCube->
Lits[pCube->
nLits++] = Abc_Var2Lit( Aig_ObjCioId(pNode) - Saig_ManPiNum(pAig), Value );
764 assert( Aig_ObjIsNode(pNode) );
773 Value0 = Pdr_ObjSatValue( pAig, Aig_ObjFanin0(pNode), Aig_ObjFaninC0(pNode) );
776 Value1 = Pdr_ObjSatValue( pAig, Aig_ObjFanin1(pNode), Aig_ObjFaninC1(pNode) );
788 if ( Aig_ObjId(pNode) % 4 == Heur )
#define ABC_ALLOC(type, num)
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
struct Aig_Obj_t_ Aig_Obj_t
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int nTotal
DECLARATIONS ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
struct Vec_Str_t_ Vec_Str_t
struct Hash_Int_t_ Hash_Int_t
PARAMETERS ///.
unsigned __int64 word
DECLARATIONS ///.
struct Pdr_Set_t_ Pdr_Set_t
struct Pdr_Obl_t_ Pdr_Obl_t
struct Pdr_Man_t_ Pdr_Man_t
void Pdr_QueueStop(Pdr_Man_t *p)
ABC_NAMESPACE_IMPL_START Pdr_Set_t * Pdr_SetAlloc(int nSize)
DECLARATIONS ///.
void Pdr_QueueClean(Pdr_Man_t *p)
Pdr_Set_t * Pdr_SetCreate(Vec_Int_t *vLits, Vec_Int_t *vPiLits)
void Pdr_OblDeref(Pdr_Obl_t *p)
Pdr_Obl_t * Pdr_OblRef(Pdr_Obl_t *p)
Pdr_Set_t * ZPdr_SetIntersection(Pdr_Set_t *p1, Pdr_Set_t *p2, Hash_Int_t *keep)
Pdr_Set_t * Pdr_SetDup(Pdr_Set_t *pSet)
void Pdr_SetDeref(Pdr_Set_t *p)
Pdr_Obl_t * Pdr_OblStart(int k, int prio, Pdr_Set_t *pState, Pdr_Obl_t *pNext)
int Pdr_SetIsInit(Pdr_Set_t *pCube, int iRemove)
int Pdr_QueueIsEmpty(Pdr_Man_t *p)
int Pdr_NtkFindSatAssign_rec(Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Pdr_Set_t *pCube, int Heur)
int Pdr_SetContains(Pdr_Set_t *pOld, Pdr_Set_t *pNew)
void Pdr_QueuePush(Pdr_Man_t *p, Pdr_Obl_t *pObl)
void Pdr_SetPrintStr(Vec_Str_t *vStr, Pdr_Set_t *p, int nRegs, Vec_Int_t *vFlopCounts)
Pdr_Set_t * Pdr_SetRef(Pdr_Set_t *p)
void Pdr_SetPrint(FILE *pFile, Pdr_Set_t *p, int nRegs, Vec_Int_t *vFlopCounts)
Pdr_Set_t * Pdr_SetCreateFrom(Pdr_Set_t *pSet, int iRemove)
Pdr_Obl_t * Pdr_QueuePop(Pdr_Man_t *p)
int Pdr_SetContainsSimple(Pdr_Set_t *pOld, Pdr_Set_t *pNew)
void ZPdr_SetPrint(Pdr_Set_t *p)
int Pdr_SetCompare(Pdr_Set_t **pp1, Pdr_Set_t **pp2)
void Pdr_QueuePrint(Pdr_Man_t *p)
Pdr_Obl_t * Pdr_QueueHead(Pdr_Man_t *p)
Pdr_Set_t * Pdr_SetCreateSubset(Pdr_Set_t *pSet, int *pLits, int nLits)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.