51 for ( i = 0; i < (int)pDom->
nLeaves; i++ )
53 for ( k = 0; k < (int)pCut->
nLeaves; k++ )
77 Cut_Cut_t * pCut, * pCut2, * pDom, * pPrev;
79 *ppListR = pList, ppListR = &pList->
pNext;
104 *ppListR = pCut, ppListR = &pCut->
pNext;
158 for ( a = 2; a <= (int)pCut->
nLeaves; a++ )
178 ppTail = pSuperList->pHead + a;
184 ppTail = &pTemp->
pNext;
193 if ( pSuperList->pHead[a] == pTemp )
194 pSuperList->pHead[a] = pTemp->
pNext;
196 if ( pSuperList->ppTail[a] == &pTemp->
pNext )
197 pSuperList->ppTail[a] = ppTail;
199 *ppTail = pTemp->
pNext;
204 ppTail = &pTemp->
pNext;
206 assert( ppTail == pSuperList->ppTail[a] );
207 assert( *ppTail == NULL );
229 for ( a = 0; a < (int)pCut->
nLeaves; a++ )
252 Cut_Cut_t * pPrev, * pTemp, * pTemp2, ** ppTail;
275 ppTail = &pPrev->
pNext;
281 ppTail = &pTemp->
pNext;
290 *ppTail = pTemp->
pNext;
295 ppTail = &pTemp->
pNext;
297 assert( *ppTail == NULL );
386 Cut_NodeDoComputeCuts( p, pSuper, Node, fCompl0, fCompl1,
Cut_NodeReadCutsNew(p, Node0),
Cut_NodeReadCutsNew(p, Node1), fTriv, TreeCode );
449 int DelayMin, DelayCur, i;
460 for ( i = 0; i < (int)pCut->
nLeaves; i++ )
463 if ( DelayMin > DelayCur )
466 if ( DelayMin == 1000000 )
492 int Delay0, Delay1, Delay;
498 if ( Delay0 == Delay1 )
499 Delay = (Delay0 == 0) ? Delay0 + 1: Delay0;
500 else if ( Delay0 > Delay1 )
522 pCut->
pLeaves[0] = Node0 < Node1 ? Node0 : Node1;
523 pCut->
pLeaves[1] = Node0 < Node1 ? Node1 : Node0;
551 if ( pCut == NULL || pCut->
nLeaves == 1 )
554 for ( i = 0; i < (int)pCut->
nLeaves; i++ )
574 Cut_Cut_t * pStop0, * pStop1, * pTemp0, * pTemp1;
575 Cut_Cut_t * pStore0 = NULL, * pStore1 = NULL;
576 int i, nCutsOld, Limit;
586 if ( pList0 == NULL || pList1 == NULL || (p->
pParams->
fLocal && TreeCode) )
601 pStore0 = pList0->
pNext;
602 pList0->
pNext = NULL;
607 pStore1 = pList1->
pNext;
608 pList1->
pNext = NULL;
612 if ( pStop0->
nLeaves == (
unsigned)Limit )
615 if ( pStop1->
nLeaves == (
unsigned)Limit )
650 for ( i = 0; i < Limit; i++ )
662 pList0->
pNext = pStore0;
664 pList1->
pNext = pStore1;
681 Cut_Cut_t * pList, * pListStart, * pCut, * pCut2;
702 pListStart = pList->
pNext;
712 if ( pCut->
nLeaves == (
unsigned)Limit )
722 pListStart = pCut->
pNext;
752 pListStart = pCut->
pNext;
780 p->
nNodes -= vNodes->nSize - 1;
798 Cut_Cut_t * pList, * pListStart, * pCut, * pCut2, * pTop;
824 if ( i == 0 && CutSetNum >= 0 )
841 pListStart = pList->
pNext;
855 if ( pCut->
nLeaves == (
unsigned)Limit )
878 pListStart = pCut->
pNext;
921 pListStart = pCut->
pNext;
945 if ( CutSetNum >= 0 )
988 printf(
"******************* These are contained cuts:\n" );
ABC_NAMESPACE_IMPL_START Cut_Cut_t * Cut_CutAlloc(Cut_Man_t *p)
DECLARATIONS ///.
static Cut_Cut_t * Cut_ListFinish(Cut_List_t *p)
Cut_Cut_t * Cut_NodeUnionCuts(Cut_Man_t *p, Vec_Int_t *vNodes)
static int Cut_CutCheckDominance(Cut_Cut_t *pDom, Cut_Cut_t *pCut)
FUNCTION DEFINITIONS ///.
Cut_Cut_t * Cut_NodeReadCutsTemp(Cut_Man_t *p, int Node)
Cut_Cut_t * Cut_NodeReadCutsOld(Cut_Man_t *p, int Node)
static void Cut_ListAdd(Cut_List_t *p, Cut_Cut_t *pCut)
Cut_Cut_t * Cut_NodeComputeCuts(Cut_Man_t *p, int Node, int Node0, int Node1, int fCompl0, int fCompl1, int fTriv, int TreeCode)
static int Cut_CutFilterGlobal(Cut_Man_t *p, Cut_Cut_t *pCut)
#define Cut_ListForEachCutStop(pList, pCut, pStop)
typedefABC_NAMESPACE_HEADER_START struct Cut_ListStruct_t_ Cut_List_t
INCLUDES ///.
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
static int Cut_CutProcessTwo(Cut_Man_t *p, Cut_Cut_t *pCut0, Cut_Cut_t *pCut1, Cut_List_t *pSuperList)
static int Cut_CutFilterOne(Cut_Man_t *p, Cut_List_t *pSuperList, Cut_Cut_t *pCut)
#define Cut_ListForEachCutSafe(pList, pCut, pCut2)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Cut_CutListVerify(Cut_Cut_t *pList)
static int Cut_CutFilterOneEqual(Cut_Man_t *p, Cut_List_t *pSuperList, Cut_Cut_t *pCut)
static unsigned * Cut_CutReadTruth(Cut_Cut_t *p)
static void Vec_PtrFillExtra(Vec_Ptr_t *p, int nSize, void *Fill)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Cut_Cut_t * Cut_NodeUnionCutsSeq(Cut_Man_t *p, Vec_Int_t *vNodes, int CutSetNum, int fFirst)
static abctime Abc_Clock()
void Cut_NodeWriteCutsTemp(Cut_Man_t *p, int Node, Cut_Cut_t *pList)
static void Cut_CutFilter(Cut_Man_t *p, Cut_Cut_t *pList)
void Cut_TruthCompute(Cut_Man_t *p, Cut_Cut_t *pCut, Cut_Cut_t *pCut0, Cut_Cut_t *pCut1, int fCompl0, int fCompl1)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Cut_CutReadLeaveNum(Cut_Cut_t *p)
void Aig_RManRecord(unsigned *pTruth, int nVarsInit)
void Cut_NodeFreeCuts(Cut_Man_t *p, int Node)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static ABC_NAMESPACE_IMPL_START int Cut_NodeMapping(Cut_Man_t *p, Cut_Cut_t *pCuts, int Node, int Node0, int Node1)
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntPush(Vec_Int_t *p, int Entry)
void Cut_CutNumberList(Cut_Cut_t *pList)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
void Cut_CutPrint(Cut_Cut_t *pCut, int fSeq)
void Cut_NodeDoComputeCuts(Cut_Man_t *p, Cut_List_t *pSuper, int Node, int fCompl0, int fCompl1, Cut_Cut_t *pList0, Cut_Cut_t *pList1, int fTriv, int TreeCode)
Cut_Cut_t * Cut_CutCreateTriv(Cut_Man_t *p, int Node)
void Cut_CutRecycle(Cut_Man_t *p, Cut_Cut_t *pCut)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
#define ABC_NAMESPACE_IMPL_START
int Cut_ManMappingArea_rec(Cut_Man_t *p, int Node)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static void Cut_ListStart(Cut_List_t *p)
MACRO DEFINITIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
static int Cut_NodeMapping2(Cut_Man_t *p, Cut_Cut_t *pCuts, int Node, int Node0, int Node1)
Cut_Cut_t * Cut_CutMergeTwo(Cut_Man_t *p, Cut_Cut_t *pCut0, Cut_Cut_t *pCut1)
static int Cut_CutFilterOld(Cut_Man_t *p, Cut_Cut_t *pList, Cut_Cut_t *pCut)
static void Vec_PtrClear(Vec_Ptr_t *p)
#define Cut_ListForEachCut(pList, pCut)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
void Cut_NodeWriteCutsNew(Cut_Man_t *p, int Node, Cut_Cut_t *pList)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Cut_Cut_t * Cut_NodeReadCutsNew(Cut_Man_t *p, int Node)
MACRO DEFINITIONS ///.