diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-03-09 19:32:44 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-03-09 19:32:44 -0800 |
commit | 2c8f1a67ec9295450a72fc27cbb3ed1177945734 (patch) | |
tree | 5386dd978ded397a75b6a9c06fe46b3789468beb /src | |
parent | 34078de8d6414bb832d26c33578a1fcdfa21b750 (diff) | |
download | abc-2c8f1a67ec9295450a72fc27cbb3ed1177945734.tar.gz abc-2c8f1a67ec9295450a72fc27cbb3ed1177945734.tar.bz2 abc-2c8f1a67ec9295450a72fc27cbb3ed1177945734.zip |
Renamed Aig_ManForEachPi/Po to be ...Ci/Co and Aig_ObjCreatePi/Po to be ...Ci/Co.
Diffstat (limited to 'src')
132 files changed, 865 insertions, 865 deletions
diff --git a/src/aig/aig/aig.h b/src/aig/aig/aig.h index 52985546..9d4a877b 100644 --- a/src/aig/aig/aig.h +++ b/src/aig/aig/aig.h @@ -389,14 +389,14 @@ static inline void Aig_ManRecycleMemory( Aig_Man_t * p, Aig_Obj_t * pEntry ) //////////////////////////////////////////////////////////////////////// // iterator over the primary inputs -#define Aig_ManForEachPi( p, pObj, i ) \ +#define Aig_ManForEachCi( p, pObj, i ) \ Vec_PtrForEachEntry( Aig_Obj_t *, p->vPis, pObj, i ) -#define Aig_ManForEachPiReverse( p, pObj, i ) \ +#define Aig_ManForEachCiReverse( p, pObj, i ) \ Vec_PtrForEachEntryReverse( Aig_Obj_t *, p->vPis, pObj, i ) // iterator over the primary outputs -#define Aig_ManForEachPo( p, pObj, i ) \ +#define Aig_ManForEachCo( p, pObj, i ) \ Vec_PtrForEachEntry( Aig_Obj_t *, p->vPos, pObj, i ) -#define Aig_ManForEachPoReverse( p, pObj, i ) \ +#define Aig_ManForEachCoReverse( p, pObj, i ) \ Vec_PtrForEachEntryReverse( Aig_Obj_t *, p->vPos, pObj, i ) // iterators over all objects, including those currently not used #define Aig_ManForEachObj( p, pObj, i ) \ @@ -538,8 +538,8 @@ extern int Aig_NodeMffcLabel( Aig_Man_t * p, Aig_Obj_t * pNode, floa extern int Aig_NodeMffcLabelCut( Aig_Man_t * p, Aig_Obj_t * pNode, Vec_Ptr_t * vLeaves ); extern int Aig_NodeMffcExtendCut( Aig_Man_t * p, Aig_Obj_t * pNode, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vResult ); /*=== aigObj.c ==========================================================*/ -extern Aig_Obj_t * Aig_ObjCreatePi( Aig_Man_t * p ); -extern Aig_Obj_t * Aig_ObjCreatePo( Aig_Man_t * p, Aig_Obj_t * pDriver ); +extern Aig_Obj_t * Aig_ObjCreateCi( Aig_Man_t * p ); +extern Aig_Obj_t * Aig_ObjCreateCo( Aig_Man_t * p, Aig_Obj_t * pDriver ); extern Aig_Obj_t * Aig_ObjCreate( Aig_Man_t * p, Aig_Obj_t * pGhost ); extern void Aig_ObjConnect( Aig_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pFan0, Aig_Obj_t * pFan1 ); extern void Aig_ObjDisconnect( Aig_Man_t * p, Aig_Obj_t * pObj ); diff --git a/src/aig/aig/aigCanon.c b/src/aig/aig/aigCanon.c index 2c5e4d17..d51132c9 100644 --- a/src/aig/aig/aigCanon.c +++ b/src/aig/aig/aigCanon.c @@ -579,7 +579,7 @@ void Aig_RManSaveOne( Aig_RMan_t * p, unsigned * pTruth, int nVars ) Bdc_FunCopyHop(Bdc_FuncFanin1(pFunc)) ) ); } pTerm = Bdc_FunCopyHop( Bdc_ManRoot(p->pBidec) ); - pTerm = Aig_ObjCreatePo( p->pAig, pTerm ); + pTerm = Aig_ObjCreateCo( p->pAig, pTerm ); // assert( pTerm->fPhase == 0 ); } diff --git a/src/aig/aig/aigCheck.c b/src/aig/aig/aigCheck.c index 298c5595..6458cd6a 100644 --- a/src/aig/aig/aigCheck.c +++ b/src/aig/aig/aigCheck.c @@ -47,7 +47,7 @@ int Aig_ManCheck( Aig_Man_t * p ) Aig_Obj_t * pObj, * pObj2; int i; // check primary inputs - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { if ( Aig_ObjFanin0(pObj) || Aig_ObjFanin1(pObj) ) { @@ -56,7 +56,7 @@ int Aig_ManCheck( Aig_Man_t * p ) } } // check primary outputs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { if ( !Aig_ObjFanin0(pObj) ) { diff --git a/src/aig/aig/aigCuts.c b/src/aig/aig/aigCuts.c index acff77d2..ed824fac 100644 --- a/src/aig/aig/aigCuts.c +++ b/src/aig/aig/aigCuts.c @@ -637,7 +637,7 @@ Aig_ManCut_t * Aig_ComputeCuts( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, in // start the manager p = Aig_ManCutStart( pAig, nCutsMax, nLeafMax, fTruth, fVerbose ); // set elementary cuts at the PIs - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) Aig_ObjPrepareCuts( p, pObj, 1 ); // process the nodes Aig_ManForEachNode( pAig, pObj, i ) diff --git a/src/aig/aig/aigDfs.c b/src/aig/aig/aigDfs.c index 2da609f3..671dad0d 100644 --- a/src/aig/aig/aigDfs.c +++ b/src/aig/aig/aigDfs.c @@ -153,12 +153,12 @@ Vec_Ptr_t * Aig_ManDfs( Aig_Man_t * p, int fNodesOnly ) vNodes = Vec_PtrAlloc( Aig_ManObjNumMax(p) ); // mark PIs if they should not be collected if ( fNodesOnly ) - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Aig_ObjSetTravIdCurrent( p, pObj ); else Vec_PtrPush( vNodes, Aig_ManConst1(p) ); // collect nodes reachable in the DFS order - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ManDfs_rec( p, fNodesOnly? Aig_ObjFanin0(pObj): pObj, vNodes ); if ( fNodesOnly ) assert( Vec_PtrSize(vNodes) == Aig_ManNodeNum(p) ); @@ -222,9 +222,9 @@ Vec_Ptr_t * Aig_ManDfsAll( Aig_Man_t * p ) Aig_ObjSetTravIdCurrent( p, Aig_ManConst1(p) ); Vec_PtrPush( vNodes, Aig_ManConst1(p) ); // collect nodes reachable in the DFS order - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ManDfsAll_rec( p, pObj, vNodes ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) if ( !Aig_ObjIsTravIdCurrent(p, pObj) ) Vec_PtrPush( vNodes, pObj ); assert( Vec_PtrSize(vNodes) == Aig_ManObjNum(p) ); @@ -279,12 +279,12 @@ Vec_Ptr_t * Aig_ManDfsPreorder( Aig_Man_t * p, int fNodesOnly ) vNodes = Vec_PtrAlloc( Aig_ManObjNumMax(p) ); // mark PIs if they should not be collected if ( fNodesOnly ) - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Aig_ObjSetTravIdCurrent( p, pObj ); else Vec_PtrPush( vNodes, Aig_ManConst1(p) ); // collect nodes reachable in the DFS order - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ManDfsPreorder_rec( p, fNodesOnly? Aig_ObjFanin0(pObj): pObj, vNodes ); if ( fNodesOnly ) assert( Vec_PtrSize(vNodes) == Aig_ManNodeNum(p) ); @@ -338,7 +338,7 @@ Vec_Ptr_t * Aig_ManDfsNodes( Aig_Man_t * p, Aig_Obj_t ** ppNodes, int nNodes ) Aig_ManIncrementTravId( p ); // mark constant and PIs Aig_ObjSetTravIdCurrent( p, Aig_ManConst1(p) ); -// Aig_ManForEachPi( p, pObj, i ) +// Aig_ManForEachCi( p, pObj, i ) // Aig_ObjSetTravIdCurrent( p, pObj ); // go through the nodes vNodes = Vec_PtrAlloc( Aig_ManNodeNum(p) ); @@ -397,11 +397,11 @@ Vec_Ptr_t * Aig_ManDfsChoices( Aig_Man_t * p ) Aig_ManIncrementTravId( p ); // mark constant and PIs Aig_ObjSetTravIdCurrent( p, Aig_ManConst1(p) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Aig_ObjSetTravIdCurrent( p, pObj ); // go through the nodes vNodes = Vec_PtrAlloc( Aig_ManNodeNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ManDfsChoices_rec( p, Aig_ObjFanin0(pObj), vNodes ); return vNodes; } @@ -450,7 +450,7 @@ Vec_Ptr_t * Aig_ManDfsReverse( Aig_Man_t * p ) int i; Aig_ManIncrementTravId( p ); // mark POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ObjSetTravIdCurrent( p, pObj ); // go through the nodes vNodes = Vec_PtrAlloc( Aig_ManNodeNum(p) ); @@ -476,7 +476,7 @@ int Aig_ManLevelNum( Aig_Man_t * p ) Aig_Obj_t * pObj; int i, LevelsMax; LevelsMax = 0; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) LevelsMax = Abc_MaxInt( LevelsMax, (int)Aig_ObjFanin0(pObj)->Level ); return LevelsMax; } @@ -574,14 +574,14 @@ int Aig_ManChoiceLevel( Aig_Man_t * p ) Aig_ObjSetLevel( pObj, 0 ); Aig_ManSetPioNumbers( p ); Aig_ManIncrementTravId( p ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { Aig_ManChoiceLevel_rec( p, pObj ); if ( LevelMax < Aig_ObjLevel(pObj) ) LevelMax = Aig_ObjLevel(pObj); } // account for dangling boxes - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { Aig_ManChoiceLevel_rec( p, pObj ); if ( LevelMax < Aig_ObjLevel(pObj) ) @@ -898,7 +898,7 @@ Aig_Obj_t * Aig_Transfer( Aig_Man_t * pSour, Aig_Man_t * pDest, Aig_Obj_t * pRoo if ( Aig_ObjIsConst1( Aig_Regular(pRoot) ) ) return Aig_NotCond( Aig_ManConst1(pDest), Aig_IsComplement(pRoot) ); // set the PI mapping - Aig_ManForEachPi( pSour, pObj, i ) + Aig_ManForEachCi( pSour, pObj, i ) { if ( i == nVars ) break; diff --git a/src/aig/aig/aigDoms.c b/src/aig/aig/aigDoms.c index b81279b2..2bbb06b9 100644 --- a/src/aig/aig/aigDoms.c +++ b/src/aig/aig/aigDoms.c @@ -636,7 +636,7 @@ Aig_Sto_t * Aig_ManComputeDomsFlops( Aig_Man_t * pAig, int Limit ) Aig_ObjDomCompute( pSto, pObj ); Vec_PtrFree( vNodes ); // compute combinational inputs - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) Aig_ObjDomCompute( pSto, pObj ); // print statistics printf( "Nodes =%4d. Flops =%4d. Doms =%9d. Ave =%8.2f. ", @@ -666,7 +666,7 @@ Aig_Sto_t * Aig_ManComputeDomsPis( Aig_Man_t * pAig, int Limit ) int i, clk = clock(); pSto = Aig_ManDomStart( pAig, Limit ); // initialize flop inputs - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) Aig_ObjAddTriv( pSto, pObj->Id, Vec_PtrAlloc(1) ); // compute internal nodes vNodes = Aig_ManDfsReverse( pAig ); @@ -706,7 +706,7 @@ Aig_Sto_t * Aig_ManComputeDomsNodes( Aig_Man_t * pAig, int Limit ) int i, clk = clock(); pSto = Aig_ManDomStart( pAig, Limit ); // initialize flop inputs - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) Aig_ObjAddTriv( pSto, pObj->Id, Vec_PtrAlloc(1) ); // compute internal nodes vNodes = Aig_ManDfsReverse( pAig ); @@ -714,7 +714,7 @@ Aig_Sto_t * Aig_ManComputeDomsNodes( Aig_Man_t * pAig, int Limit ) Aig_ObjDomCompute( pSto, pObj ); Vec_PtrFree( vNodes ); // compute combinational inputs - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) Aig_ObjDomCompute( pSto, pObj ); // print statistics printf( "Nodes =%6d. Doms =%9d. Ave =%8.2f. ", diff --git a/src/aig/aig/aigDup.c b/src/aig/aig/aigDup.c index 44e7f120..3c5e6b3b 100644 --- a/src/aig/aig/aigDup.c +++ b/src/aig/aig/aigDup.c @@ -62,9 +62,9 @@ Aig_Man_t * Aig_ManDupSimple( Aig_Man_t * p ) Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Aig_ManConst1(pNew)->pHaig = Aig_ManConst1(p)->pHaig; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->pHaig = pObj->pHaig; pObjNew->Level = pObj->Level; pObj->pData = pObjNew; @@ -84,9 +84,9 @@ Aig_Man_t * Aig_ManDupSimple( Aig_Man_t * p ) pObj->pData = pObjNew; } // add the POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); pObjNew->pHaig = pObj->pHaig; pObj->pData = pObjNew; } @@ -128,9 +128,9 @@ Aig_Man_t * Aig_ManDupSimpleWithHints( Aig_Man_t * p, Vec_Int_t * vHints ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Entry = Vec_IntEntry( vHints, Aig_ObjId(pObj) ); if ( Entry == 0 || Entry == 1 ) pObj->pData = Aig_NotCond( Aig_ManConst1(pNew), Entry ); // restrict to the complement of constraint!!! @@ -144,8 +144,8 @@ Aig_Man_t * Aig_ManDupSimpleWithHints( Aig_Man_t * p, Vec_Int_t * vHints ) pObj->pData = Aig_NotCond( Aig_ManConst1(pNew), Entry ); // restrict to the complement of constraint!!! } // add the POs - Aig_ManForEachPo( p, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ManForEachCo( p, pObj, i ) + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Aig_ManCleanup( pNew ); Aig_ManSetRegNum( pNew, Aig_ManRegNum(p) ); // check the resulting network @@ -213,9 +213,9 @@ Aig_Man_t * Aig_ManDupSimpleDfs( Aig_Man_t * p ) Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Aig_ManConst1(pNew)->pHaig = Aig_ManConst1(p)->pHaig; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->pHaig = pObj->pHaig; pObjNew->Level = pObj->Level; pObj->pData = pObjNew; @@ -228,9 +228,9 @@ Aig_Man_t * Aig_ManDupSimpleDfs( Aig_Man_t * p ) assert( pObj->Level == ((Aig_Obj_t*)pObj->pData)->Level ); } // add the POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); pObjNew->pHaig = pObj->pHaig; pObj->pData = pObjNew; } @@ -270,13 +270,13 @@ Aig_Man_t * Aig_ManDupSimpleDfsPart( Aig_Man_t * p, Vec_Ptr_t * vPis, Vec_Ptr_t Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1( pNew ); Vec_PtrForEachEntry( Aig_Obj_t *, vPis, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); // duplicate internal nodes Vec_PtrForEachEntry( Aig_Obj_t *, vPos, pObj, i ) { pObjNew = Aig_ManDupSimpleDfs_rec( pNew, p, Aig_ObjFanin0(pObj) ); pObjNew = Aig_NotCond( pObjNew, Aig_ObjFaninC0(pObj) ); - Aig_ObjCreatePo( pNew, pObjNew ); + Aig_ObjCreateCo( pNew, pObjNew ); } Aig_ManSetRegNum( pNew, 0 ); // check the resulting network @@ -324,12 +324,12 @@ Aig_Man_t * Aig_ManDupOrdered( Aig_Man_t * p ) } else if ( Aig_ObjIsPi(pObj) ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->Level = pObj->Level; } else if ( Aig_ObjIsPo(pObj) ) { - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } else if ( Aig_ObjIsConst1(pObj) ) { @@ -389,13 +389,13 @@ Aig_Man_t * Aig_ManDupCof( Aig_Man_t * p, int iInput, int Value ) Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Aig_ManConst1(pNew)->pHaig = Aig_ManConst1(p)->pHaig; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { if ( i == iInput ) pObjNew = Value ? Aig_ManConst1(pNew) : Aig_ManConst0(pNew); else { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->pHaig = pObj->pHaig; pObjNew->Level = pObj->Level; } @@ -416,9 +416,9 @@ Aig_Man_t * Aig_ManDupCof( Aig_Man_t * p, int iInput, int Value ) pObj->pData = pObjNew; } // add the POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); pObjNew->pHaig = pObj->pHaig; pObj->pData = pObjNew; } @@ -467,9 +467,9 @@ Aig_Man_t * Aig_ManDupTrim( Aig_Man_t * p ) if ( Aig_ObjIsNode(pObj) ) pObjNew = Aig_Oper( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj), Aig_ObjType(pObj) ); else if ( Aig_ObjIsPi(pObj) ) - pObjNew = (Aig_ObjRefs(pObj) > 0 || Saig_ObjIsLo(p, pObj)) ? Aig_ObjCreatePi(pNew) : NULL; + pObjNew = (Aig_ObjRefs(pObj) > 0 || Saig_ObjIsLo(p, pObj)) ? Aig_ObjCreateCi(pNew) : NULL; else if ( Aig_ObjIsPo(pObj) ) - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); else if ( Aig_ObjIsConst1(pObj) ) pObjNew = Aig_ManConst1(pNew); else @@ -526,12 +526,12 @@ Aig_Man_t * Aig_ManDupExor( Aig_Man_t * p ) } else if ( Aig_ObjIsPi(pObj) ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->Level = pObj->Level; } else if ( Aig_ObjIsPo(pObj) ) { - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } else if ( Aig_ObjIsConst1(pObj) ) { @@ -628,7 +628,7 @@ Aig_Man_t * Aig_ManDupDfs( Aig_Man_t * p ) { if ( Aig_ObjIsPi(pObj) ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->Level = pObj->Level; pObjNew->pHaig = pObj->pHaig; pObj->pData = pObjNew; @@ -637,7 +637,7 @@ Aig_Man_t * Aig_ManDupDfs( Aig_Man_t * p ) { Aig_ManDupDfs_rec( pNew, p, Aig_ObjFanin0(pObj) ); // assert( pObj->Level == ((Aig_Obj_t*)pObj->pData)->Level ); - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); pObjNew->pHaig = pObj->pHaig; pObj->pData = pObjNew; } @@ -775,7 +775,7 @@ Aig_Man_t * Aig_ManDupDfsGuided( Aig_Man_t * p, Vec_Ptr_t * vPios ) { if ( Aig_ObjIsPi(pObj) ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->Level = pObj->Level; Aig_Regular(pObjNew)->pHaig = pObj->pHaig; pObj->pData = pObjNew; @@ -784,7 +784,7 @@ Aig_Man_t * Aig_ManDupDfsGuided( Aig_Man_t * p, Vec_Ptr_t * vPios ) { Aig_ManDupDfsGuided_rec( pNew, p, Aig_ObjFanin0(pObj) ); // assert( pObj->Level == ((Aig_Obj_t*)pObj->pData)->Level ); - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Aig_Regular(pObjNew)->pHaig = pObj->pHaig; pObj->pData = pObjNew; } @@ -841,9 +841,9 @@ Aig_Man_t * Aig_ManDupLevelized( Aig_Man_t * p ) // create the PIs Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Aig_ManConst1(pNew)->pHaig = Aig_ManConst1(p)->pHaig; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->pHaig = pObj->pHaig; pObjNew->Level = pObj->Level; pObj->pData = pObjNew; @@ -858,9 +858,9 @@ Aig_Man_t * Aig_ManDupLevelized( Aig_Man_t * p ) } Vec_VecFree( vLevels ); // duplicate POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); pObjNew->pHaig = pObj->pHaig; pObj->pData = pObjNew; } @@ -900,8 +900,8 @@ Aig_Man_t * Aig_ManDupWithoutPos( Aig_Man_t * p ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); // duplicate internal nodes Aig_ManForEachObj( p, pObj, i ) { @@ -931,7 +931,7 @@ Aig_Man_t * Aig_ManDupFlopsOnly( Aig_Man_t * p ) int i; pNew = Aig_ManDupWithoutPos( p ); Saig_ManForEachLi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Aig_ManCleanup( pNew ); Aig_ManSetRegNum( pNew, Aig_ManRegNum(p) ); if ( !Aig_ManCheck(pNew) ) @@ -993,11 +993,11 @@ Aig_Man_t * Aig_ManDupRepres( Aig_Man_t * p ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Repres(p, pObj), Aig_ObjChild1Repres(p, pObj) ); else if ( Aig_ObjIsPi(pObj) ) { - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); pObj->pData = Aig_ObjGetRepres( p, pObj ); } else if ( Aig_ObjIsPo(pObj) ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Repres(p, pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Repres(p, pObj) ); else if ( Aig_ObjIsConst1(pObj) ) pObj->pData = Aig_ManConst1(pNew); else @@ -1066,11 +1066,11 @@ Aig_Man_t * Aig_ManDupRepresDfs( Aig_Man_t * p ) if ( Aig_ObjIsNode(pObj) ) continue; if ( Aig_ObjIsPi(pObj) ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); else if ( Aig_ObjIsPo(pObj) ) { Aig_ManDupRepres_rec( pNew, p, Aig_ObjFanin0(pObj) ); - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Repres(p, pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Repres(p, pObj) ); } else if ( Aig_ObjIsConst1(pObj) ) pObj->pData = Aig_ManConst1(pNew); @@ -1113,13 +1113,13 @@ Aig_Man_t * Aig_ManCreateMiter( Aig_Man_t * p1, Aig_Man_t * p2, int Oper ) pNew = Aig_ManStart( Aig_ManObjNumMax(p1) + Aig_ManObjNumMax(p2) ); // add first AIG Aig_ManConst1(p1)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p1, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p1, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); Aig_ManForEachNode( p1, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // add second AIG Aig_ManConst1(p2)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p2, pObj, i ) + Aig_ManForEachCi( p2, pObj, i ) pObj->pData = Aig_ManPi( pNew, i ); Aig_ManForEachNode( p2, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -1134,7 +1134,7 @@ Aig_Man_t * Aig_ManCreateMiter( Aig_Man_t * p1, Aig_Man_t * p2, int Oper ) pObj = Aig_And( pNew, Aig_ObjChild0Copy(Aig_ManPo(p1,0)), Aig_ObjChild0Copy(Aig_ManPo(p2,0)) ); else assert( 0 ); - Aig_ObjCreatePo( pNew, pObj ); + Aig_ObjCreateCo( pNew, pObj ); Aig_ManCleanup( pNew ); return pNew; } @@ -1168,8 +1168,8 @@ Aig_Man_t * Aig_ManDupOrpos( Aig_Man_t * p, int fAddRegs ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); // set registers pNew->nRegs = fAddRegs? p->nRegs : 0; pNew->nTruePis = fAddRegs? p->nTruePis : p->nTruePis + p->nRegs; @@ -1181,12 +1181,12 @@ Aig_Man_t * Aig_ManDupOrpos( Aig_Man_t * p, int fAddRegs ) pMiter = Aig_ManConst0(pNew); Aig_ManForEachPoSeq( p, pObj, i ) pMiter = Aig_Or( pNew, pMiter, Aig_ObjChild0Copy(pObj) ); - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); // create register inputs with MUXes if ( fAddRegs ) { Aig_ManForEachLiSeq( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManCleanup( pNew ); return pNew; @@ -1217,8 +1217,8 @@ Aig_Man_t * Aig_ManDupOneOutput( Aig_Man_t * p, int iPoNum, int fAddRegs ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); // set registers pNew->nRegs = fAddRegs? p->nRegs : 0; pNew->nTruePis = fAddRegs? p->nTruePis : p->nTruePis + p->nRegs; @@ -1228,12 +1228,12 @@ Aig_Man_t * Aig_ManDupOneOutput( Aig_Man_t * p, int iPoNum, int fAddRegs ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create the PO pObj = Aig_ManPo( p, iPoNum ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); // create register inputs with MUXes if ( fAddRegs ) { Aig_ManForEachLiSeq( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManCleanup( pNew ); return pNew; @@ -1268,8 +1268,8 @@ Aig_Man_t * Aig_ManDupUnsolvedOutputs( Aig_Man_t * p, int fAddRegs ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); // create the POs nOuts = 0; Aig_ManForEachPoSeq( p, pObj, i ) @@ -1284,12 +1284,12 @@ Aig_Man_t * Aig_ManDupUnsolvedOutputs( Aig_Man_t * p, int fAddRegs ) // create the PO Aig_ManForEachPoSeq( p, pObj, i ) if ( Aig_ObjFanin0(pObj) != Aig_ManConst1(p) ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); // create register inputs with MUXes if ( fAddRegs ) { Aig_ManForEachLiSeq( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManCleanup( pNew ); return pNew; @@ -1322,18 +1322,18 @@ Aig_Man_t * Aig_ManDupArray( Vec_Ptr_t * vArray ) // create the new manager pNew = Aig_ManStart( 10000 ); pNew->pName = Abc_UtilStrsav( p->pName ); - Aig_ManForEachPi( p, pObj, i ) - Aig_ObjCreatePi(pNew); + Aig_ManForEachCi( p, pObj, i ) + Aig_ObjCreateCi(pNew); // create the PIs Vec_PtrForEachEntry( Aig_Man_t *, vArray, p, k ) { Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->pData = Aig_ManPi( pNew, i ); Aig_ManForEachNode( p, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); - Aig_ManForEachPo( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ManForEachCo( p, pObj, i ) + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManSetRegNum( pNew, Aig_ManRegNum(p) ); // check the resulting network @@ -1368,12 +1368,12 @@ Aig_Man_t * Aig_ManDupNodes( Aig_Man_t * pMan, Vec_Ptr_t * vArray ) Aig_ManConst1(pMan)->pData = Aig_ManConst1(pNew); Vec_PtrForEachEntry( Aig_Obj_t *, vObjs, pObj, i ) if ( Aig_ObjIsPi(pObj) ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrForEachEntry( Aig_Obj_t *, vObjs, pObj, i ) if ( Aig_ObjIsNode(pObj) ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); Vec_PtrForEachEntry( Aig_Obj_t *, vArray, pObj, i ) - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)pObj->pData ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)pObj->pData ); Aig_ManSetRegNum( pNew, 0 ); Vec_PtrFree( vObjs ); return pNew; diff --git a/src/aig/aig/aigFrames.c b/src/aig/aig/aigFrames.c index 6840aadf..2d111044 100644 --- a/src/aig/aig/aigFrames.c +++ b/src/aig/aig/aigFrames.c @@ -69,7 +69,7 @@ Aig_Man_t * Aig_ManFrames( Aig_Man_t * pAig, int nFs, int fInit, int fOuts, int // create PI nodes for the frames for ( f = 0; f < nFs; f++ ) Aig_ManForEachPiSeq( pAig, pObj, i ) - Aig_ObjSetFrames( pObjMap, nFs, pObj, f, Aig_ObjCreatePi(pFrames) ); + Aig_ObjSetFrames( pObjMap, nFs, pObj, f, Aig_ObjCreateCi(pFrames) ); // set initial state for the latches if ( fInit ) { @@ -79,7 +79,7 @@ Aig_Man_t * Aig_ManFrames( Aig_Man_t * pAig, int nFs, int fInit, int fOuts, int else { Aig_ManForEachLoSeq( pAig, pObj, i ) - Aig_ObjSetFrames( pObjMap, nFs, pObj, 0, Aig_ObjCreatePi(pFrames) ); + Aig_ObjSetFrames( pObjMap, nFs, pObj, 0, Aig_ObjCreateCi(pFrames) ); } // add timeframes @@ -108,7 +108,7 @@ Aig_Man_t * Aig_ManFrames( Aig_Man_t * pAig, int nFs, int fInit, int fOuts, int for ( f = fEnlarge?nFs-1:0; f < nFs; f++ ) Aig_ManForEachPoSeq( pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pFrames, Aig_ObjChild0Frames(pObjMap,nFs,pObj,f) ); + pObjNew = Aig_ObjCreateCo( pFrames, Aig_ObjChild0Frames(pObjMap,nFs,pObj,f) ); Aig_ObjSetFrames( pObjMap, nFs, pObj, f, pObjNew ); } } @@ -117,7 +117,7 @@ Aig_Man_t * Aig_ManFrames( Aig_Man_t * pAig, int nFs, int fInit, int fOuts, int pFrames->nRegs = pAig->nRegs; Aig_ManForEachLiSeq( pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pFrames, Aig_ObjChild0Frames(pObjMap,nFs,pObj,fEnlarge?0:nFs-1) ); + pObjNew = Aig_ObjCreateCo( pFrames, Aig_ObjChild0Frames(pObjMap,nFs,pObj,fEnlarge?0:nFs-1) ); Aig_ObjSetFrames( pObjMap, nFs, pObj, nFs-1, pObjNew ); } Aig_ManSetRegNum( pFrames, Aig_ManRegNum(pAig) ); diff --git a/src/aig/aig/aigInter.c b/src/aig/aig/aigInter.c index bb6cf987..1210a335 100644 --- a/src/aig/aig/aigInter.c +++ b/src/aig/aig/aigInter.c @@ -102,7 +102,7 @@ void Aig_ManInterFast( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose ) // add PI clauses // collect the common variables - Aig_ManForEachPi( pManOn, pObj, i ) + Aig_ManForEachCi( pManOn, pObj, i ) { pObj2 = Aig_ManPi( pManOff, i ); @@ -119,7 +119,7 @@ void Aig_ManInterFast( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose ) assert( status != 0 ); // solve incremental SAT problems - Aig_ManForEachPo( pManOn, pObj, i ) + Aig_ManForEachCo( pManOn, pObj, i ) { pObj2 = Aig_ManPo( pManOff, i ); @@ -214,7 +214,7 @@ clk = clock(); if ( fRelation ) Vec_IntPush( vVarsAB, iLast ); - Aig_ManForEachPi( pManOn, pObj, i ) + Aig_ManForEachCi( pManOn, pObj, i ) { Vec_IntPush( vVarsAB, pCnfOn->pVarNums[pObj->Id] ); pObj2 = Aig_ManPi( pManOff, i ); diff --git a/src/aig/aig/aigJust.c b/src/aig/aig/aigJust.c index bff2baed..b15190e6 100644 --- a/src/aig/aig/aigJust.c +++ b/src/aig/aig/aigJust.c @@ -258,7 +258,7 @@ void Aig_ManJustExperiment( Aig_Man_t * pAig ) vSuppLits = Vec_IntAlloc( 100 ); pPack = Aig_ManPackStart( pAig ); vNodes = Aig_ManPackConstNodes( pPack ); -// Aig_ManForEachPo( pAig, pObj, i ) +// Aig_ManForEachCo( pAig, pObj, i ) Aig_ManForEachObjVec( vNodes, pAig, pObj, i ) { if ( pObj->fPhase ) // const 1 diff --git a/src/aig/aig/aigMan.c b/src/aig/aig/aigMan.c index 814e5248..46cdb260 100644 --- a/src/aig/aig/aigMan.c +++ b/src/aig/aig/aigMan.c @@ -96,9 +96,9 @@ Aig_Man_t * Aig_ManStartFrom( Aig_Man_t * p ) pNew->pSpec = Abc_UtilStrsav( p->pSpec ); // create the PIs Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { - pObjNew = Aig_ObjCreatePi( pNew ); + pObjNew = Aig_ObjCreateCi( pNew ); pObjNew->Level = pObj->Level; pObjNew->pHaig = pObj->pHaig; pObj->pData = pObjNew; @@ -154,8 +154,8 @@ Aig_Man_t * Aig_ManExtractMiter( Aig_Man_t * p, Aig_Obj_t * pNode1, Aig_Obj_t * // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi(pNew); // dump the nodes Aig_ManDup_rec( pNew, p, pNode1 ); Aig_ManDup_rec( pNew, p, pNode2 ); @@ -163,7 +163,7 @@ Aig_Man_t * Aig_ManExtractMiter( Aig_Man_t * p, Aig_Obj_t * pNode1, Aig_Obj_t * pObj = Aig_Exor( pNew, (Aig_Obj_t *)pNode1->pData, (Aig_Obj_t *)pNode2->pData ); pObj = Aig_NotCond( pObj, Aig_Regular(pObj)->fPhase ^ Aig_IsComplement(pObj) ); // add the PO - Aig_ObjCreatePo( pNew, pObj ); + Aig_ObjCreateCo( pNew, pObj ); // check the resulting network if ( !Aig_ManCheck(pNew) ) printf( "Aig_ManExtractMiter(): The check has failed.\n" ); @@ -290,7 +290,7 @@ int Aig_ManAntiCleanup( Aig_Man_t * p ) int i, nNodesOld = Aig_ManPoNum(p); Aig_ManForEachObj( p, pNode, i ) if ( Aig_ObjIsNode(pNode) && Aig_ObjRefs(pNode) == 0 ) - Aig_ObjCreatePo( p, pNode ); + Aig_ObjCreateCo( p, pNode ); return nNodesOld - Aig_ManPoNum(p); } diff --git a/src/aig/aig/aigObj.c b/src/aig/aig/aigObj.c index 71796993..863188f4 100644 --- a/src/aig/aig/aigObj.c +++ b/src/aig/aig/aigObj.c @@ -42,7 +42,7 @@ ABC_NAMESPACE_IMPL_START SeeAlso [] ***********************************************************************/ -Aig_Obj_t * Aig_ObjCreatePi( Aig_Man_t * p ) +Aig_Obj_t * Aig_ObjCreateCi( Aig_Man_t * p ) { Aig_Obj_t * pObj; pObj = Aig_ManFetchMemory( p ); @@ -52,7 +52,7 @@ Aig_Obj_t * Aig_ObjCreatePi( Aig_Man_t * p ) if ( p->pManHaig && p->fCreatePios ) { p->pManHaig->nRegs++; - pObj->pHaig = Aig_ObjCreatePi( p->pManHaig ); + pObj->pHaig = Aig_ObjCreateCi( p->pManHaig ); // printf( "Creating PI HAIG node %d equivalent to PI %d.\n", pObj->pHaig->Id, pObj->Id ); } return pObj; @@ -69,7 +69,7 @@ Aig_Obj_t * Aig_ObjCreatePi( Aig_Man_t * p ) SeeAlso [] ***********************************************************************/ -Aig_Obj_t * Aig_ObjCreatePo( Aig_Man_t * p, Aig_Obj_t * pDriver ) +Aig_Obj_t * Aig_ObjCreateCo( Aig_Man_t * p, Aig_Obj_t * pDriver ) { Aig_Obj_t * pObj; pObj = Aig_ManFetchMemory( p ); @@ -79,7 +79,7 @@ Aig_Obj_t * Aig_ObjCreatePo( Aig_Man_t * p, Aig_Obj_t * pDriver ) p->nObjs[AIG_OBJ_PO]++; if ( p->pManHaig && p->fCreatePios ) { - pObj->pHaig = Aig_ObjCreatePo( p->pManHaig, Aig_ObjHaig( pDriver ) ); + pObj->pHaig = Aig_ObjCreateCo( p->pManHaig, Aig_ObjHaig( pDriver ) ); // printf( "Creating PO HAIG node %d equivalent to PO %d.\n", pObj->pHaig->Id, pObj->Id ); } return pObj; diff --git a/src/aig/aig/aigOper.c b/src/aig/aig/aigOper.c index 127d6ef8..6dd445af 100644 --- a/src/aig/aig/aigOper.c +++ b/src/aig/aig/aigOper.c @@ -64,7 +64,7 @@ Aig_Obj_t * Aig_IthVar( Aig_Man_t * p, int i ) { int v; for ( v = Aig_ManPiNum(p); v <= i; v++ ) - Aig_ObjCreatePi( p ); + Aig_ObjCreateCi( p ); assert( i < Vec_PtrSize(p->vPis) ); return Aig_ManPi( p, i ); } @@ -587,7 +587,7 @@ void Aig_MuxTest() Vec_PtrPush( vNodes, pObj ); } Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i ) - Aig_ObjCreatePo( p, pObj ); + Aig_ObjCreateCo( p, pObj ); Vec_PtrFree( vNodes ); printf( "Number of nodes = %6d.\n", Aig_ManObjNum(p) ); diff --git a/src/aig/aig/aigPack.c b/src/aig/aig/aigPack.c index b89d6077..206f2262 100644 --- a/src/aig/aig/aigPack.c +++ b/src/aig/aig/aigPack.c @@ -89,7 +89,7 @@ int Aig_ManPackCountCares( Aig_ManPack_t * p ) { Aig_Obj_t * pObj; int i, Total = 0; - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Total += Aig_Word6CountOnes( Vec_WrdEntry(p->vPiCare, i) ); return Total; } @@ -110,7 +110,7 @@ void Aig_ManPackPrintCare( Aig_ManPack_t * p ) Aig_Obj_t * pObj; word Sign; int i; - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) { Sign = Vec_WrdEntry( p->vPiCare, i ); // Extra_PrintBinary( stdout, (unsigned *)&Sign, 64 ); @@ -161,7 +161,7 @@ void Aig_ManPackSetRandom( Aig_ManPack_t * p ) Aig_Obj_t * pObj; word Sign; int i; - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) { Sign = (((word)Aig_ManRandom(0)) << 32) | ((word)Aig_ManRandom(0)); Vec_WrdWriteEntry( p->vPiPats, i, Sign << 1 ); @@ -187,7 +187,7 @@ void Aig_ManPackSimulate( Aig_ManPack_t * p ) // set the constant Vec_WrdWriteEntry( p->vSigns, 0, (word)~0 ); // transfer into the array - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Vec_WrdWriteEntry( p->vSigns, Aig_ObjId(pObj), Vec_WrdEntry(p->vPiPats, i) ); // simulate internal nodes Aig_ManForEachNode( p->pAig, pObj, i ) @@ -205,7 +205,7 @@ void Aig_ManPackSimulate( Aig_ManPack_t * p ) Vec_WrdWriteEntry( p->vSigns, Aig_ObjId(pObj), Sign ); } // set the outputs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) { Sign0 = Vec_WrdEntry( p->vSigns, Aig_ObjFaninId0(pObj) ); Sign = Aig_ObjFaninC0(pObj) ? ~Sign0 : Sign0; diff --git a/src/aig/aig/aigPart.c b/src/aig/aig/aigPart.c index 1510ddc7..2c82264a 100644 --- a/src/aig/aig/aigPart.c +++ b/src/aig/aig/aigPart.c @@ -279,9 +279,9 @@ Vec_Ptr_t * Aig_ManSupports( Aig_Man_t * pMan ) Aig_Obj_t * pObj; int i, Counter = 0; // set the number of PIs/POs - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) pObj->pNext = (Aig_Obj_t *)(long)i; - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) pObj->pNext = (Aig_Obj_t *)(long)i; // start the support computation manager p = Part_ManStart( 1 << 20, 1 << 6 ); @@ -339,12 +339,12 @@ Vec_Ptr_t * Aig_ManSupports( Aig_Man_t * pMan ) // sort supports by size Vec_VecSort( (Vec_Vec_t *)vSupports, 1 ); // clear the number of PIs/POs - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) pObj->pNext = NULL; - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) pObj->pNext = NULL; /* - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) printf( "%d ", Vec_IntSize( Vec_VecEntryInt(vSupports, i) ) ); printf( "\n" ); */ @@ -943,7 +943,7 @@ Vec_Ptr_t * Aig_ManPartitionNaive( Aig_Man_t * p, int nPartSize ) int nParts, i; nParts = (Aig_ManPoNum(p) / nPartSize) + ((Aig_ManPoNum(p) % nPartSize) > 0); vParts = (Vec_Ptr_t *)Vec_VecStart( nParts ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Vec_IntPush( (Vec_Int_t *)Vec_PtrEntry(vParts, i / nPartSize), i ); return vParts; } @@ -971,7 +971,7 @@ Aig_Obj_t * Aig_ManDupPart_rec( Aig_Man_t * pNew, Aig_Man_t * pOld, Aig_Obj_t * { assert( Vec_IntSize(vSuppMap) == Aig_ManPiNum(pNew) ); Vec_IntPush( vSuppMap, (int)(long)pObj->pNext ); - return (Aig_Obj_t *)(pObj->pData = Aig_ObjCreatePi(pNew)); + return (Aig_Obj_t *)(pObj->pData = Aig_ObjCreateCi(pNew)); } assert( Aig_ObjIsNode(pObj) ); Aig_ManDupPart_rec( pNew, pOld, Aig_ObjFanin0(pObj), vSuppMap ); @@ -1065,11 +1065,11 @@ void Aig_ManDupPartAll_rec( Aig_Man_t * pNew, Aig_Man_t * pOld, Aig_Obj_t * pObj return; Aig_ObjSetTravIdCurrent(pOld, pObj); if ( Aig_ObjIsPi(pObj) ) - pObjNew = Aig_ObjCreatePi(pNew); + pObjNew = Aig_ObjCreateCi(pNew); else if ( Aig_ObjIsPo(pObj) ) { Aig_ManDupPartAll_rec( pNew, pOld, Aig_ObjFanin0(pObj) ); - pObjNew = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObjNew = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } else { @@ -1211,7 +1211,7 @@ Vec_Ptr_t * Aig_ManMiterPartitioned( Aig_Man_t * p1, Aig_Man_t * p2, int nPartSi pNew = Aig_ManStart( 1000 ); // create the PIs for ( k = 0; k < Vec_IntSize(vPartSupp); k++ ) - Aig_ObjCreatePi( pNew ); + Aig_ObjCreateCi( pNew ); // copy the components vNodes1 = Aig_ManDupPart( pNew, p1, vPart, vPartSupp, 0 ); vNodes2 = Aig_ManDupPart( pNew, p2, vPart, vPartSupp, 0 ); @@ -1220,7 +1220,7 @@ Vec_Ptr_t * Aig_ManMiterPartitioned( Aig_Man_t * p1, Aig_Man_t * p2, int nPartSi Vec_PtrFree( vNodes1 ); Vec_PtrFree( vNodes2 ); // create the output - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); // clean up Aig_ManCleanup( pNew ); Vec_PtrPush( vMiters, pNew ); @@ -1274,7 +1274,7 @@ Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize, int nCon // set the PI numbers Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig, i ) - Aig_ManForEachPi( pAig, pObj, k ) + Aig_ManForEachCi( pAig, pObj, k ) pObj->pNext = (Aig_Obj_t *)(long)k; // Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "unset progressbar" ); @@ -1293,7 +1293,7 @@ Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize, int nCon if ( k == 0 ) { Vec_PtrForEachEntry( Aig_Obj_t *, vOuts, pObj, m ) - Aig_ObjCreatePo( pAigPart, pObj ); + Aig_ObjCreateCo( pAigPart, pObj ); } Vec_PtrFree( vOuts ); } @@ -1336,12 +1336,12 @@ Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize, int nCon // clear the PI numbers Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig, i ) - Aig_ManForEachPi( pAig, pObj, k ) + Aig_ManForEachCi( pAig, pObj, k ) pObj->pNext = NULL; // add the outputs in the same order Vec_PtrForEachEntry( Aig_Obj_t *, vOutsTotal, pObj, i ) - Aig_ObjCreatePo( pAigTotal, pObj ); + Aig_ObjCreateCo( pAigTotal, pObj ); Vec_PtrFree( vOutsTotal ); // derive the result of choicing @@ -1498,9 +1498,9 @@ void Aig_ManChoiceConstructiveOne( Aig_Man_t * pNew, Aig_Man_t * pPrev, Aig_Man_ // remap nodes of pThis on top of pNew using pPrev pObj = Aig_ManConst1(pThis); pObj->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( pThis, pObj, i ) + Aig_ManForEachCi( pThis, pObj, i ) pObj->pData = Aig_ManPi(pNew, i); - Aig_ManForEachPo( pThis, pObj, i ) + Aig_ManForEachCo( pThis, pObj, i ) pObj->pData = Aig_ManPo(pNew, i); // go through the nodes in the topological order Aig_ManForEachNode( pThis, pObj, i ) @@ -1512,7 +1512,7 @@ void Aig_ManChoiceConstructiveOne( Aig_Man_t * pNew, Aig_Man_t * pPrev, Aig_Man_ Aig_ObjSetRepr_( pNew, Aig_Regular((Aig_Obj_t *)pObj->pData), Aig_Regular((Aig_Obj_t *)pObj->pHaig->pData) ); } // set the inputs of POs as equivalent - Aig_ManForEachPo( pThis, pObj, i ) + Aig_ManForEachCo( pThis, pObj, i ) { pObjNew = Aig_ObjFanin0( Aig_ManPo(pNew,i) ); // pObjNew and Aig_ObjFanin0(pObj)->pData are equivalent diff --git a/src/aig/aig/aigPartReg.c b/src/aig/aig/aigPartReg.c index 56fa80e4..ca2e9602 100644 --- a/src/aig/aig/aigPartReg.c +++ b/src/aig/aig/aigPartReg.c @@ -252,7 +252,7 @@ Vec_Ptr_t * Aig_ManRegProjectOnehots( Aig_Man_t * pAig, Aig_Man_t * pPart, Vec_P Aig_Obj_t * pObj, * pObjNew; int nOffset, iReg, i, k; // set the PI numbers - Aig_ManForEachPi( pPart, pObj, i ) + Aig_ManForEachCi( pPart, pObj, i ) pObj->iData = i; // go through each group and check if registers are involved in this one nOffset = Aig_ManPiNum(pAig)-Aig_ManRegNum(pAig); @@ -281,7 +281,7 @@ Vec_Ptr_t * Aig_ManRegProjectOnehots( Aig_Man_t * pAig, Aig_Man_t * pPart, Vec_P Vec_IntFree( vGroupNew ); } // clear the PI numbers - Aig_ManForEachPi( pPart, pObj, i ) + Aig_ManForEachCi( pPart, pObj, i ) pObj->iData = 0; // print out if ( vOnehotsPart && fVerbose ) @@ -347,17 +347,17 @@ Aig_Man_t * Aig_ManRegCreatePart( Aig_Man_t * pAig, Vec_Int_t * vPart, int * pnC pNew = Aig_ManStart( Vec_PtrSize(vNodes) ); Aig_ManConst1(pAig)->pData = Aig_ManConst1(pNew); // create the PIs - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) if ( Aig_ObjIsTravIdCurrent(pAig, pObj) ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); // add variables for the register outputs // create fake POs to hold the register outputs nOffset = Aig_ManPiNum(pAig)-Aig_ManRegNum(pAig); Vec_IntForEachEntry( vPart, iOut, i ) { pObj = Aig_ManPi(pAig, nOffset+iOut); - pObj->pData = Aig_ObjCreatePi(pNew); - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)pObj->pData ); + pObj->pData = Aig_ObjCreateCi(pNew); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)pObj->pData ); Aig_ObjSetTravIdCurrent( pAig, pObj ); // added } // create the nodes @@ -369,7 +369,7 @@ Aig_Man_t * Aig_ManRegCreatePart( Aig_Man_t * pAig, Vec_Int_t * vPart, int * pnC Vec_IntForEachEntry( vPart, iOut, i ) { pObj = Aig_ManPo( pAig, nOffset+iOut ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } pNew->nRegs = Vec_IntSize(vPart); // create map @@ -581,7 +581,7 @@ Vec_Ptr_t * Aig_ManRegPartitionTraverse( Aig_Man_t * p ) Aig_Obj_t * pObj; int i, nPrev, Counter; // mark the registers - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->iData = i; // collect registers vLos = Vec_PtrAlloc( Aig_ManRegNum(p) ); diff --git a/src/aig/aig/aigPartSat.c b/src/aig/aig/aigPartSat.c index 52fbe2e2..701273a3 100644 --- a/src/aig/aig/aigPartSat.c +++ b/src/aig/aig/aigPartSat.c @@ -147,7 +147,7 @@ void Aig_ManPartSplitOne_rec( Aig_Man_t * pNew, Aig_Man_t * p, Aig_Obj_t * pObj, else */ { - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); if ( pObj->fMarkA ) // const0 ((Aig_Obj_t *)pObj->pData)->fMarkA = 1; else if ( pObj->fMarkB ) // const1 @@ -197,7 +197,7 @@ Aig_Man_t * Aig_ManPartSplitOne( Aig_Man_t * p, Vec_Ptr_t * vNodes, Vec_Int_t ** if ( Aig_ObjRefs((Aig_Obj_t *)pObj->pData) != Aig_ObjRefs(pObj) ) { assert( Aig_ObjRefs((Aig_Obj_t *)pObj->pData) < Aig_ObjRefs(pObj) ); - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)pObj->pData ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)pObj->pData ); Vec_IntPush( vPio2Id, Aig_ObjId(pObj) ); } assert( Aig_ManNodeNum(pNew) == Vec_PtrSize(vNodes) ); @@ -244,7 +244,7 @@ Vec_Ptr_t * Aig_ManPartSplit( Aig_Man_t * p, Vec_Int_t * vNode2Part, Vec_Ptr_t * } // label PIs that should be restricted to some values - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { pDriver = Aig_ObjFanin0(pObj); if ( Aig_ObjIsPi(pDriver) ) @@ -272,7 +272,7 @@ Vec_Ptr_t * Aig_ManPartSplit( Aig_Man_t * p, Vec_Int_t * vNode2Part, Vec_Ptr_t * // divide POs according to their partitions vPart2Pos = Vec_VecStart( Vec_PtrSize(vAigs) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { pDriver = Aig_ObjFanin0(pObj); if ( Aig_ObjIsPi(pDriver) ) @@ -321,14 +321,14 @@ void Aig_ManPartSetNodePolarity( Aig_Man_t * p, Aig_Man_t * pPart, Vec_Int_t * v Aig_Obj_t * pObj, * pObjInit; int i; Aig_ManConst1(pPart)->fPhase = 1; - Aig_ManForEachPi( pPart, pObj, i ) + Aig_ManForEachCi( pPart, pObj, i ) { pObjInit = Aig_ManObj( p, Vec_IntEntry(vPio2Id, i) ); pObj->fPhase = pObjInit->fPhase; } Aig_ManForEachNode( pPart, pObj, i ) pObj->fPhase = (Aig_ObjFanin0(pObj)->fPhase ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fPhase ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pPart, pObj, i ) + Aig_ManForEachCo( pPart, pObj, i ) { pObjInit = Aig_ManObj( p, Vec_IntEntry(vPio2Id, Aig_ManPiNum(pPart) + i) ); pObj->fPhase = (Aig_ObjFanin0(pObj)->fPhase ^ Aig_ObjFaninC0(pObj)); @@ -355,7 +355,7 @@ void Aig_ManDeriveCounterExample( Aig_Man_t * p, Vec_Int_t * vNode2Var, sat_solv // collect IDs of PI variables // (fanoutless PIs have SAT var 0, which is an unused in the SAT solver -> has value 0) vPisIds = Vec_IntAlloc( Aig_ManPiNum(p) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Vec_IntPush( vPisIds, Vec_IntEntry(vNode2Var, Aig_ObjId(pObj)) ); // derive the SAT assignment p->pData = Sat_SolverGetModel( pSat, vPisIds->pArray, vPisIds->nSize ); @@ -396,7 +396,7 @@ int Aig_ManAddNewCnfToSolver( sat_solver * pSat, Aig_Man_t * pAig, Vec_Int_t * v return 1; } // derive the connector clauses - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) { iNodeIdOld = Vec_IntEntry( vPioIds, i ); iSatVarOld = Vec_IntEntry( vNode2Var, iNodeIdOld ); @@ -417,7 +417,7 @@ int Aig_ManAddNewCnfToSolver( sat_solver * pSat, Aig_Man_t * pAig, Vec_Int_t * v assert( 0 ); } // derive the connector clauses - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) { iNodeIdOld = Vec_IntEntry( vPioIds, Aig_ManPiNum(pAig) + i ); iSatVarOld = Vec_IntEntry( vNode2Var, iNodeIdOld ); @@ -460,7 +460,7 @@ int Aig_ManAddNewCnfToSolver( sat_solver * pSat, Aig_Man_t * pAig, Vec_Int_t * v } } // constrain some the primary inputs to constant values - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) { if ( !pObj->fMarkA && !pObj->fMarkB ) continue; diff --git a/src/aig/aig/aigRepar.c b/src/aig/aig/aigRepar.c index e0fe4cb1..2b17cde6 100644 --- a/src/aig/aig/aigRepar.c +++ b/src/aig/aig/aigRepar.c @@ -163,7 +163,7 @@ void Aig_ManInterTest( Aig_Man_t * pMan, int fVerbose ) // add PI equality clauses vVars = Vec_IntAlloc( Aig_ManPoNum(pMan)+1 ); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) { if ( Aig_ObjRefs(pObj) == 0 ) continue; @@ -220,14 +220,14 @@ void Aig_ManAppend( Aig_Man_t * pBase, Aig_Man_t * pNew ) // create the PIs Aig_ManCleanData( pNew ); Aig_ManConst1(pNew)->pData = Aig_ManConst1(pBase); - Aig_ManForEachPi( pNew, pObj, i ) + Aig_ManForEachCi( pNew, pObj, i ) pObj->pData = Aig_IthVar(pBase, i); // duplicate internal nodes Aig_ManForEachNode( pNew, pObj, i ) pObj->pData = Aig_And( pBase, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // add one PO to base pObj = Aig_ManPo( pNew, 0 ); - Aig_ObjCreatePo( pBase, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pBase, Aig_ObjChild0Copy(pObj) ); } /**Function************************************************************* @@ -286,7 +286,7 @@ Aig_Man_t * Aig_ManInterRepar( Aig_Man_t * pMan, int fVerbose ) clause_set_partA( pSat, Cid, k==0 ); } // add equality p[k] == A1/B1 - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) Aig_ManInterAddBuffer( pSat, ShiftP[k] + i, pCnf->pVarNums[pObj->Id], k==1, k==0 ); // copy A2 Cnf_DataLift( pCnf, pCnf->nVars ); @@ -297,7 +297,7 @@ Aig_Man_t * Aig_ManInterRepar( Aig_Man_t * pMan, int fVerbose ) } // add comparator (!p[k] ^ A2/B2) == or[k] Vec_IntClear( vVars ); - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) { Aig_ManInterAddXor( pSat, ShiftP[k] + i, pCnf->pVarNums[pObj->Id], ShiftOr[k] + i, k==1, k==0 ); Vec_IntPush( vVars, toLitCond(ShiftOr[k] + i, 1) ); @@ -341,7 +341,7 @@ Aig_Man_t * Aig_ManInterRepar( Aig_Man_t * pMan, int fVerbose ) pInter = (Aig_Man_t *)Sat_ProofInterpolant( pSat, vVars ); Aig_ManPrintStats( pInter ); // make sure interpolant does not depend on useless vars - Aig_ManForEachPi( pInter, pObj, i ) + Aig_ManForEachCi( pInter, pObj, i ) assert( i <= k || Aig_ObjRefs(pObj) == 0 ); // simplify @@ -365,7 +365,7 @@ Aig_Man_t * Aig_ManInterRepar( Aig_Man_t * pMan, int fVerbose ) clause_set_partA( pSat, Cid, c==0 ); } // connect to the inputs - Aig_ManForEachPi( pInter, pObj, i ) + Aig_ManForEachCi( pInter, pObj, i ) if ( i <= k ) Aig_ManInterAddBuffer( pSat, i, pCnf->pVarNums[pObj->Id], 0, c==0 ); // connect to the outputs diff --git a/src/aig/aig/aigRepr.c b/src/aig/aig/aigRepr.c index d08b6553..5063d559 100644 --- a/src/aig/aig/aigRepr.c +++ b/src/aig/aig/aigRepr.c @@ -279,9 +279,9 @@ Aig_Man_t * Aig_ManDupRepr( Aig_Man_t * p, int fOrdered ) // map the const and primary inputs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); -// Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi(pNew); +// Aig_ManForEachCi( p, pObj, i ) // pObj->pData = Aig_ObjGetRepr( p, pObj ); // map the internal nodes if ( fOrdered ) @@ -295,12 +295,12 @@ Aig_Man_t * Aig_ManDupRepr( Aig_Man_t * p, int fOrdered ) // if ( p->pReprs[i] ) // printf( "Substituting %d for %d.\n", p->pReprs[i]->Id, pObj->Id ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ManDupRepr_rec( pNew, p, Aig_ObjFanin0(pObj) ); } // transfer the POs - Aig_ManForEachPo( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Repr(p, pObj) ); + Aig_ManForEachCo( p, pObj, i ) + Aig_ObjCreateCo( pNew, Aig_ObjChild0Repr(p, pObj) ); Aig_ManSetRegNum( pNew, Aig_ManRegNum(p) ); // check the new manager if ( !Aig_ManCheck(pNew) ) diff --git a/src/aig/aig/aigRet.c b/src/aig/aig/aigRet.c index acc5b6ec..d96e209e 100644 --- a/src/aig/aig/aigRet.c +++ b/src/aig/aig/aigRet.c @@ -784,15 +784,15 @@ Aig_Man_t * Rtm_ManToAig( Rtm_Man_t * pRtm ) pObjRtm = (Rtm_Obj_t *)Vec_PtrEntry( pRtm->vObjs, 0 ); pObjRtm->pCopy = Aig_ManConst1(pNew); Rtm_ManForEachPi( pRtm, pObjRtm, i ) - pObjRtm->pCopy = Aig_ObjCreatePi(pNew); + pObjRtm->pCopy = Aig_ObjCreateCi(pNew); for ( i = 0; i < nLatches; i++ ) - Aig_ObjCreatePi(pNew); + Aig_ObjCreateCi(pNew); // create internal nodes Rtm_ManForEachObj( pRtm, pObjRtm, i ) Rtm_ManToAig_rec( pNew, pRtm, pObjRtm, pLatches ); // create POs Rtm_ManForEachPo( pRtm, pObjRtm, i ) - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)pObjRtm->pCopy ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)pObjRtm->pCopy ); // connect latches Rtm_ManForEachObj( pRtm, pObjRtm, i ) Rtm_ObjForEachFaninEdge( pObjRtm, pEdge, k ) @@ -805,7 +805,7 @@ Aig_Man_t * Rtm_ManToAig( Rtm_Man_t * pRtm ) Val = Rtm_ObjGetOne( pRtm, pEdge, pEdge->nLats - 1 - m ); assert( Val == RTM_VAL_ZERO || Val == RTM_VAL_ONE || Val == RTM_VAL_VOID ); pObjNew = Aig_NotCond( pObjNew, Val == RTM_VAL_ONE ); - Aig_ObjCreatePo( pNew, pObjNew ); + Aig_ObjCreateCo( pNew, pObjNew ); pObjNew = Aig_ManPi( pNew, pLatches[2*pObjRtm->Id + k] + m ); pObjNew = Aig_NotCond( pObjNew, Val == RTM_VAL_ONE ); } diff --git a/src/aig/aig/aigRetF.c b/src/aig/aig/aigRetF.c index 0a866c30..567f6468 100644 --- a/src/aig/aig/aigRetF.c +++ b/src/aig/aig/aigRetF.c @@ -93,7 +93,7 @@ void Aig_ManRetimeMark( Aig_Man_t * p ) { fChange = 0; Aig_ManIncrementTravId( p ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { if ( pObj->fMarkB ) continue; @@ -168,9 +168,9 @@ Aig_Man_t * Aig_ManRetimeFrontier( Aig_Man_t * p, int nStepsMax ) pObjNew = Aig_And( p, pObjLi0, pObjLi1 ); pObjNew->fMarkB = 1; // create new register - pObjLo = Aig_ObjCreatePi(p); + pObjLo = Aig_ObjCreateCi(p); pObjLo->fMarkA = 1; - pObjLi = Aig_ObjCreatePo( p, Aig_NotCond(pObjNew, fCompl) ); + pObjLi = Aig_ObjCreateCo( p, Aig_NotCond(pObjNew, fCompl) ); p->nRegs++; pObjLo->pNext = pObjLi; pObjLi->pNext = pObjLo; diff --git a/src/aig/aig/aigScl.c b/src/aig/aig/aigScl.c index 74b56bcf..dcae3eb7 100644 --- a/src/aig/aig/aigScl.c +++ b/src/aig/aig/aigScl.c @@ -62,8 +62,8 @@ Aig_Man_t * Aig_ManRemap( Aig_Man_t * p, Vec_Ptr_t * vMap ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi(pNew); // implement the mapping nTruePis = Aig_ManPiNum(p)-Aig_ManRegNum(p); if ( p->vFlopReprs ) @@ -71,7 +71,7 @@ Aig_Man_t * Aig_ManRemap( Aig_Man_t * p, Vec_Ptr_t * vMap ) Aig_ManForEachLoSeq( p, pObj, i ) pObj->pNext = (Aig_Obj_t *)(long)Vec_IntEntry( p->vFlopNums, i-nTruePis ); } - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { pObjMapped = (Aig_Obj_t *)Vec_PtrEntry( vMap, i ); pObj->pData = Aig_NotCond( (Aig_Obj_t *)Aig_Regular(pObjMapped)->pData, Aig_IsComplement(pObjMapped) ); @@ -101,8 +101,8 @@ Aig_Man_t * Aig_ManRemap( Aig_Man_t * p, Vec_Ptr_t * vMap ) else if ( Aig_ObjIsNode(pObj) ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // add the POs - Aig_ManForEachPo( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ManForEachCo( p, pObj, i ) + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); assert( Aig_ManNodeNum(p) >= Aig_ManNodeNum(pNew) ); Aig_ManSetRegNum( pNew, Aig_ManRegNum(p) ); // check the resulting network @@ -190,7 +190,7 @@ int Aig_ManSeqCleanup( Aig_Man_t * p ) { int nTruePos = Aig_ManPoNum(p)-Aig_ManRegNum(p); int iNum, k = 0; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( i >= nTruePos && Aig_ObjIsTravIdCurrent(p, pObj) ) { iNum = Vec_IntEntry( p->vFlopNums, i - nTruePos ); @@ -201,7 +201,7 @@ int Aig_ManSeqCleanup( Aig_Man_t * p ) } // collect new CIs/COs vCis = Vec_PtrAlloc( Aig_ManPiNum(p) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) if ( Aig_ObjIsTravIdCurrent(p, pObj) ) Vec_PtrPush( vCis, pObj ); else @@ -210,7 +210,7 @@ int Aig_ManSeqCleanup( Aig_Man_t * p ) // Aig_ManRecycleMemory( p, pObj ); } vCos = Vec_PtrAlloc( Aig_ManPoNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( Aig_ObjIsTravIdCurrent(p, pObj) ) Vec_PtrPush( vCos, pObj ); else @@ -286,7 +286,7 @@ int Aig_ManSeqCleanupBasic( Aig_Man_t * p ) if ( Vec_PtrSize(vNodes) < Aig_ManPoNum(p) ) { // add constant drivers to the dangling latches - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( !Aig_ObjIsTravIdCurrent(p, pObj) ) Aig_ObjPatchFanin0( p, pObj, Aig_ManConst0(p) ); } diff --git a/src/aig/aig/aigShow.c b/src/aig/aig/aigShow.c index 24b122c3..14a67806 100644 --- a/src/aig/aig/aigShow.c +++ b/src/aig/aig/aigShow.c @@ -68,7 +68,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * // compute levels // LevelMax = 1 + Aig_ManSetLevels( pMan, fHaig ); LevelMax = 1 + Aig_ManLevels( pMan ); - Aig_ManForEachPo( pMan, pNode, i ) + Aig_ManForEachCo( pMan, pNode, i ) pNode->Level = LevelMax; // write the DOT header @@ -160,7 +160,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * // the labeling node of this level fprintf( pFile, " Level%d;\n", LevelMax ); // generate the CO nodes - Aig_ManForEachPo( pMan, pNode, i ) + Aig_ManForEachCo( pMan, pNode, i ) { /* if ( fHaig || pNode->pEquiv == NULL ) @@ -227,7 +227,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * fprintf( pFile, "];\n" ); } // generate the CI nodes - Aig_ManForEachPi( pMan, pNode, i ) + Aig_ManForEachCi( pMan, pNode, i ) { /* if ( fHaig || pNode->pEquiv == NULL ) @@ -250,7 +250,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * // generate invisible edges from the square down fprintf( pFile, "title1 -> title2 [style = invis];\n" ); - Aig_ManForEachPo( pMan, pNode, i ) + Aig_ManForEachCo( pMan, pNode, i ) fprintf( pFile, "title2 -> Node%d [style = invis];\n", pNode->Id ); // generate edges @@ -314,7 +314,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * Vec_PtrForEachEntry( Aig_Obj_t *, vBold, pNode, i ) pNode->fMarkB = 0; - Aig_ManForEachPo( pMan, pNode, i ) + Aig_ManForEachCo( pMan, pNode, i ) pNode->Level = Aig_ObjFanin0(pNode)->Level; } diff --git a/src/aig/aig/aigSplit.c b/src/aig/aig/aigSplit.c index 82f60e2d..3e4e8ed4 100644 --- a/src/aig/aig/aigSplit.c +++ b/src/aig/aig/aigSplit.c @@ -85,13 +85,13 @@ Aig_Man_t * Aig_ManConvertBddsToAigs( Aig_Man_t * p, DdManager * dd, Vec_Ptr_t * pNew = Aig_ManStart( Aig_ManObjNum(p) ); pNew->pName = Abc_UtilStrsav( p->pName ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); // create the table mapping BDD nodes into the ABC nodes tBdd2Node = st_init_table( st_ptrcmp, st_ptrhash ); // add the constant and the elementary vars st_insert( tBdd2Node, (char *)Cudd_ReadOne(dd), (char *)Aig_ManConst1(pNew) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) st_insert( tBdd2Node, (char *)Cudd_bddIthVar(dd, i), (char *)pObj->pData ); // build primary outputs for the cofactors Vec_PtrForEachEntry( DdNode *, vCofs, bFunc, i ) @@ -100,18 +100,18 @@ Aig_Man_t * Aig_ManConvertBddsToAigs( Aig_Man_t * p, DdManager * dd, Vec_Ptr_t * continue; pObj = Aig_NodeBddToMuxes_rec( dd, Cudd_Regular(bFunc), pNew, tBdd2Node ); pObj = Aig_NotCond( pObj, Cudd_IsComplement(bFunc) ); - Aig_ObjCreatePo( pNew, pObj ); + Aig_ObjCreateCo( pNew, pObj ); } st_free_table( tBdd2Node ); // duplicate the rest of the AIG // add the POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { if ( i == 0 ) continue; Aig_ManDupSimpleDfs_rec( pNew, p, Aig_ObjFanin0(pObj) ); - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManCleanup( pNew ); Aig_ManSetRegNum( pNew, Aig_ManRegNum(p) ); @@ -198,7 +198,7 @@ DdManager * Aig_ManBuildPoBdd( Aig_Man_t * p, DdNode ** pbFunc ) Cudd_AutodynEnable( dd, CUDD_REORDER_SYMM_SIFT ); pObj = Aig_ManConst1(p); pObj->pData = Cudd_ReadOne(dd); Cudd_Ref( (DdNode *)pObj->pData ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { pObj->pData = Cudd_bddIthVar(dd, i); Cudd_Ref( (DdNode *)pObj->pData ); } diff --git a/src/aig/aig/aigUtil.c b/src/aig/aig/aigUtil.c index 5546c776..16065b4e 100644 --- a/src/aig/aig/aigUtil.c +++ b/src/aig/aig/aigUtil.c @@ -103,7 +103,7 @@ int Aig_ManLevels( Aig_Man_t * p ) { Aig_Obj_t * pObj; int i, LevelMax = 0; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) LevelMax = Abc_MaxInt( LevelMax, (int)Aig_ObjFanin0(pObj)->Level ); return LevelMax; } @@ -688,7 +688,7 @@ void Aig_ManPrintVerbose( Aig_Man_t * p, int fHaig ) Aig_Obj_t * pObj; int i; printf( "PIs: " ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) printf( " %p", pObj ); printf( "\n" ); vNodes = Aig_ManDfs( p, 0 ); @@ -742,16 +742,16 @@ void Aig_ManDumpBlif( Aig_Man_t * p, char * pFileName, Vec_Ptr_t * vPiNames, Vec return; } // check if constant is used - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( Aig_ObjIsConst1(Aig_ObjFanin0(pObj)) ) pConst1 = Aig_ManConst1(p); // collect nodes in the DFS order vNodes = Aig_ManDfs( p, 1 ); // assign IDs to objects Aig_ManConst1(p)->iData = Counter++; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->iData = Counter++; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pObj->iData = Counter++; Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i ) pObj->iData = Counter++; @@ -815,7 +815,7 @@ void Aig_ManDumpBlif( Aig_Man_t * p, char * pFileName, Vec_Ptr_t * vPiNames, Vec fprintf( pFile, "%d%d 1\n", !Aig_ObjFaninC0(pObj), !Aig_ObjFaninC1(pObj) ); } // write POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { fprintf( pFile, ".names" ); if ( vPiNames && Aig_ObjIsPi(Aig_ObjFanin0(pObj)) ) @@ -857,16 +857,16 @@ void Aig_ManDumpVerilog( Aig_Man_t * p, char * pFileName ) return; } // check if constant is used - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( Aig_ObjIsConst1(Aig_ObjFanin0(pObj)) ) pConst1 = Aig_ManConst1(p); // collect nodes in the DFS order vNodes = Aig_ManDfs( p, 1 ); // assign IDs to objects Aig_ManConst1(p)->iData = Counter++; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->iData = Counter++; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pObj->iData = Counter++; Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i ) pObj->iData = Counter++; @@ -966,9 +966,9 @@ void Aig_ManSetPioNumbers( Aig_Man_t * p ) { Aig_Obj_t * pObj; int i; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->PioNum = i; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pObj->PioNum = i; } @@ -987,9 +987,9 @@ void Aig_ManCleanPioNumbers( Aig_Man_t * p ) { Aig_Obj_t * pObj; int i; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->pNext = NULL; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pObj->pNext = NULL; } @@ -1340,7 +1340,7 @@ void Aig_ManCounterExampleValueStart( Aig_Man_t * pAig, Abc_Cex_t * pCex ) Abc_InfoSetBit( (unsigned *)pAig->pData2, nObjs * i + Aig_ObjId(pObj) ); } // derive values for combinational outputs - Aig_ManForEachPo( pAig, pObj, k ) + Aig_ManForEachCo( pAig, pObj, k ) { Val0 = Abc_InfoHasBit( (unsigned *)pAig->pData2, nObjs * i + Aig_ObjFaninId0(pObj) ); if ( Val0 ^ Aig_ObjFaninC0(pObj) ) @@ -1434,14 +1434,14 @@ void Aig_ManSetPhase( Aig_Man_t * pAig ) int i; // set the PI simulation information Aig_ManConst1( pAig )->fPhase = 1; - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) pObj->fPhase = 0; // simulate internal nodes Aig_ManForEachNode( pAig, pObj, i ) pObj->fPhase = ( Aig_ObjFanin0(pObj)->fPhase ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fPhase ^ Aig_ObjFaninC1(pObj) ); // simulate PO nodes - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) pObj->fPhase = Aig_ObjFanin0(pObj)->fPhase ^ Aig_ObjFaninC0(pObj); } diff --git a/src/aig/gia/giaAig.c b/src/aig/gia/giaAig.c index 3c415707..e619bde8 100644 --- a/src/aig/gia/giaAig.c +++ b/src/aig/gia/giaAig.c @@ -97,12 +97,12 @@ Gia_Man_t * Gia_ManFromAig( Aig_Man_t * p ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->iData = 1; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->iData = Gia_ManAppendCi( pNew ); // add logic for the POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Gia_ManFromAig_rec( pNew, p, Aig_ObjFanin0(pObj) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Gia_ManAppendCo( pNew, Gia_ObjChild0Copy(pObj) ); Gia_ManSetRegNum( pNew, Aig_ManRegNum(p) ); if ( pNew->pNexts ) @@ -172,7 +172,7 @@ Gia_Man_t * Gia_ManFromAigSwitch( Aig_Man_t * p ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->iData = 1; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->iData = Gia_ManAppendCi( pNew ); // add POs corresponding to the nodes with choices Aig_ManForEachNode( p, pObj, i ) @@ -182,9 +182,9 @@ Gia_Man_t * Gia_ManFromAigSwitch( Aig_Man_t * p ) Gia_ManAppendCo( pNew, pObj->iData ); } // add logic for the POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Gia_ManFromAig_rec( pNew, p, Aig_ObjFanin0(pObj) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pObj->iData = Gia_ManAppendCo( pNew, Gia_ObjChild0Copy(pObj) ); Gia_ManSetRegNum( pNew, Aig_ManRegNum(p) ); return pNew; @@ -207,7 +207,7 @@ void Gia_ManToAig_rec( Aig_Man_t * pNew, Aig_Obj_t ** ppNodes, Gia_Man_t * p, Gi if ( ppNodes[Gia_ObjId(p, pObj)] ) return; if ( Gia_ObjIsCi(pObj) ) - ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreatePi( pNew ); + ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreateCi( pNew ); else { assert( Gia_ObjIsAnd(pObj) ); @@ -256,7 +256,7 @@ Aig_Man_t * Gia_ManToAig( Gia_Man_t * p, int fChoices ) ppNodes = ABC_CALLOC( Aig_Obj_t *, Gia_ManObjNum(p) ); ppNodes[0] = Aig_ManConst0(pNew); Gia_ManForEachCi( p, pObj, i ) - ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreatePi( pNew ); + ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreateCi( pNew ); // transfer level if ( p->vLevels ) Gia_ManForEachCi( p, pObj, i ) @@ -265,7 +265,7 @@ Aig_Man_t * Gia_ManToAig( Gia_Man_t * p, int fChoices ) Gia_ManForEachCo( p, pObj, i ) { Gia_ManToAig_rec( pNew, ppNodes, p, Gia_ObjFanin0(pObj) ); - ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreatePo( pNew, Gia_ObjChild0Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)) ); + ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreateCo( pNew, Gia_ObjChild0Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)) ); } Aig_ManSetRegNum( pNew, Gia_ManRegNum(p) ); ABC_FREE( ppNodes ); @@ -300,14 +300,14 @@ Aig_Man_t * Gia_ManToAigSkip( Gia_Man_t * p, int nOutDelta ) ppNodes = ABC_CALLOC( Aig_Obj_t *, Gia_ManObjNum(p) ); ppNodes[0] = Aig_ManConst0(pNew); Gia_ManForEachCi( p, pObj, i ) - ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreatePi( pNew ); + ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreateCi( pNew ); // add logic for the POs Gia_ManForEachCo( p, pObj, i ) { Gia_ManToAig_rec( pNew, ppNodes, p, Gia_ObjFanin0(pObj) ); if ( i % nOutDelta != 0 ) continue; - ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreatePo( pNew, Gia_ObjChild0Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)) ); + ppNodes[Gia_ObjId(p, pObj)] = Aig_ObjCreateCo( pNew, Gia_ObjChild0Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)) ); } Aig_ManSetRegNum( pNew, Gia_ManRegNum(p) ); ABC_FREE( ppNodes ); @@ -342,9 +342,9 @@ Aig_Man_t * Gia_ManToAigSimple( Gia_Man_t * p ) if ( Gia_ObjIsAnd(pObj) ) ppNodes[i] = Aig_And( pNew, Gia_ObjChild0Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)), Gia_ObjChild1Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)) ); else if ( Gia_ObjIsCi(pObj) ) - ppNodes[i] = Aig_ObjCreatePi( pNew ); + ppNodes[i] = Aig_ObjCreateCi( pNew ); else if ( Gia_ObjIsCo(pObj) ) - ppNodes[i] = Aig_ObjCreatePo( pNew, Gia_ObjChild0Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)) ); + ppNodes[i] = Aig_ObjCreateCo( pNew, Gia_ObjChild0Copy2(ppNodes, pObj, Gia_ObjId(p, pObj)) ); else if ( Gia_ObjIsConst0(pObj) ) ppNodes[i] = Aig_ManConst0(pNew); else diff --git a/src/aig/ioa/ioaReadAig.c b/src/aig/ioa/ioaReadAig.c index eb253659..6c87f430 100644 --- a/src/aig/ioa/ioaReadAig.c +++ b/src/aig/ioa/ioaReadAig.c @@ -199,14 +199,14 @@ Aig_Man_t * Ioa_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck // create the PIs for ( i = 0; i < nInputs + nLatches; i++ ) { - pObj = Aig_ObjCreatePi(pNew); + pObj = Aig_ObjCreateCi(pNew); Vec_PtrPush( vNodes, pObj ); } /* // create the POs for ( i = 0; i < nOutputs + nLatches; i++ ) { - pObj = Aig_ObjCreatePo(pNew); + pObj = Aig_ObjCreateCo(pNew); } */ // create the latches @@ -302,9 +302,9 @@ Aig_Man_t * Ioa_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck // create the POs for ( i = 0; i < nOutputs; i++ ) - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vDrivers, nLatches + i) ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vDrivers, nLatches + i) ); for ( i = 0; i < nLatches; i++ ) - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vDrivers, i) ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vDrivers, i) ); Vec_PtrFree( vDrivers ); /* @@ -354,7 +354,7 @@ Aig_Man_t * Ioa_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck } // assign the remaining names - Aig_ManForEachPi( pNew, pObj, i ) + Aig_ManForEachCi( pNew, pObj, i ) { if ( pObj->pCopy ) continue; Aig_ObjAssignName( pObj, Aig_ObjName(pObj), NULL ); @@ -368,7 +368,7 @@ Aig_Man_t * Ioa_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck Aig_ObjAssignName( Aig_ObjFanin0(Aig_ObjFanin0(pObj)), Aig_ObjName(pObj), "_in" ); Counter++; } - Aig_ManForEachPo( pNew, pObj, i ) + Aig_ManForEachCo( pNew, pObj, i ) { if ( pObj->pCopy ) continue; Aig_ObjAssignName( pObj, Aig_ObjName(pObj), NULL ); diff --git a/src/aig/ioa/ioaWriteAig.c b/src/aig/ioa/ioaWriteAig.c index d19d23ff..ca5a8a5e 100644 --- a/src/aig/ioa/ioaWriteAig.c +++ b/src/aig/ioa/ioaWriteAig.c @@ -291,7 +291,7 @@ Vec_Str_t * Ioa_WriteAigerIntoMemoryStr( Aig_Man_t * pMan ) // set the node numbers to be used in the output file nNodes = 0; Ioa_ObjSetAigerNum( Aig_ManConst1(pMan), nNodes++ ); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) Ioa_ObjSetAigerNum( pObj, nNodes++ ); Aig_ManForEachNode( pMan, pObj, i ) Ioa_ObjSetAigerNum( pObj, nNodes++ ); @@ -477,7 +477,7 @@ void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int // set the node numbers to be used in the output file nNodes = 0; Ioa_ObjSetAigerNum( Aig_ManConst1(pMan), nNodes++ ); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) Ioa_ObjSetAigerNum( pObj, nNodes++ ); Aig_ManForEachNode( pMan, pObj, i ) Ioa_ObjSetAigerNum( pObj, nNodes++ ); @@ -564,13 +564,13 @@ void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int if ( fWriteSymbols ) { // write PIs - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) fprintf( pFile, "i%d %s\n", i, Aig_ObjName(pObj) ); // write latches Aig_ManForEachLatch( pMan, pObj, i ) fprintf( pFile, "l%d %s\n", i, Aig_ObjName(Aig_ObjFanout0(pObj)) ); // write POs - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) fprintf( pFile, "o%d %s\n", i, Aig_ObjName(pObj) ); } */ diff --git a/src/aig/ivy/ivyFraig.c b/src/aig/ivy/ivyFraig.c index 26adb84c..cc6250e4 100644 --- a/src/aig/ivy/ivyFraig.c +++ b/src/aig/ivy/ivyFraig.c @@ -2870,7 +2870,7 @@ Aig_Man_t * Ivy_FraigExtractCone( Ivy_Man_t * p, Ivy_Obj_t * pObj1, Ivy_Obj_t * Ivy_ManConst1(p)->pEquiv = (Ivy_Obj_t *)Aig_ManConst1(pMan); Ivy_ManForEachNodeVec( p, vLeaves, pObjIvy, i ) { - pObjIvy->pEquiv = (Ivy_Obj_t *)Aig_ObjCreatePi( pMan ); + pObjIvy->pEquiv = (Ivy_Obj_t *)Aig_ObjCreateCi( pMan ); pObjIvy->fMarkB = 0; } // duplicate internal nodes @@ -2895,7 +2895,7 @@ printf( "Polarity = %d\n", pMiter->fPhase ); printf( "***************\n" ); } */ - pMiter = Aig_ObjCreatePo( pMan, pMiter ); + pMiter = Aig_ObjCreateCo( pMan, pMiter ); //printf( "Polarity = %d\n", pMiter->fPhase ); Aig_ManCleanup( pMan ); Vec_IntFree( vNodes ); @@ -2927,7 +2927,7 @@ int Ivy_FraigCheckCone( Ivy_FraigMan_t * pGlo, Ivy_Man_t * p, Ivy_Obj_t * pObj1, { int Counter = 0; memset( pGlo->pPatWords, 0, sizeof(unsigned) * pGlo->nPatWords ); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) if ( ((int *)pMan->pData)[i] ) { int iObjIvy = Vec_IntEntry( vLeaves, i ); diff --git a/src/aig/saig/saigAbsCba.c b/src/aig/saig/saigAbsCba.c index 4873eb64..c68143d4 100644 --- a/src/aig/saig/saigAbsCba.c +++ b/src/aig/saig/saigAbsCba.c @@ -94,7 +94,7 @@ Vec_Int_t * Saig_ManCbaFilterFlops( Aig_Man_t * pAig, Abc_Cex_t * pAbsCex, Vec_I Aig_ManForEachNode( pAig, pObj, k ) pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pAig, pObj, k ) + Aig_ManForEachCo( pAig, pObj, k ) pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj); // transfer Saig_ManForEachLiLo( pAig, pObjRi, pObjRo, k ) @@ -157,8 +157,8 @@ Aig_Man_t * Saig_ManDupWithCubes( Aig_Man_t * pAig, Vec_Vec_t * vReg2Value ) // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -171,11 +171,11 @@ Aig_Man_t * Saig_ManDupWithCubes( Aig_Man_t * pAig, Vec_Vec_t * vReg2Value ) pObj = Saig_ManLi( pAig, Abc_Lit2Var(Lit) ); pMiter = Aig_And( pAigNew, pMiter, Aig_NotCond(Aig_ObjChild0Copy(pObj), Abc_LitIsCompl(Lit)) ); } - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); } // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // finalize Aig_ManCleanup( pAigNew ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig) ); @@ -318,7 +318,7 @@ Vec_Int_t * Saig_ManCbaFindReason( Saig_ManCba_t * p ) // set PI values according to CEX vPrios = Vec_IntStartFull( Aig_ManObjNumMax(p->pFrames) ); Aig_ManConst1(p->pFrames)->fPhase = 1; - Aig_ManForEachPi( p->pFrames, pObj, i ) + Aig_ManForEachCi( p->pFrames, pObj, i ) { int iInput = Vec_IntEntry( p->vMapPiF2A, 2*i ); int iFrame = Vec_IntEntry( p->vMapPiF2A, 2*i+1 ); @@ -467,7 +467,7 @@ Aig_Man_t * Saig_ManCbaUnrollWithCex( Aig_Man_t * pAig, Abc_Cex_t * pCex, int nI } else { - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); Vec_IntPush( *pvMapPiF2A, Aig_ObjPioNum(pObj) ); Vec_IntPush( *pvMapPiF2A, f ); } @@ -489,7 +489,7 @@ Aig_Man_t * Saig_ManCbaUnrollWithCex( Aig_Man_t * pAig, Abc_Cex_t * pCex, int nI } // create output pObj = Aig_ManPo( pAig, pCex->iPo ); - Aig_ObjCreatePo( pFrames, Aig_Not((Aig_Obj_t *)pObj->pData) ); + Aig_ObjCreateCo( pFrames, Aig_Not((Aig_Obj_t *)pObj->pData) ); Aig_ManSetRegNum( pFrames, 0 ); // cleanup Vec_VecFree( vFrameCos ); @@ -683,7 +683,7 @@ int Saig_ManCexVerifyUsingTernary( Aig_Man_t * pAig, Abc_Cex_t * pCex, Abc_Cex_t Aig_ManForEachNode( pAig, pObj, i ) Saig_ObjCexMinSim( pObj ); // simulate COs - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) Saig_ObjCexMinSim( pObj ); /* Aig_ManForEachObj( pAig, pObj, i ) diff --git a/src/aig/saig/saigAbsPba.c b/src/aig/saig/saigAbsPba.c index 3c9de875..736cd699 100644 --- a/src/aig/saig/saigAbsPba.c +++ b/src/aig/saig/saigAbsPba.c @@ -103,10 +103,10 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec pFrames->pSpec = Abc_UtilStrsav( pAig->pSpec ); // create activation variables Saig_ManForEachLo( pAig, pObj, i ) - Aig_ObjCreatePi( pFrames ); + Aig_ObjCreateCi( pFrames ); // initialize the flops Saig_ManForEachLo( pAig, pObj, i ) - pObj->pData = Aig_Mux( pFrames, Aig_ManPi(pFrames,i), Aig_ObjCreatePi(pFrames), Aig_ManConst0(pFrames) ); + pObj->pData = Aig_Mux( pFrames, Aig_ManPi(pFrames,i), Aig_ObjCreateCi(pFrames), Aig_ManConst0(pFrames) ); // iterate through the frames *pvPiVarMap = Vec_IntStartFull( nFrames * Saig_ManPiNum(pAig) ); pObjNew = Aig_ManConst0(pFrames); @@ -123,7 +123,7 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec else if ( Saig_ObjIsPi(pAig, pObj) ) { Vec_IntWriteEntry( *pvPiVarMap, f * Saig_ManPiNum(pAig) + Aig_ObjPioNum(pObj), Aig_ManPiNum(pFrames) ); - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); } else if ( Aig_ObjIsConst1(pObj) ) pObj->pData = Aig_ManConst1(pFrames); @@ -146,7 +146,7 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec { int iFlopNum = Aig_ObjPioNum(pObj) - Saig_ManPoNum(pAig); assert( iFlopNum >= 0 && iFlopNum < Aig_ManRegNum(pAig) ); - Saig_ObjLiToLo(pAig, pObj)->pData = Aig_Mux( pFrames, Aig_ManPi(pFrames,iFlopNum), Aig_ObjCreatePi(pFrames), (Aig_Obj_t *)pObj->pData ); + Saig_ObjLiToLo(pAig, pObj)->pData = Aig_Mux( pFrames, Aig_ManPi(pFrames,iFlopNum), Aig_ObjCreateCi(pFrames), (Aig_Obj_t *)pObj->pData ); } } } @@ -154,7 +154,7 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec Vec_VecFree( vFrameCos ); Vec_VecFree( vFrameObjs ); // create output - Aig_ObjCreatePo( pFrames, pObjNew ); + Aig_ObjCreateCo( pFrames, pObjNew ); Aig_ManSetRegNum( pFrames, 0 ); // finallize Aig_ManCleanup( pFrames ); @@ -202,7 +202,7 @@ Abc_Cex_t * Saig_ManPbaDeriveCex( Aig_Man_t * pAig, sat_solver * pSat, Cnf_Dat_t Aig_ManForEachNode( pAig, pObj, i ) pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj); Saig_ManForEachLiLo( pAig, pObjRi, pObjRo, i ) pObjRo->fMarkB = pObjRi->fMarkB; @@ -285,7 +285,7 @@ Abc_PrintTime( 1, "Preparing", clock() - clk ); // map activation variables into flop numbers vAssumps = Vec_IntAlloc( Aig_ManRegNum(pAig) ); vMapVar2FF = Vec_IntStartFull( pCnf->nVars ); - Aig_ManForEachPi( pFrames, pObj, i ) + Aig_ManForEachCi( pFrames, pObj, i ) { if ( i >= Aig_ManRegNum(pAig) ) break; diff --git a/src/aig/saig/saigAbsStart.c b/src/aig/saig/saigAbsStart.c index b2e61e61..eb02eba9 100644 --- a/src/aig/saig/saigAbsStart.c +++ b/src/aig/saig/saigAbsStart.c @@ -51,7 +51,7 @@ int Saig_ManCexFirstFlopPi( Aig_Man_t * p, Aig_Man_t * pAbs ) Aig_Obj_t * pObj; int i; assert( pAbs->vCiNumsOrig != NULL ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { if ( Vec_IntEntry(pAbs->vCiNumsOrig, i) >= Saig_ManPiNum(p) ) return i; diff --git a/src/aig/saig/saigBmc.c b/src/aig/saig/saigBmc.c index 814c445f..b0ae1750 100644 --- a/src/aig/saig/saigBmc.c +++ b/src/aig/saig/saigBmc.c @@ -62,13 +62,13 @@ Aig_Man_t * Saig_ManFramesBmc( Aig_Man_t * pAig, int nFrames ) { // create PI nodes for this frame Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create POs for this frame Saig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); if ( f == nFrames - 1 ) break; // save register inputs @@ -137,14 +137,14 @@ Aig_Man_t * Saig_ManFramesBmcLimit( Aig_Man_t * pAig, int nFrames, int nSizeMax { // create PI nodes for this frame Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create POs for this frame Saig_ManForEachPo( pAig, pObj, i ) { - pObjPo = Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + pObjPo = Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); Counter += Saig_ManFramesCount_rec( pFrames, Aig_ObjFanin0(pObjPo) ); } if ( Counter >= nSizeMax ) @@ -265,7 +265,7 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim else { int clkPart = clock(); - Aig_ManForEachPo( pFrames, pObj, i ) + Aig_ManForEachCo( pFrames, pObj, i ) { //if ( s_fInterrupt ) //return -1; diff --git a/src/aig/saig/saigBmc2.c b/src/aig/saig/saigBmc2.c index 85045538..a3e3ea71 100644 --- a/src/aig/saig/saigBmc2.c +++ b/src/aig/saig/saigBmc2.c @@ -407,7 +407,7 @@ Aig_Obj_t * Saig_BmcIntervalConstruct_rec( Saig_Bmc_t * p, Aig_Obj_t * pObj, int if ( pRes != NULL ) return pRes; if ( Saig_ObjIsPi( p->pAig, pObj ) ) - pRes = Aig_ObjCreatePi(p->pFrm); + pRes = Aig_ObjCreateCi(p->pFrm); else if ( Saig_ObjIsLo( p->pAig, pObj ) ) pRes = Saig_BmcIntervalConstruct_rec( p, Saig_ObjLoToLi(p->pAig, pObj), i-1, vVisited ); else if ( Aig_ObjIsPo( pObj ) ) @@ -466,7 +466,7 @@ void Saig_BmcInterval( Saig_Bmc_t * p ) Vec_PtrClear( p->vVisited ); pTarget = Saig_BmcIntervalConstruct_rec( p, Aig_ManPo(p->pAig, p->iOutputLast), p->iFrameLast, p->vVisited ); Vec_PtrPush( p->vTargets, pTarget ); - Aig_ObjCreatePo( p->pFrm, pTarget ); + Aig_ObjCreateCo( p->pFrm, pTarget ); Aig_ManCleanup( p->pFrm ); // check if the node is gone Counter = 0; @@ -504,7 +504,7 @@ Aig_Obj_t * Saig_BmcIntervalToAig_rec( Saig_Bmc_t * p, Aig_Man_t * pNew, Aig_Obj if ( Saig_BmcSatNum(p, pObj) || Aig_ObjIsPi(pObj) ) { p->nStitchVars += !Aig_ObjIsPi(pObj); - return (Aig_Obj_t *)(pObj->pData = Aig_ObjCreatePi(pNew)); + return (Aig_Obj_t *)(pObj->pData = Aig_ObjCreateCi(pNew)); } Saig_BmcIntervalToAig_rec( p, pNew, Aig_ObjFanin0(pObj) ); Saig_BmcIntervalToAig_rec( p, pNew, Aig_ObjFanin1(pObj) ); @@ -540,7 +540,7 @@ Aig_Man_t * Saig_BmcIntervalToAig( Saig_Bmc_t * p ) // assert( !Aig_ObjIsConst1(Aig_Regular(pObj)) ); pObjNew = Saig_BmcIntervalToAig_rec( p, pNew, Aig_Regular(pObj) ); assert( !Aig_IsComplement(pObjNew) ); - Aig_ObjCreatePo( pNew, pObjNew ); + Aig_ObjCreateCo( pNew, pObjNew ); } return pNew; } @@ -728,7 +728,7 @@ void Saig_BmcAddTargetsAsPos( Saig_Bmc_t * p ) Aig_Obj_t * pObj; int i; Vec_PtrForEachEntry( Aig_Obj_t *, p->vTargets, pObj, i ) - Aig_ObjCreatePo( p->pFrm, pObj ); + Aig_ObjCreateCo( p->pFrm, pObj ); Aig_ManPrintStats( p->pFrm ); Aig_ManCleanup( p->pFrm ); Aig_ManPrintStats( p->pFrm ); diff --git a/src/aig/saig/saigBmc3.c b/src/aig/saig/saigBmc3.c index 2124b4c3..19753c3c 100644 --- a/src/aig/saig/saigBmc3.c +++ b/src/aig/saig/saigBmc3.c @@ -154,7 +154,7 @@ unsigned * Saig_ManBmcTerSimOne( Aig_Man_t * p, unsigned * pPrev ) Val1 = Saig_ManBmcSimInfoNot( Val1 ); Saig_ManBmcSimInfoSet( pInfo, pObj, Saig_ManBmcSimInfoAnd(Val0, Val1) ); } - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { Val0 = Saig_ManBmcSimInfoGet( pInfo, Aig_ObjFanin0(pObj) ); if ( Aig_ObjFaninC0(pObj) ) @@ -471,11 +471,11 @@ void Saig_ManBmcWriteBlif( Aig_Man_t * p, Vec_Int_t * vMapping, char * pFileName } fprintf( pFile, ".model test\n" ); fprintf( pFile, ".inputs" ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) fprintf( pFile, " n%d", Aig_ObjId(pObj) ); fprintf( pFile, "\n" ); fprintf( pFile, ".outputs" ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) fprintf( pFile, " n%d", Aig_ObjId(pObj) ); fprintf( pFile, "\n" ); fprintf( pFile, ".names" ); @@ -519,7 +519,7 @@ void Saig_ManBmcWriteBlif( Aig_Man_t * p, Vec_Int_t * vMapping, char * pFileName free( pSops[1] ); free( pSops ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { fprintf( pFile, ".names" ); fprintf( pFile, " n%d", Aig_ObjId(Aig_ObjFanin0(pObj)) ); @@ -578,12 +578,12 @@ Gia_ManBmc_t * Saig_Bmc3ManStart( Aig_Man_t * pAig ) p->nObjNums = 0; p->vId2Num = Vec_IntStartFull( Aig_ManObjNumMax(pAig) ); Vec_IntWriteEntry( p->vId2Num, Aig_ObjId(Aig_ManConst1(pAig)), p->nObjNums++ ); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) Vec_IntWriteEntry( p->vId2Num, Aig_ObjId(pObj), p->nObjNums++ ); Aig_ManForEachNode( pAig, pObj, i ) if ( Vec_IntEntry(p->vMapping, Aig_ObjId(pObj)) > 0 ) Vec_IntWriteEntry( p->vId2Num, Aig_ObjId(pObj), p->nObjNums++ ); - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) Vec_IntWriteEntry( p->vId2Num, Aig_ObjId(pObj), p->nObjNums++ ); p->vPiVars = Vec_IntAlloc( 1000 ); p->vId2Var = Vec_PtrAlloc( 100 ); diff --git a/src/aig/saig/saigCexMin.c b/src/aig/saig/saigCexMin.c index 4b219cac..2fb5cd54 100644 --- a/src/aig/saig/saigCexMin.c +++ b/src/aig/saig/saigCexMin.c @@ -197,7 +197,7 @@ void Saig_ManCexMinVerifyPhase( Aig_Man_t * pAig, Abc_Cex_t * pCex, int f ) Aig_ManForEachNode( pAig, pObj, i ) pObj->fPhase = (Aig_ObjFaninC0(pObj) ^ Aig_ObjFanin0(pObj)->fPhase) & (Aig_ObjFaninC1(pObj) ^ Aig_ObjFanin1(pObj)->fPhase); - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) pObj->fPhase = (Aig_ObjFaninC0(pObj) ^ Aig_ObjFanin0(pObj)->fPhase); } @@ -504,8 +504,8 @@ Aig_Man_t * Saig_ManCexMinDupWithCubes( Aig_Man_t * pAig, Vec_Vec_t * vReg2Value // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -521,11 +521,11 @@ Aig_Man_t * Saig_ManCexMinDupWithCubes( Aig_Man_t * pAig, Vec_Vec_t * vReg2Value pObj = Saig_ManLi( pAig, Abc_Lit2Var(Lit) ); pMiter = Aig_And( pAigNew, pMiter, Aig_NotCond(Aig_ObjChild0Copy(pObj), Abc_LitIsCompl(Lit)) ); } - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); } // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // finalize Aig_ManCleanup( pAigNew ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig) ); diff --git a/src/aig/saig/saigConstr.c b/src/aig/saig/saigConstr.c index fe7363b0..7f45b844 100644 --- a/src/aig/saig/saigConstr.c +++ b/src/aig/saig/saigConstr.c @@ -68,8 +68,8 @@ Aig_Man_t * Saig_ManDupUnfoldConstrs( Aig_Man_t * pAig ) // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -77,14 +77,14 @@ Aig_Man_t * Saig_ManDupUnfoldConstrs( Aig_Man_t * pAig ) pMiter = Aig_ManConst1( pAigNew ); Vec_PtrForEachEntry( Aig_Obj_t *, vOuts, pObj, i ) pMiter = Aig_And( pAigNew, pMiter, Aig_Not(Aig_ObjRealCopy(pObj)) ); - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); // add constraints pAigNew->nConstrs = Vec_PtrSize(vCons); Vec_PtrForEachEntry( Aig_Obj_t *, vCons, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjRealCopy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjRealCopy(pObj) ); // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); Vec_PtrFreeP( &vOuts ); Vec_PtrFreeP( &vCons ); @@ -117,8 +117,8 @@ Aig_Man_t * Saig_ManDupFoldConstrs( Aig_Man_t * pAig, Vec_Int_t * vConstrs ) // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -132,21 +132,21 @@ Aig_Man_t * Saig_ManDupFoldConstrs( Aig_Man_t * pAig, Vec_Int_t * vConstrs ) pMiter = Aig_Or( pAigNew, pMiter, Aig_ObjChild0Copy(pObj) ); } // create additional flop - pFlopOut = Aig_ObjCreatePi( pAigNew ); + pFlopOut = Aig_ObjCreateCi( pAigNew ); pFlopIn = Aig_Or( pAigNew, pMiter, pFlopOut ); // create primary output Saig_ManForEachPo( pAig, pObj, i ) { pMiter = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_Not(pFlopIn) ); - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); } // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // create additional flop - Aig_ObjCreatePo( pAigNew, pFlopIn ); + Aig_ObjCreateCo( pAigNew, pFlopIn ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig)+1 ); Aig_ManCleanup( pAigNew ); diff --git a/src/aig/saig/saigConstr2.c b/src/aig/saig/saigConstr2.c index cb43c5a2..3532ac3f 100644 --- a/src/aig/saig/saigConstr2.c +++ b/src/aig/saig/saigConstr2.c @@ -128,7 +128,7 @@ int Ssw_ManProfileConstraints( Aig_Man_t * p, int nWords, int nFrames, int fVerb for ( w = 0; w < nWords; w++ ) pInfoMask[w] = pInfoMask2[w] = 0; // simulate the primary outputs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { pInfo = (unsigned *)Vec_PtrEntry( vInfo, Aig_ObjId(pObj) ); pInfo0 = (unsigned *)Vec_PtrEntry( vInfo, Aig_ObjFaninId0(pObj) ); @@ -252,10 +252,10 @@ Aig_Man_t * Saig_ManCreateIndMiter( Aig_Man_t * pAig, Vec_Vec_t * vCands ) // create PI nodes for the frames for ( f = 0; f < nFrames; f++ ) Aig_ManForEachPiSeq( pAig, pObj, i ) - Aig_ObjSetFrames( pObjMap, nFrames, pObj, f, Aig_ObjCreatePi(pFrames) ); + Aig_ObjSetFrames( pObjMap, nFrames, pObj, f, Aig_ObjCreateCi(pFrames) ); // set initial state for the latches Aig_ManForEachLoSeq( pAig, pObj, i ) - Aig_ObjSetFrames( pObjMap, nFrames, pObj, 0, Aig_ObjCreatePi(pFrames) ); + Aig_ObjSetFrames( pObjMap, nFrames, pObj, 0, Aig_ObjCreateCi(pFrames) ); // add timeframes for ( f = 0; f < nFrames; f++ ) @@ -286,7 +286,7 @@ Aig_Man_t * Saig_ManCreateIndMiter( Aig_Man_t * pAig, Vec_Vec_t * vCands ) Aig_Obj_t * pFan0 = Aig_NotCond( pNode0, Aig_IsComplement(pObj) ); Aig_Obj_t * pFan1 = Aig_NotCond( pNode1, !Aig_IsComplement(pObj) ); Aig_Obj_t * pMiter = Aig_And( pFrames, pFan0, pFan1 ); - Aig_ObjCreatePo( pFrames, pMiter ); + Aig_ObjCreateCo( pFrames, pMiter ); } } Aig_ManCleanup( pFrames ); @@ -445,10 +445,10 @@ Aig_Man_t * Saig_ManUnrollCOI( Aig_Man_t * pAig, int nFrames ) // create PI nodes for the frames for ( f = 0; f < nFrames; f++ ) Aig_ManForEachPiSeq( pAig, pObj, i ) - Aig_ObjSetFrames( pObjMap, nFrames, pObj, f, Aig_ObjCreatePi(pFrames) ); + Aig_ObjSetFrames( pObjMap, nFrames, pObj, f, Aig_ObjCreateCi(pFrames) ); // set initial state for the latches Aig_ManForEachLoSeq( pAig, pObj, i ) - Aig_ObjSetFrames( pObjMap, nFrames, pObj, 0, Aig_ObjCreatePi(pFrames) ); + Aig_ObjSetFrames( pObjMap, nFrames, pObj, 0, Aig_ObjCreateCi(pFrames) ); // add timeframes for ( f = 0; f < nFrames; f++ ) { @@ -470,7 +470,7 @@ Aig_Man_t * Saig_ManUnrollCOI( Aig_Man_t * pAig, int nFrames ) { Aig_ManForEachPoSeq( pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pFrames, Aig_ObjChild0Frames(pObjMap,nFrames,pObj,f) ); + pObjNew = Aig_ObjCreateCo( pFrames, Aig_ObjChild0Frames(pObjMap,nFrames,pObj,f) ); Aig_ObjSetFrames( pObjMap, nFrames, pObj, f, pObjNew ); } } @@ -894,7 +894,7 @@ Aig_Man_t * Saig_ManDupUnfoldConstrsFunc( Aig_Man_t * pAig, int nFrames, int nCo pNew->nConstrs = pAig->nConstrs + Vec_VecSizeSize(vCands); // add normal POs Saig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); // create constraint outputs vNewFlops = Vec_PtrAlloc( 100 ); Vec_VecForEachLevel( vCands, vNodes, i ) @@ -903,13 +903,13 @@ Aig_Man_t * Saig_ManDupUnfoldConstrsFunc( Aig_Man_t * pAig, int nFrames, int nCo { Vec_PtrPush( vNewFlops, Aig_ObjRealCopy(pObj) ); for ( j = 0; j < i; j++ ) - Vec_PtrPush( vNewFlops, Aig_ObjCreatePi(pNew) ); - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Vec_PtrPop(vNewFlops) ); + Vec_PtrPush( vNewFlops, Aig_ObjCreateCi(pNew) ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Vec_PtrPop(vNewFlops) ); } } // add latch outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); // add new latch outputs nNewFlops = 0; Vec_VecForEachLevel( vCands, vNodes, i ) @@ -917,7 +917,7 @@ Aig_Man_t * Saig_ManDupUnfoldConstrsFunc( Aig_Man_t * pAig, int nFrames, int nCo Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, k ) { for ( j = 0; j < i; j++ ) - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vNewFlops, nNewFlops++) ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vNewFlops, nNewFlops++) ); } } assert( nNewFlops == Vec_PtrSize(vNewFlops) ); @@ -954,8 +954,8 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -969,7 +969,7 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo pMiter = Aig_Or( pAigNew, pMiter, Aig_NotCond( Aig_ObjChild0Copy(pObj), fCompl ) ); } // create additional flop - pFlopOut = Aig_ObjCreatePi( pAigNew ); + pFlopOut = Aig_ObjCreateCi( pAigNew ); pFlopIn = Aig_Or( pAigNew, pMiter, pFlopOut ); // create primary output @@ -978,14 +978,14 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo if ( i >= Saig_ManPoNum(pAig)-Aig_ManConstrNum(pAig) ) continue; pMiter = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_Not(pFlopIn) ); - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); } // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // create additional flop - Aig_ObjCreatePo( pAigNew, pFlopIn ); + Aig_ObjCreateCo( pAigNew, pFlopIn ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig)+1 ); Aig_ManCleanup( pAigNew ); diff --git a/src/aig/saig/saigDual.c b/src/aig/saig/saigDual.c index 291d49a4..62f479ee 100644 --- a/src/aig/saig/saigDual.c +++ b/src/aig/saig/saigDual.c @@ -94,22 +94,22 @@ Aig_Man_t * Saig_ManDupDual( Aig_Man_t * pAig, int nDualPis, int fDualFfs, int f Saig_ObjSetDual( vCopies, 0, 0, Aig_ManConst0(pAigNew) ); Saig_ObjSetDual( vCopies, 0, 1, Aig_ManConst1(pAigNew) ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) { if ( i < nDualPis ) { - pTemp0 = Aig_ObjCreatePi( pAigNew ); - pTemp1 = Aig_ObjCreatePi( pAigNew ); + pTemp0 = Aig_ObjCreateCi( pAigNew ); + pTemp1 = Aig_ObjCreateCi( pAigNew ); } else if ( i < Saig_ManPiNum(pAig) ) { - pTemp1 = Aig_ObjCreatePi( pAigNew ); + pTemp1 = Aig_ObjCreateCi( pAigNew ); pTemp0 = Aig_Not( pTemp1 ); } else { - pTemp0 = Aig_ObjCreatePi( pAigNew ); - pTemp1 = Aig_ObjCreatePi( pAigNew ); + pTemp0 = Aig_ObjCreateCi( pAigNew ); + pTemp1 = Aig_ObjCreateCi( pAigNew ); pTemp0 = Aig_NotCond( pTemp0, !fDualFfs ); } Saig_ObjSetDual( vCopies, Aig_ObjId(pObj), 0, Aig_And(pAigNew, pTemp0, Aig_Not(pTemp1)) ); @@ -145,14 +145,14 @@ Aig_Man_t * Saig_ManDupDual( Aig_Man_t * pAig, int nDualPis, int fDualFfs, int f } // create PO pMiter = Aig_NotCond( pMiter, fComplPo ); - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); // create flops Saig_ManForEachLi( pAig, pObj, i ) { Saig_ObjDualFanin( pAigNew, vCopies, pObj, 0, &pTemp0, &pTemp1 ); pTemp0 = Aig_NotCond( pTemp0, !fDualFfs ); - Aig_ObjCreatePo( pAigNew, pTemp0 ); - Aig_ObjCreatePo( pAigNew, pTemp1 ); + Aig_ObjCreateCo( pAigNew, pTemp0 ); + Aig_ObjCreateCo( pAigNew, pTemp1 ); } // set the flops Aig_ManSetRegNum( pAigNew, 2 * Aig_ManRegNum(pAig) ); @@ -183,8 +183,8 @@ void Saig_ManBlockPo( Aig_Man_t * pAig, int nCycles ) pCond = Aig_ManConst1(pAig); for ( i = 0; i < nCycles; i++ ) { - Aig_ObjCreatePo( pAig, pPrev ); - pPrev = Aig_ObjCreatePi( pAig ); + Aig_ObjCreateCo( pAig, pPrev ); + pPrev = Aig_ObjCreateCi( pAig ); pCond = Aig_And( pAig, pCond, pPrev ); } // update the POs diff --git a/src/aig/saig/saigDup.c b/src/aig/saig/saigDup.c index e0b3bd2a..7e1499b4 100644 --- a/src/aig/saig/saigDup.c +++ b/src/aig/saig/saigDup.c @@ -59,8 +59,8 @@ Aig_Man_t * Saig_ManDupOrpos( Aig_Man_t * pAig ) // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -68,10 +68,10 @@ Aig_Man_t * Saig_ManDupOrpos( Aig_Man_t * pAig ) pMiter = Aig_ManConst0( pAigNew ); Saig_ManForEachPo( pAig, pObj, i ) pMiter = Aig_Or( pAigNew, pMiter, Aig_ObjChild0Copy(pObj) ); - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); Aig_ManCleanup( pAigNew ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig) ); return pAigNew; @@ -105,8 +105,8 @@ Aig_Man_t * Saig_ManCreateEquivMiter( Aig_Man_t * pAig, Vec_Int_t * vPairs ) // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -117,11 +117,11 @@ Aig_Man_t * Saig_ManCreateEquivMiter( Aig_Man_t * pAig, Vec_Int_t * vPairs ) pObj2 = Aig_ManObj( pAig, Vec_IntEntry(vPairs, ++i) ); pMiter = Aig_Exor( pAigNew, (Aig_Obj_t *)pObj->pData, (Aig_Obj_t *)pObj2->pData ); pMiter = Aig_NotCond( pMiter, pObj->fPhase ^ pObj2->fPhase ); - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); } // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); Aig_ManCleanup( pAigNew ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig) ); return pAigNew; @@ -157,16 +157,16 @@ Aig_Man_t * Saig_ManTrimPis( Aig_Man_t * p ) // map const and primary inputs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) if ( fAllPisHaveNoRefs || pObj->nRefs || Saig_ObjIsLo(p, pObj) ) { - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Vec_IntPush( pNew->vCiNumsOrig, Vec_IntEntry(p->vCiNumsOrig, i) ); } Aig_ManForEachNode( p, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); - Aig_ManForEachPo( p, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ManForEachCo( p, pObj, i ) + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Aig_ManSetRegNum( pNew, Aig_ManRegNum(p) ); return pNew; } @@ -226,18 +226,18 @@ Aig_Man_t * Saig_ManDupAbstraction( Aig_Man_t * p, Vec_Int_t * vFlops ) // create variables for PIs assert( p->vCiNumsOrig == NULL ); pNew->vCiNumsOrig = Vec_IntAlloc( Aig_ManPiNum(p) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) if ( !pObj->fMarkA ) { - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Vec_IntPush( pNew->vCiNumsOrig, i ); } // create variables for LOs - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) if ( pObj->fMarkA ) { pObj->fMarkA = 0; - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Vec_IntPush( pNew->vCiNumsOrig, i ); } // add internal nodes @@ -247,15 +247,15 @@ Aig_Man_t * Saig_ManDupAbstraction( Aig_Man_t * p, Vec_Int_t * vFlops ) Saig_ManForEachPo( p, pObj, i ) { Saig_ManAbstractionDfs_rec( pNew, Aig_ObjFanin0(pObj) ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } // create LIs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( pObj->fMarkA ) { pObj->fMarkA = 0; Saig_ManAbstractionDfs_rec( pNew, Aig_ObjFanin0(pObj) ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManSetRegNum( pNew, Vec_IntSize(vFlops) ); Aig_ManSeqCleanup( pNew ); @@ -291,7 +291,7 @@ int Saig_ManVerifyCex( Aig_Man_t * pAig, Abc_Cex_t * p ) Aig_ManForEachNode( pAig, pObj, k ) pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pAig, pObj, k ) + Aig_ManForEachCo( pAig, pObj, k ) pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj); if ( i == p->iFrame ) break; @@ -334,14 +334,14 @@ Abc_Cex_t * Saig_ManExtendCex( Aig_Man_t * pAig, Abc_Cex_t * p ) Saig_ManForEachPi( pAig, pObj, k ) pObj->fMarkB = Abc_InfoHasBit(p->pData, iBit++); ///////// write PI+LO values //////////// - Aig_ManForEachPi( pAig, pObj, k ) + Aig_ManForEachCi( pAig, pObj, k ) if ( pObj->fMarkB ) Abc_InfoSetBit(pNew->pData, Aig_ManPiNum(pAig)*i + k); ///////////////////////////////////////// Aig_ManForEachNode( pAig, pObj, k ) pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pAig, pObj, k ) + Aig_ManForEachCo( pAig, pObj, k ) pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj); if ( i == p->iFrame ) break; @@ -382,7 +382,7 @@ int Saig_ManFindFailedPoCex( Aig_Man_t * pAig, Abc_Cex_t * p ) Aig_ManForEachNode( pAig, pObj, k ) pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pAig, pObj, k ) + Aig_ManForEachCo( pAig, pObj, k ) pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj); if ( i == p->iFrame ) break; @@ -426,8 +426,8 @@ Aig_Man_t * Saig_ManDupWithPhase( Aig_Man_t * pAig, Vec_Int_t * vInit ) // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // update the flop variables Saig_ManForEachLo( pAig, pObj, i ) pObj->pData = Aig_NotCond( (Aig_Obj_t *)pObj->pData, Vec_IntEntry(vInit, i) ); @@ -436,10 +436,10 @@ Aig_Man_t * Saig_ManDupWithPhase( Aig_Man_t * pAig, Vec_Int_t * vInit ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // transfer to register outputs Saig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // update the flop variables Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_NotCond(Aig_ObjChild0Copy(pObj), Vec_IntEntry(vInit, i)) ); + Aig_ObjCreateCo( pAigNew, Aig_NotCond(Aig_ObjChild0Copy(pObj), Vec_IntEntry(vInit, i)) ); // finalize Aig_ManCleanup( pAigNew ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig) ); @@ -503,16 +503,16 @@ Aig_Man_t * Saig_ManDupCones( Aig_Man_t * pAig, int * pPos, int nPos ) Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create PIs Vec_PtrForEachEntry( Aig_Obj_t *, vLeaves, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + pObj->pData = Aig_ObjCreateCi( pAigNew ); // create LOs Vec_PtrForEachEntryStart( Aig_Obj_t *, vRoots, pObj, i, nPos ) - Saig_ObjLiToLo(pAig, pObj)->pData = Aig_ObjCreatePi( pAigNew ); + Saig_ObjLiToLo(pAig, pObj)->pData = Aig_ObjCreateCi( pAigNew ); // create internal nodes Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create COs Vec_PtrForEachEntry( Aig_Obj_t *, vRoots, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // finalize Aig_ManSetRegNum( pAigNew, Vec_PtrSize(vRoots)-nPos ); Vec_PtrFree( vLeaves ); diff --git a/src/aig/saig/saigGlaCba.c b/src/aig/saig/saigGlaCba.c index d1efca0b..f3bfc695 100644 --- a/src/aig/saig/saigGlaCba.c +++ b/src/aig/saig/saigGlaCba.c @@ -256,26 +256,26 @@ Aig_Man_t * Aig_Gla1DeriveAbs( Aig_Gla1Man_t * p ) Aig_ManConst1(p->pAig)->pData = Aig_ManConst1(pNew); // create PIs Aig_ManForEachObjVec( p->vPis, p->pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); // create additional PIs Aig_ManForEachObjVec( p->vPPis, p->pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); // create ROs Aig_ManForEachObjVec( p->vFlops, p->pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); // create internal nodes Aig_ManForEachObjVec( p->vNodes, p->pAig, pObj, i ) // pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); Aig_Gla1DeriveAbs_rec( pNew, pObj ); // create PO Saig_ManForEachPo( p->pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); // create RIs Aig_ManForEachObjVec( p->vFlops, p->pAig, pObj, i ) { assert( Saig_ObjIsLo(p->pAig, pObj) ); pObj = Saig_ObjLoToLi( p->pAig, pObj ); - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManSetRegNum( pNew, Vec_IntSize(p->vFlops) ); // clean up diff --git a/src/aig/saig/saigHaig.c b/src/aig/saig/saigHaig.c index ee058a3c..ef90734a 100644 --- a/src/aig/saig/saigHaig.c +++ b/src/aig/saig/saigHaig.c @@ -71,11 +71,11 @@ void Aig_ManHaigSpeculate( Aig_Man_t * pFrames, Aig_Obj_t * pObj ) // pMiter = Aig_Exor( pFrames, pObjNew, pObjReprNew ); // pMiter = Aig_NotCond( pMiter, !Aig_ObjPhaseReal(pMiter) ); // assert( Aig_ObjPhaseReal(pMiter) == 1 ); -// Aig_ObjCreatePo( pFrames, pMiter ); +// Aig_ObjCreateCo( pFrames, pMiter ); if ( Aig_ObjPhaseReal(pObjNew) != Aig_ObjPhaseReal(pObjReprNew) ) pObjReprNew = Aig_Not(pObjReprNew); - pPo = Aig_ObjCreatePo( pFrames, pObjNew ); - Aig_ObjCreatePo( pFrames, pObjReprNew ); + pPo = Aig_ObjCreateCo( pFrames, pObjNew ); + Aig_ObjCreateCo( pFrames, pObjReprNew ); // remember the node corresponding to this PO pPo->pData = pObj; @@ -107,14 +107,14 @@ Aig_Man_t * Aig_ManHaigFrames( Aig_Man_t * pHaig, int nFrames ) Aig_ManConst1(pHaig)->pData = Aig_ManConst1( pFrames ); // create variables for register outputs Saig_ManForEachLo( pHaig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add timeframes Aig_ManSetPioNumbers( pHaig ); for ( f = 0; f < nFrames; f++ ) { // create primary inputs Saig_ManForEachPi( pHaig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // create internal nodes Aig_ManForEachNode( pHaig, pObj, i ) { @@ -246,7 +246,7 @@ clk = clock(); if ( nFrames == 2 ) { // add clauses for the first frame - Aig_ManForEachPo( pFrames, pObj1, i ) + Aig_ManForEachCo( pFrames, pObj1, i ) { if ( i >= Aig_ManPoNum(pFrames) - pFrames->nAsserts ) break; @@ -283,7 +283,7 @@ ABC_PRT( "Preparation", clock() - clk ); clk = clock(); Counter = 0; printf( "Started solving ...\r" ); - Aig_ManForEachPo( pFrames, pObj1, i ) + Aig_ManForEachCo( pFrames, pObj1, i ) { if ( i < Aig_ManPoNum(pFrames) - pFrames->nAsserts ) continue; @@ -560,7 +560,7 @@ Aig_Man_t * Saig_ManHaigDump( Aig_Man_t * pHaig ) // remove regular POs Aig_ManSetPioNumbers( pHaig ); vTemp = Vec_PtrAlloc( Saig_ManRegNum(pHaig) ); - Aig_ManForEachPo( pHaig, pObj, i ) + Aig_ManForEachCo( pHaig, pObj, i ) { if ( Saig_ObjIsPo(pHaig, pObj) ) { @@ -585,7 +585,7 @@ Aig_Man_t * Saig_ManHaigDump( Aig_Man_t * pHaig ) pMiter = Aig_Exor( pHaig, pObj1, pObj2 ); pMiter = Aig_NotCond( pMiter, Aig_ObjPhaseReal(pMiter) ); assert( Aig_ObjPhaseReal(pMiter) == 0 ); - Aig_ObjCreatePo( pHaig, pMiter ); + Aig_ObjCreateCo( pHaig, pMiter ); } printf( "Added %d property outputs.\n", Vec_IntSize(pHaig->vEquPairs)/2 ); // add the registers diff --git a/src/aig/saig/saigInd.c b/src/aig/saig/saigInd.c index 33146077..0dd1e7d2 100644 --- a/src/aig/saig/saigInd.c +++ b/src/aig/saig/saigInd.c @@ -194,7 +194,7 @@ int Saig_ManInduction( Aig_Man_t * p, int nFramesMax, int nConfMax, int fUnique, if ( fGetCex && vTopVarIds == NULL ) { vTopVarIds = Vec_IntStartFull( Aig_ManPiNum(p) ); - Aig_ManForEachPi( p, pObjPi, i ) + Aig_ManForEachCi( p, pObjPi, i ) { if ( pObjPi->pData == NULL ) continue; @@ -210,7 +210,7 @@ int Saig_ManInduction( Aig_Man_t * p, int nFramesMax, int nConfMax, int fUnique, // stitch variables of top and bot assert( Aig_ManPoNum(pAigPart)-1 == Vec_IntSize(vTopVarNums) ); - Aig_ManForEachPo( pAigPart, pObjPo, i ) + Aig_ManForEachCo( pAigPart, pObjPo, i ) { if ( i == 0 ) { diff --git a/src/aig/saig/saigIoa.c b/src/aig/saig/saigIoa.c index bdd187d9..82d6c9af 100644 --- a/src/aig/saig/saigIoa.c +++ b/src/aig/saig/saigIoa.c @@ -130,7 +130,7 @@ void Saig_ManDumpBlif( Aig_Man_t * p, char * pFileName ) fprintf( pFile, "\n%d%d 1\n", !Aig_ObjFaninC0(pObj), !Aig_ObjFaninC1(pObj) ); } // write the POs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { fprintf( pFile, ".names" ); fprintf( pFile, " %s", Saig_ObjName(p, Aig_ObjFanin0(pObj)) ); @@ -299,7 +299,7 @@ Aig_Man_t * Saig_ManReadBlif( char * pFileName ) } // create PIs and LOs for ( i = 0; i < nPis + nRegs; i++ ) - Aig_ObjCreatePi( p ); + Aig_ObjCreateCi( p ); Aig_ManSetRegNum( p, nRegs ); // create nodes for ( i = 0; strcmp( pToken, ".names" ) == 0; i++ ) @@ -334,7 +334,7 @@ Aig_Man_t * Saig_ManReadBlif( char * pFileName ) pToken = Saig_ManReadToken( pFile ); if ( pToken == NULL || strcmp( pToken, "1" ) ) { printf( "Saig_ManReadBlif(): Error 13.\n" ); Aig_ManStop(p); return NULL; } - Aig_ObjCreatePo( p, pFanin0 ); + Aig_ObjCreateCo( p, pFanin0 ); // read next pToken = Saig_ManReadToken( pFile ); if ( pToken == NULL ) @@ -385,7 +385,7 @@ Aig_Man_t * Saig_ManReadBlif( char * pFileName ) if ( nPos + nRegs != Aig_ManPoNum(p) ) { printf( "Saig_ManReadBlif(): Error 20.\n" ); Aig_ManStop(p); return NULL; } // add non-node objects to the mapping - Aig_ManForEachPi( p, pNode, i ) + Aig_ManForEachCi( p, pNode, i ) pNum2Id[pNode->Id] = pNode->Id; // ABC_FREE( pNum2Id ); p->pData = pNum2Id; diff --git a/src/aig/saig/saigIso.c b/src/aig/saig/saigIso.c index 874cdef3..dac8e273 100644 --- a/src/aig/saig/saigIso.c +++ b/src/aig/saig/saigIso.c @@ -146,7 +146,7 @@ Aig_Man_t * Saig_ManDupIsoCanonical( Aig_Man_t * pAig, int fVerbose ) Vec_IntForEachEntry( vPerm, Entry, i ) { pObj = Aig_ManPi(pAig, Entry); - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Aig_ObjSetTravIdCurrent( pAig, pObj ); } // traverse from the POs @@ -159,7 +159,7 @@ Aig_Man_t * Saig_ManDupIsoCanonical( Aig_Man_t * pAig, int fVerbose ) Vec_IntForEachEntry( vPermCo, Entry, i ) { pObj = Aig_ManPo(pAig, Entry); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManSetRegNum( pNew, Aig_ManRegNum(pAig) ); Vec_IntFreeP( &vPerm ); @@ -194,7 +194,7 @@ int Iso_ManCheckMapping( Aig_Man_t * pAig1, Aig_Man_t * pAig2, Vec_Int_t * vMap2 Aig_ManCleanData( pAig1 ); // map const and PI nodes Aig_ManConst1(pAig2)->pData = Aig_ManConst1(pAig1); - Aig_ManForEachPi( pAig2, pObj, i ) + Aig_ManForEachCi( pAig2, pObj, i ) pObj->pData = Aig_ManPi( pAig1, Vec_IntEntry(vMap2to1, i) ); // try internal nodes Aig_ManForEachNode( pAig2, pObj, i ) diff --git a/src/aig/saig/saigIsoSlow.c b/src/aig/saig/saigIsoSlow.c index a5b1a2d8..eabf7c1b 100644 --- a/src/aig/saig/saigIsoSlow.c +++ b/src/aig/saig/saigIsoSlow.c @@ -1105,7 +1105,7 @@ Vec_Int_t * Iso_ManFinalize( Iso_Man_t * p ) // assign unique IDs to the CIs Vec_PtrClear( p->vTemp1 ); Vec_PtrClear( p->vTemp2 ); - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) { assert( pObj->iData > 0 ); if ( Aig_ObjPioNum(pObj) >= Aig_ManPiNum(p->pAig) - Aig_ManRegNum(p->pAig) ) // flop diff --git a/src/aig/saig/saigMiter.c b/src/aig/saig/saigMiter.c index 7fde61b1..9f8328b1 100644 --- a/src/aig/saig/saigMiter.c +++ b/src/aig/saig/saigMiter.c @@ -114,14 +114,14 @@ Aig_Man_t * Saig_ManCreateMiter( Aig_Man_t * p0, Aig_Man_t * p1, int Oper ) Aig_ManConst1(p1)->pData = Aig_ManConst1(pNew); // map primary inputs Saig_ManForEachPi( p0, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Saig_ManForEachPi( p1, pObj, i ) pObj->pData = Aig_ManPi( pNew, i ); // map register outputs Saig_ManForEachLo( p0, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Saig_ManForEachLo( p1, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); // map internal nodes Aig_ManForEachNode( p0, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -136,13 +136,13 @@ Aig_Man_t * Saig_ManCreateMiter( Aig_Man_t * p0, Aig_Man_t * p1, int Oper ) pObj = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_Not(Aig_ObjChild0Copy(Aig_ManPo(p1,i))) ); else assert( 0 ); - Aig_ObjCreatePo( pNew, pObj ); + Aig_ObjCreateCo( pNew, pObj ); } // create register inputs Saig_ManForEachLi( p0, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Saig_ManForEachLi( p1, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); // cleanup Aig_ManSetRegNum( pNew, Saig_ManRegNum(p0) + Saig_ManRegNum(p1) ); // Aig_ManCleanup( pNew ); @@ -173,9 +173,9 @@ Aig_Man_t * Saig_ManCreateMiterComb( Aig_Man_t * p0, Aig_Man_t * p1, int Oper ) Aig_ManConst1(p0)->pData = Aig_ManConst1(pNew); Aig_ManConst1(p1)->pData = Aig_ManConst1(pNew); // map primary inputs and register outputs - Aig_ManForEachPi( p0, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); - Aig_ManForEachPi( p1, pObj, i ) + Aig_ManForEachCi( p0, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); + Aig_ManForEachCi( p1, pObj, i ) pObj->pData = Aig_ManPi( pNew, i ); // map internal nodes Aig_ManForEachNode( p0, pObj, i ) @@ -183,7 +183,7 @@ Aig_Man_t * Saig_ManCreateMiterComb( Aig_Man_t * p0, Aig_Man_t * p1, int Oper ) Aig_ManForEachNode( p1, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create primary outputs - Aig_ManForEachPo( p0, pObj, i ) + Aig_ManForEachCo( p0, pObj, i ) { if ( Oper == 0 ) // XOR pObj = Aig_Exor( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild0Copy(Aig_ManPo(p1,i)) ); @@ -191,7 +191,7 @@ Aig_Man_t * Saig_ManCreateMiterComb( Aig_Man_t * p0, Aig_Man_t * p1, int Oper ) pObj = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_Not(Aig_ObjChild0Copy(Aig_ManPo(p1,i))) ); else assert( 0 ); - Aig_ObjCreatePo( pNew, pObj ); + Aig_ObjCreateCo( pNew, pObj ); } // cleanup Aig_ManSetRegNum( pNew, 0 ); @@ -251,10 +251,10 @@ Aig_Man_t * Saig_ManDualRail( Aig_Man_t * p, int fMiter ) // create the PIs Aig_ManConst1(p)->pData = Aig_ManConst0(pNew); Aig_ManConst1(p)->pNext = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { - pObj->pData = Aig_ObjCreatePi( pNew ); - pObj->pNext = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); + pObj->pNext = Aig_ObjCreateCi( pNew ); } // duplicate internal nodes Aig_ManForEachNode( p, pObj, i ) @@ -268,34 +268,34 @@ Aig_Man_t * Saig_ManDualRail( Aig_Man_t * p, int fMiter ) pMiter = Aig_And( pNew, pMiter, Aig_Or(pNew, (Aig_Obj_t *)pObj->pData, pObj->pNext) ); } - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); Saig_ManForEachLi( p, pObj, i ) { if ( !Aig_ObjFaninC0(pObj) ) { - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); - Aig_ObjCreatePo( pNew, Aig_ObjFanin0(pObj)->pNext ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + Aig_ObjCreateCo( pNew, Aig_ObjFanin0(pObj)->pNext ); } else { - Aig_ObjCreatePo( pNew, Aig_ObjFanin0(pObj)->pNext ); - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + Aig_ObjCreateCo( pNew, Aig_ObjFanin0(pObj)->pNext ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); } } } else { - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { if ( !Aig_ObjFaninC0(pObj) ) { - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); - Aig_ObjCreatePo( pNew, Aig_ObjFanin0(pObj)->pNext ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + Aig_ObjCreateCo( pNew, Aig_ObjFanin0(pObj)->pNext ); } else { - Aig_ObjCreatePo( pNew, Aig_ObjFanin0(pObj)->pNext ); - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + Aig_ObjCreateCo( pNew, Aig_ObjFanin0(pObj)->pNext ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); } } } @@ -336,27 +336,27 @@ Aig_Man_t * Saig_ManUnrollTwo( Aig_Man_t * pBot, Aig_Man_t * pTop, int nFrames ) // create variables for register outputs pAig = pBot; Saig_ManForEachLo( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( p ); + pObj->pData = Aig_ObjCreateCi( p ); // add timeframes for ( f = 0; f < nFrames; f++ ) { // create PI nodes for this frame Aig_ManConst1(pAig)->pData = Aig_ManConst1( p ); Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( p ); + pObj->pData = Aig_ObjCreateCi( p ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( p, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); if ( f == nFrames - 1 ) { // create POs for this frame - Aig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( p, Aig_ObjChild0Copy(pObj) ); + Aig_ManForEachCo( pAig, pObj, i ) + Aig_ObjCreateCo( p, Aig_ObjChild0Copy(pObj) ); break; } // create POs for this frame Saig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( p, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( p, Aig_ObjChild0Copy(pObj) ); // save register inputs Saig_ManForEachLi( pAig, pObj, i ) pObj->pData = Aig_ObjChild0Copy(pObj); @@ -394,16 +394,16 @@ Aig_Man_t * Aig_ManDupNodesAll( Aig_Man_t * p, Vec_Ptr_t * vSet ) pNew = Aig_ManStart( Aig_ManObjNumMax(p) ); pNew->pName = Abc_UtilStrsav( p->pName ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); Aig_ManForEachNode( p, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // Saig_ManForEachPo( p, pObj, i ) -// pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); +// pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Vec_PtrForEachEntry( Aig_Obj_t *, vSet, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_Regular(pObj)->pData, Aig_IsComplement(pObj)) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_Regular(pObj)->pData, Aig_IsComplement(pObj)) ); Saig_ManForEachLi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Aig_ManSetRegNum( pNew, Saig_ManRegNum(p) ); // cleanup and return a copy Aig_ManSeqCleanup( pNew ); @@ -433,40 +433,40 @@ Aig_Man_t * Aig_ManDupNodesHalf( Aig_Man_t * p, Vec_Ptr_t * vSet, int iPart ) pNew->pName = Abc_UtilStrsav( p->pName ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Saig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); if ( iPart == 0 ) { Saig_ManForEachLo( p, pObj, i ) if ( i < Saig_ManRegNum(p)/2 ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); } else { Saig_ManForEachLo( p, pObj, i ) if ( i >= Saig_ManRegNum(p)/2 ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); } Aig_ManForEachNode( p, pObj, i ) if ( Aig_ObjFanin0(pObj)->pData && Aig_ObjFanin1(pObj)->pData ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // Saig_ManForEachPo( p, pObj, i ) -// pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); +// pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Vec_PtrForEachEntry( Aig_Obj_t *, vSet, pObj, i ) { assert( Aig_Regular(pObj)->pData != NULL ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_Regular(pObj)->pData, Aig_IsComplement(pObj)) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_Regular(pObj)->pData, Aig_IsComplement(pObj)) ); } if ( iPart == 0 ) { Saig_ManForEachLi( p, pObj, i ) if ( i < Saig_ManRegNum(p)/2 ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } else { Saig_ManForEachLi( p, pObj, i ) if ( i >= Saig_ManRegNum(p)/2 ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Aig_ManSetRegNum( pNew, Saig_ManRegNum(p)/2 ); // cleanup and return a copy @@ -1041,14 +1041,14 @@ int Ssw_SecCexResimulate( Aig_Man_t * p, int * pModel, int * pnOutputs ) int i, RetValue = -1; *pnOutputs = 0; Aig_ManConst1(p)->fMarkA = 1; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->fMarkA = pModel[i]; Aig_ManForEachNode( p, pObj, i ) pObj->fMarkA = ( Aig_ObjFanin0(pObj)->fMarkA ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fMarkA ^ Aig_ObjFaninC1(pObj) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pObj->fMarkA = Aig_ObjFanin0(pObj)->fMarkA ^ Aig_ObjFaninC0(pObj); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( pObj->fMarkA ) { if ( RetValue == -1 ) diff --git a/src/aig/saig/saigOutDec.c b/src/aig/saig/saigOutDec.c index e72ea132..4e7e955f 100644 --- a/src/aig/saig/saigOutDec.c +++ b/src/aig/saig/saigOutDec.c @@ -165,14 +165,14 @@ Aig_Man_t * Saig_ManDecPropertyOutput( Aig_Man_t * pAig, int nLits, int fVerbose // map the constant node Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); // create variables for PIs - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create original POs of the circuit Saig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // create prime POs of the circuit if ( vPrimes ) Vec_PtrForEachEntry( Vec_Int_t *, vPrimes, vCube, k ) @@ -183,11 +183,11 @@ Aig_Man_t * Saig_ManDecPropertyOutput( Aig_Man_t * pAig, int nLits, int fVerbose pObj = Aig_NotCond( Aig_ObjCopy(Aig_ManObj(pAig, Abc_Lit2Var(Lit))), Abc_LitIsCompl(Lit) ); pMiter = Aig_And( pAigNew, pMiter, pObj ); } - Aig_ObjCreatePo( pAigNew, pMiter ); + Aig_ObjCreateCo( pAigNew, pMiter ); } // transfer to register outputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); Aig_ManCleanup( pAigNew ); Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig) ); diff --git a/src/aig/saig/saigPhase.c b/src/aig/saig/saigPhase.c index 637da63e..f0bf3281 100644 --- a/src/aig/saig/saigPhase.c +++ b/src/aig/saig/saigPhase.c @@ -769,10 +769,10 @@ Aig_Man_t * Saig_ManPerformAbstraction( Saig_Tsim_t * pTsi, int nFrames, int fVe // create PI nodes for the frames for ( f = 0; f < nFrames; f++ ) Aig_ManForEachPiSeq( pAig, pObj, i ) - Saig_ObjSetFrames( pObjMap, nFrames, pObj, f, Aig_ObjCreatePi(pFrames) ); + Saig_ObjSetFrames( pObjMap, nFrames, pObj, f, Aig_ObjCreateCi(pFrames) ); // create the latches Aig_ManForEachLoSeq( pAig, pObj, i ) - Saig_ObjSetFrames( pObjMap, nFrames, pObj, 0, Aig_ObjCreatePi(pFrames) ); + Saig_ObjSetFrames( pObjMap, nFrames, pObj, 0, Aig_ObjCreateCi(pFrames) ); // add timeframes for ( f = 0; f < nFrames; f++ ) @@ -805,7 +805,7 @@ Aig_Man_t * Saig_ManPerformAbstraction( Saig_Tsim_t * pTsi, int nFrames, int fVe { Aig_ManForEachPoSeq( pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pFrames, Saig_ObjChild0Frames(pObjMap,nFrames,pObj,f) ); + pObjNew = Aig_ObjCreateCo( pFrames, Saig_ObjChild0Frames(pObjMap,nFrames,pObj,f) ); Saig_ObjSetFrames( pObjMap, nFrames, pObj, f, pObjNew ); } } @@ -814,7 +814,7 @@ Aig_Man_t * Saig_ManPerformAbstraction( Saig_Tsim_t * pTsi, int nFrames, int fVe pFrames->nTruePos = Aig_ManPoNum(pFrames) - Aig_ManRegNum(pFrames); Aig_ManForEachLiSeq( pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePo( pFrames, Saig_ObjChild0Frames(pObjMap,nFrames,pObj,nFrames-1) ); + pObjNew = Aig_ObjCreateCo( pFrames, Saig_ObjChild0Frames(pObjMap,nFrames,pObj,nFrames-1) ); Saig_ObjSetFrames( pObjMap, nFrames, pObj, nFrames-1, pObjNew ); } //Aig_ManPrintStats( pFrames ); diff --git a/src/aig/saig/saigRefSat.c b/src/aig/saig/saigRefSat.c index dcd95d36..09a0c69b 100644 --- a/src/aig/saig/saigRefSat.c +++ b/src/aig/saig/saigRefSat.c @@ -177,7 +177,7 @@ Vec_Int_t * Saig_RefManFindReason( Saig_RefMan_t * p ) // set PI values according to CEX CountPrios = 0; Aig_ManConst1(p->pFrames)->fPhase = 1; - Aig_ManForEachPi( p->pFrames, pObj, i ) + Aig_ManForEachCi( p->pFrames, pObj, i ) { int iInput = Vec_IntEntry( p->vMapPiF2A, 2*i ); int iFrame = Vec_IntEntry( p->vMapPiF2A, 2*i+1 ); @@ -323,7 +323,7 @@ Aig_Man_t * Saig_ManUnrollWithCex( Aig_Man_t * pAig, Abc_Cex_t * pCex, int nInpu } else { - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); Vec_IntPush( *pvMapPiF2A, Aig_ObjPioNum(pObj) ); Vec_IntPush( *pvMapPiF2A, f ); } @@ -338,7 +338,7 @@ Aig_Man_t * Saig_ManUnrollWithCex( Aig_Man_t * pAig, Abc_Cex_t * pCex, int nInpu } // create output pObj = Aig_ManPo( pAig, pCex->iPo ); - Aig_ObjCreatePo( pFrames, Aig_Not((Aig_Obj_t *)pObj->pData) ); + Aig_ObjCreateCo( pFrames, Aig_Not((Aig_Obj_t *)pObj->pData) ); Aig_ManSetRegNum( pFrames, 0 ); // cleanup Vec_VecFree( vFrameCos ); @@ -406,7 +406,7 @@ int Saig_RefManSetPhases( Saig_RefMan_t * p, Abc_Cex_t * pCare, int fValue1 ) Aig_Obj_t * pObj; int i, iFrame, iInput; Aig_ManConst1( p->pFrames )->fPhase = 1; - Aig_ManForEachPi( p->pFrames, pObj, i ) + Aig_ManForEachCi( p->pFrames, pObj, i ) { iInput = Vec_IntEntry( p->vMapPiF2A, 2*i ); iFrame = Vec_IntEntry( p->vMapPiF2A, 2*i+1 ); @@ -418,7 +418,7 @@ int Saig_RefManSetPhases( Saig_RefMan_t * p, Abc_Cex_t * pCare, int fValue1 ) Aig_ManForEachNode( p->pFrames, pObj, i ) pObj->fPhase = ( Aig_ObjFanin0(pObj)->fPhase ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fPhase ^ Aig_ObjFaninC1(pObj) ); - Aig_ManForEachPo( p->pFrames, pObj, i ) + Aig_ManForEachCo( p->pFrames, pObj, i ) pObj->fPhase = ( Aig_ObjFanin0(pObj)->fPhase ^ Aig_ObjFaninC0(pObj) ); pObj = Aig_ManPo( p->pFrames, 0 ); return pObj->fPhase; @@ -549,7 +549,7 @@ Abc_Cex_t * Saig_RefManRunSat( Saig_RefMan_t * p, int fNewOrder ) // create assumptions vVar2PiId = Vec_IntStartFull( pCnf->nVars ); vAssumps = Vec_IntAlloc( Aig_ManPiNum(p->pFrames) ); - Aig_ManForEachPi( p->pFrames, pObj, i ) + Aig_ManForEachCi( p->pFrames, pObj, i ) { // RetValue = Abc_InfoHasBit( p->pCex->pData, p->pCex->nRegs + p->pCex->nPis * iFrame + iInput ); // Vec_IntPush( vAssumps, toLitCond( pCnf->pVarNums[Aig_ObjId(pObj)], !RetValue ) ); @@ -733,7 +733,7 @@ Vec_Int_t * Saig_RefManRefineWithSat( Saig_RefMan_t * p, Vec_Int_t * vAigPis ) // create assumptions vVar2PiId = Vec_IntStartFull( pCnf->nVars ); vAssumps = Vec_IntAlloc( Aig_ManPiNum(p->pFrames) ); - Aig_ManForEachPi( p->pFrames, pObj, i ) + Aig_ManForEachCi( p->pFrames, pObj, i ) { int iInput = Vec_IntEntry( p->vMapPiF2A, 2*i ); int iFrame = Vec_IntEntry( p->vMapPiF2A, 2*i+1 ); diff --git a/src/aig/saig/saigRetMin.c b/src/aig/saig/saigRetMin.c index 3f06177c..d4caff3f 100644 --- a/src/aig/saig/saigRetMin.c +++ b/src/aig/saig/saigRetMin.c @@ -70,7 +70,7 @@ Vec_Int_t * Saig_ManRetimeInitState( Aig_Man_t * p ) { // accumulate SAT variables of the CIs vCiIds = Vec_IntAlloc( Aig_ManPiNum(p) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Vec_IntPush( vCiIds, pCnf->pVarNums[pObj->Id] ); // create the model pModel = Sat_SolverGetModel( pSat, vCiIds->pArray, vCiIds->nSize ); @@ -163,7 +163,7 @@ int Saig_ManRetimeUnsatCore( Aig_Man_t * p, int fVerbose ) // pick the first PO in the list nPos = 0; iBadPo = -1; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( pCnf->pVarNums[pObj->Id] >= 0 && pVars[ pCnf->pVarNums[pObj->Id] ] == 1 ) { if ( iBadPo == -1 ) @@ -296,16 +296,16 @@ Aig_Man_t * Saig_ManRetimeDupForward( Aig_Man_t * p, Vec_Ptr_t * vCut ) Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Saig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); // create the registers Vec_PtrForEachEntry( Aig_Obj_t *, vCut, pObj, i ) - pObj->pData = Aig_NotCond( Aig_ObjCreatePi(pNew), pObj->fPhase ); + pObj->pData = Aig_NotCond( Aig_ObjCreateCi(pNew), pObj->fPhase ); // duplicate logic above the cut - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Saig_ManRetimeDup_rec( pNew, Aig_ObjFanin0(pObj) ); // create the true POs Saig_ManForEachPo( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); // remember value in LI Saig_ManForEachLi( p, pObj, i ) pObj->pData = Aig_ObjChild0Copy(pObj); @@ -320,7 +320,7 @@ Aig_Man_t * Saig_ManRetimeDupForward( Aig_Man_t * p, Vec_Ptr_t * vCut ) Vec_PtrForEachEntry( Aig_Obj_t *, vCut, pObj, i ) { Saig_ManRetimeDup_rec( pNew, pObj ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)pObj->pData, pObj->fPhase) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)pObj->pData, pObj->fPhase) ); } Aig_ManCleanup( pNew ); return pNew; @@ -355,10 +355,10 @@ Aig_Man_t * Saig_ManRetimeDupBackward( Aig_Man_t * p, Vec_Ptr_t * vCut, Vec_Int_ Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Saig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); // create the registers Vec_PtrForEachEntry( Aig_Obj_t *, vCut, pObj, i ) - pObj->pData = Aig_NotCond( Aig_ObjCreatePi(pNew), vInit?Vec_IntEntry(vInit,i):0 ); + pObj->pData = Aig_NotCond( Aig_ObjCreateCi(pNew), vInit?Vec_IntEntry(vInit,i):0 ); // duplicate logic above the cut and remember values Saig_ManForEachLi( p, pObj, i ) { @@ -381,12 +381,12 @@ Aig_Man_t * Saig_ManRetimeDupBackward( Aig_Man_t * p, Vec_Ptr_t * vCut, Vec_Int_ Saig_ManForEachPo( p, pObj, i ) { Saig_ManRetimeDup_rec( pNew, Aig_ObjFanin0(pObj) ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Vec_PtrForEachEntry( Aig_Obj_t *, vCut, pObj, i ) { Saig_ManRetimeDup_rec( pNew, pObj ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)pObj->pData, vInit?Vec_IntEntry(vInit,i):0) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)pObj->pData, vInit?Vec_IntEntry(vInit,i):0) ); } Aig_ManCleanup( pNew ); return pNew; @@ -417,12 +417,12 @@ Aig_Man_t * Saig_ManRetimeDupInitState( Aig_Man_t * p, Vec_Ptr_t * vCut ) Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); // create the registers Vec_PtrForEachEntry( Aig_Obj_t *, vCut, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); // duplicate logic above the cut and create POs Saig_ManForEachLi( p, pObj, i ) { Saig_ManRetimeDup_rec( pNew, Aig_ObjFanin0(pObj) ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } return pNew; } diff --git a/src/aig/saig/saigRetStep.c b/src/aig/saig/saigRetStep.c index aa1ae8a4..543c7e24 100644 --- a/src/aig/saig/saigRetStep.c +++ b/src/aig/saig/saigRetStep.c @@ -89,11 +89,11 @@ Aig_Obj_t * Saig_ManRetimeNodeFwd( Aig_Man_t * p, Aig_Obj_t * pObj, int fMakeBug pObjNew = Aig_And( p, pInput0, pInput1 ); // create new register input - pObjLi = Aig_ObjCreatePo( p, Aig_NotCond(pObjNew, fCompl) ); + pObjLi = Aig_ObjCreateCo( p, Aig_NotCond(pObjNew, fCompl) ); pObjLi->PioNum = Aig_ManPoNum(p) - 1; // create new register output - pObjLo = Aig_ObjCreatePi( p ); + pObjLo = Aig_ObjCreateCi( p ); pObjLo->PioNum = Aig_ManPiNum(p) - 1; p->nRegs++; @@ -147,15 +147,15 @@ Aig_Obj_t * Saig_ManRetimeNodeBwd( Aig_Man_t * p, Aig_Obj_t * pObjLo ) fCompl1 = Aig_ObjFaninC1(pObj) ^ Aig_ObjFaninC0(pObjLi); // create latch inputs - pLi0New = Aig_ObjCreatePo( p, Aig_NotCond(pFanin0, fCompl0) ); + pLi0New = Aig_ObjCreateCo( p, Aig_NotCond(pFanin0, fCompl0) ); pLi0New->PioNum = Aig_ManPoNum(p) - 1; - pLi1New = Aig_ObjCreatePo( p, Aig_NotCond(pFanin1, fCompl1) ); + pLi1New = Aig_ObjCreateCo( p, Aig_NotCond(pFanin1, fCompl1) ); pLi1New->PioNum = Aig_ManPoNum(p) - 1; // create latch outputs - pLo0New = Aig_ObjCreatePi(p); + pLo0New = Aig_ObjCreateCi(p); pLo0New->PioNum = Aig_ManPiNum(p) - 1; - pLo1New = Aig_ObjCreatePi(p); + pLo1New = Aig_ObjCreateCi(p); pLo1New->PioNum = Aig_ManPiNum(p) - 1; pLo0New = Aig_NotCond( pLo0New, fCompl0 ); pLo1New = Aig_NotCond( pLo1New, fCompl1 ); diff --git a/src/aig/saig/saigSimExt.c b/src/aig/saig/saigSimExt.c index 1b48d58b..d4b87e92 100644 --- a/src/aig/saig/saigSimExt.c +++ b/src/aig/saig/saigSimExt.c @@ -122,7 +122,7 @@ int Saig_ManSimDataInit( Aig_Man_t * p, Abc_Cex_t * pCex, Vec_Ptr_t * vSimInfo, Saig_ManSimInfoSet( vSimInfo, Aig_ManPi(p, Entry), f, SAIG_UND ); Aig_ManForEachNode( p, pObj, i ) Saig_ManExtendOneEval( vSimInfo, pObj, f ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Saig_ManExtendOneEval( vSimInfo, pObj, f ); if ( f == pCex->iFrame ) break; diff --git a/src/aig/saig/saigSimExt2.c b/src/aig/saig/saigSimExt2.c index fbd06ac7..6a0f514e 100644 --- a/src/aig/saig/saigSimExt2.c +++ b/src/aig/saig/saigSimExt2.c @@ -147,7 +147,7 @@ int Saig_ManSimDataInit2( Aig_Man_t * p, Abc_Cex_t * pCex, Vec_Ptr_t * vSimInfo Saig_ManSimInfo2Set( vSimInfo, pObj, f, Abc_InfoHasBit(pCex->pData, iBit++)?SAIG_ONE_NEW:SAIG_ZER_NEW ); Aig_ManForEachNode( p, pObj, i ) Saig_ManExtendOneEval2( vSimInfo, pObj, f ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Saig_ManExtendOneEval2( vSimInfo, pObj, f ); if ( f == pCex->iFrame ) break; diff --git a/src/aig/saig/saigSimFast.c b/src/aig/saig/saigSimFast.c index e8e47a66..2c0f3974 100644 --- a/src/aig/saig/saigSimFast.c +++ b/src/aig/saig/saigSimFast.c @@ -154,7 +154,7 @@ Faig_Man_t * Faig_ManCreate( Aig_Man_t * pAig ) p->pObjs[iWord++] = (Aig_ObjFaninId0(pObj) << 1) | Aig_ObjFaninC0(pObj); p->pObjs[iWord++] = (Aig_ObjFaninId1(pObj) << 1) | Aig_ObjFaninC1(pObj); } - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) p->pObjs[iWord++] = (Aig_ObjFaninId0(pObj) << 1) | Aig_ObjFaninC0(pObj); assert( iWord == p->nWords ); return p; @@ -380,11 +380,11 @@ clk = clock(); int i, Counter = 0; pObj = Aig_ManConst1(p); pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], (nFramesReal - nPref)/2 ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], (nFramesReal - nPref)/2 ); Aig_ManForEachNode( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], (nFramesReal - nPref)/2 ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], (nFramesReal - nPref)/2 ); assert( Counter == pAig->nObjs ); } @@ -394,11 +394,11 @@ clk = clock(); int i, Counter = 0; pObj = Aig_ManConst1(p); pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], nFramesReal - nPref ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], nFramesReal - nPref ); Aig_ManForEachNode( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], nFramesReal - nPref ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeProbOne( pProbs[Counter++], nFramesReal - nPref ); assert( Counter == pAig->nObjs ); } @@ -408,11 +408,11 @@ clk = clock(); int i, Counter = 0; pObj = Aig_ManConst1(p); pSwitching[pObj->Id] = Faig_ManComputeSwitching( pProbs[Counter++], nFramesReal - nPref ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeSwitching( pProbs[Counter++], nFramesReal - nPref ); Aig_ManForEachNode( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeSwitching( pProbs[Counter++], nFramesReal - nPref ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pSwitching[pObj->Id] = Faig_ManComputeSwitching( pProbs[Counter++], nFramesReal - nPref ); assert( Counter == pAig->nObjs ); } diff --git a/src/aig/saig/saigSimMv.c b/src/aig/saig/saigSimMv.c index f22dfdc8..2a1cea40 100644 --- a/src/aig/saig/saigSimMv.c +++ b/src/aig/saig/saigSimMv.c @@ -828,7 +828,7 @@ Vec_Ptr_t * Saig_MvManDeriveMap( Saig_MvMan_t * p, int fVerbose ) int Counter1 = 0, Counter2 = 0; // prepare CI map vMap = Vec_PtrAlloc( Aig_ManPiNum(p->pAig) ); - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Vec_PtrPush( vMap, pObj ); // detect constant flops vConst0 = Saig_MvManFindConstBinaryFlops( p, &vBinValued ); diff --git a/src/aig/saig/saigSimSeq.c b/src/aig/saig/saigSimSeq.c index 538afef0..89dd2b5d 100644 --- a/src/aig/saig/saigSimSeq.c +++ b/src/aig/saig/saigSimSeq.c @@ -167,10 +167,10 @@ Raig_Man_t * Raig_ManCreate( Aig_Man_t * pAig ) p->nObjs = 2; pObj = Aig_ManConst1( pAig ); pObj->iData = 1; - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) if ( Aig_ObjRefs(pObj) == 0 ) Raig_ManCreate_rec( p, pObj ); - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) Raig_ManCreate_rec( p, pObj ); assert( Vec_IntSize(p->vCis2Ids) == Aig_ManPiNum(pAig) ); assert( p->nObjs == nObjs ); diff --git a/src/aig/saig/saigSwitch.c b/src/aig/saig/saigSwitch.c index 832d674b..37270b52 100644 --- a/src/aig/saig/saigSwitch.c +++ b/src/aig/saig/saigSwitch.c @@ -553,7 +553,7 @@ Aig_CMan_t * Aig_CManCreate( Aig_Man_t * p ) Aig_CManAddNode( pCMan, (Aig_ObjFaninId0(pObj) << 1) | Aig_ObjFaninC0(pObj), (Aig_ObjFaninId1(pObj) << 1) | Aig_ObjFaninC1(pObj) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_CManAddPo( pCMan, (Aig_ObjFaninId0(pObj) << 1) | Aig_ObjFaninC0(pObj) ); printf( "\nBytes alloc = %5d. Bytes used = %7d. Ave per node = %4.2f. \n", diff --git a/src/aig/saig/saigSynch.c b/src/aig/saig/saigSynch.c index 08a10b66..c592d0a5 100644 --- a/src/aig/saig/saigSynch.c +++ b/src/aig/saig/saigSynch.c @@ -474,15 +474,15 @@ Aig_Man_t * Saig_ManDupInitZero( Aig_Man_t * p ) pNew->pName = Abc_UtilStrsav( p->pName ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); Saig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Saig_ManForEachLo( p, pObj, i ) - pObj->pData = Aig_NotCond( Aig_ObjCreatePi( pNew ), pObj->fMarkA ); + pObj->pData = Aig_NotCond( Aig_ObjCreateCi( pNew ), pObj->fMarkA ); Aig_ManForEachNode( p, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); Saig_ManForEachPo( p, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Saig_ManForEachLi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_NotCond( Aig_ObjChild0Copy(pObj), pObj->fMarkA ) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_NotCond( Aig_ObjChild0Copy(pObj), pObj->fMarkA ) ); Aig_ManSetRegNum( pNew, Saig_ManRegNum(p) ); assert( Aig_ManNodeNum(pNew) == Aig_ManNodeNum(p) ); return pNew; diff --git a/src/aig/saig/saigTempor.c b/src/aig/saig/saigTempor.c index 1a6f1919..3b11c55c 100644 --- a/src/aig/saig/saigTempor.c +++ b/src/aig/saig/saigTempor.c @@ -59,17 +59,17 @@ Aig_Man_t * Saig_ManTemporFrames( Aig_Man_t * pAig, int nFrames ) { Aig_ManConst1(pAig)->pData = Aig_ManConst1(pFrames); Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pFrames); + pObj->pData = Aig_ObjCreateCi(pFrames); Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) pObj->pData = Aig_ObjChild0Copy(pObj); Saig_ManForEachLiLo( pAig, pObjLi, pObjLo, i ) pObjLo->pData = pObjLi->pData; } // create POs for the flop inputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pFrames, (Aig_Obj_t *)pObj->pData ); + Aig_ObjCreateCo( pFrames, (Aig_Obj_t *)pObj->pData ); Aig_ManCleanup( pFrames ); return pFrames; } @@ -107,23 +107,23 @@ Aig_Man_t * Saig_ManTemporDecompose( Aig_Man_t * pAig, int nFrames ) // map the constant node and primary inputs Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew ); Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + pObj->pData = Aig_ObjCreateCi( pAigNew ); // insert initialization logic Aig_ManConst1(pFrames)->pData = Aig_ManConst1( pAigNew ); - Aig_ManForEachPi( pFrames, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pAigNew ); + Aig_ManForEachCi( pFrames, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pAigNew ); Aig_ManForEachNode( pFrames, pObj, i ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); - Aig_ManForEachPo( pFrames, pObj, i ) + Aig_ManForEachCo( pFrames, pObj, i ) pObj->pData = Aig_ObjChild0Copy(pObj); // create reset latch (the first one among the latches) - pReset = Aig_ObjCreatePi( pAigNew ); + pReset = Aig_ObjCreateCi( pAigNew ); // create flop output values Saig_ManForEachLo( pAig, pObj, i ) - pObj->pData = Aig_Mux( pAigNew, pReset, Aig_ObjCreatePi(pAigNew), (Aig_Obj_t *)Aig_ManPo(pFrames, i)->pData ); + pObj->pData = Aig_Mux( pAigNew, pReset, Aig_ObjCreateCi(pAigNew), (Aig_Obj_t *)Aig_ManPo(pFrames, i)->pData ); Aig_ManStop( pFrames ); // add internal nodes of this frame @@ -131,13 +131,13 @@ Aig_Man_t * Saig_ManTemporDecompose( Aig_Man_t * pAig, int nFrames ) pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create primary outputs Saig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // create reset latch (the first one among the latches) - Aig_ObjCreatePo( pAigNew, Aig_ManConst1(pAigNew) ); + Aig_ObjCreateCo( pAigNew, Aig_ManConst1(pAigNew) ); // create latch inputs Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pAigNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) ); // finalize Aig_ManCleanup( pAigNew ); diff --git a/src/aig/saig/saigTrans.c b/src/aig/saig/saigTrans.c index 11e775e5..552ec8f3 100644 --- a/src/aig/saig/saigTrans.c +++ b/src/aig/saig/saigTrans.c @@ -206,19 +206,19 @@ Aig_Man_t * Saig_ManFramesNonInitial( Aig_Man_t * pAig, int nFrames ) Aig_ManConst1(pAig)->pData = Aig_ManConst1( pFrames ); // create variables for register outputs Saig_ManForEachLo( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add timeframes for ( f = 0; f < nFrames; f++ ) { // create PI nodes for this frame Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // create POs for this frame Saig_ManForEachPo( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); // save register inputs Saig_ManForEachLi( pAig, pObj, i ) pObj->pData = Aig_ObjChild0Copy(pObj); @@ -237,7 +237,7 @@ Aig_Man_t * Saig_ManFramesNonInitial( Aig_Man_t * pAig, int nFrames ) } // remember register outputs Saig_ManForEachLiLo( pAig, pObjLi, pObjLo, i ) - Aig_ObjCreatePo( pFrames, (Aig_Obj_t *)pObjLi->pData ); + Aig_ObjCreateCo( pFrames, (Aig_Obj_t *)pObjLi->pData ); Aig_ManCleanup( pFrames ); return pFrames; } @@ -278,11 +278,11 @@ Aig_Man_t * Saig_ManFramesInitialMapped( Aig_Man_t * pAig, int nFrames, int nFra // create PIs first for ( f = 0; f < nFramesMax; f++ ) Saig_ManForEachPi( pAig, pObj, i ) - Aig_ObjCreatePi( pFrames ); + Aig_ObjCreateCi( pFrames ); // create registers second Saig_ManForEachLo( pAig, pObj, i ) { - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); Saig_ManSetMap1( pAig, pObj, 0, Aig_Regular((Aig_Obj_t *)pObj->pData) ); } } @@ -297,7 +297,7 @@ Aig_Man_t * Saig_ManFramesInitialMapped( Aig_Man_t * pAig, int nFrames, int nFra Saig_ManForEachPi( pAig, pObj, i ) { if ( fInit ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); else pObj->pData = Aig_ManPi( pFrames, f * Saig_ManPiNum(pAig) + i ); Saig_ManSetMap1( pAig, pObj, f, Aig_Regular((Aig_Obj_t *)pObj->pData) ); @@ -331,7 +331,7 @@ Aig_Man_t * Saig_ManFramesInitialMapped( Aig_Man_t * pAig, int nFrames, int nFra // create POs for this frame Saig_ManForEachPo( pAig, pObj, i ) { - pObj->pData = Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); Saig_ManSetMap1( pAig, pObj, f, Aig_Regular((Aig_Obj_t *)pObj->pData) ); } // save register inputs @@ -355,7 +355,7 @@ Aig_Man_t * Saig_ManFramesInitialMapped( Aig_Man_t * pAig, int nFrames, int nFra { // create registers Saig_ManForEachLiLo( pAig, pObjLi, pObjLo, i ) - Aig_ObjCreatePo( pFrames, (Aig_Obj_t *)pObjLi->pData ); + Aig_ObjCreateCo( pFrames, (Aig_Obj_t *)pObjLi->pData ); // set register number Aig_ManSetRegNum( pFrames, pAig->nRegs ); } diff --git a/src/aig/saig/saigWnd.c b/src/aig/saig/saigWnd.c index 6753370f..fc1f9191 100644 --- a/src/aig/saig/saigWnd.c +++ b/src/aig/saig/saigWnd.c @@ -240,13 +240,13 @@ Aig_Man_t * Saig_ManWindowExtractNodes( Aig_Man_t * p, Vec_Ptr_t * vNodes ) // create real PIs vNodesPi = Saig_ManWindowCollectPis( p, vNodes ); Vec_PtrForEachEntry( Aig_Obj_t *, vNodesPi, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrFree( vNodesPi ); // create register outputs Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i ) { if ( Saig_ObjIsLo(p, pObj) ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); } // create internal nodes Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i ) @@ -257,7 +257,7 @@ Aig_Man_t * Saig_ManWindowExtractNodes( Aig_Man_t * p, Vec_Ptr_t * vNodes ) // create POs vNodesPo = Saig_ManWindowCollectPos( p, vNodes, NULL ); Vec_PtrForEachEntry( Aig_Obj_t *, vNodesPo, pObj, i ) - Aig_ObjCreatePo( pNew, (Aig_Obj_t *)pObj->pData ); + Aig_ObjCreateCo( pNew, (Aig_Obj_t *)pObj->pData ); Vec_PtrFree( vNodesPo ); // create register inputs nRegCount = 0; @@ -266,7 +266,7 @@ Aig_Man_t * Saig_ManWindowExtractNodes( Aig_Man_t * p, Vec_Ptr_t * vNodes ) if ( Saig_ObjIsLo(p, pObj) ) { pMatch = Saig_ObjLoToLi( p, pObj ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pMatch) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pMatch) ); nRegCount++; } } @@ -384,25 +384,25 @@ Aig_Man_t * Saig_ManWindowInsertNodes( Aig_Man_t * p, Vec_Ptr_t * vNodes, Aig_Ma pObj->pData = Aig_ManConst1( pNew ); // create real PIs - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) if ( Saig_ObjIsPi(p, pObj) || !Aig_ObjIsTravIdCurrent(p, pObj) ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); // create additional latch outputs Saig_ManForEachLo( pWnd, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); // create internal nodes starting from the big - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) if ( Saig_ObjIsPo(p, pObj) || !Aig_ObjIsTravIdCurrent(p, pObj) ) { Saig_ManWindowInsertBig_rec( pNew, Aig_ObjFanin0(pObj), vBigNode2SmallPo, vSmallPi2BigNode ); - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } // create internal nodes starting from the small Saig_ManForEachLi( pWnd, pObj, i ) { Saig_ManWindowInsertSmall_rec( pNew, Aig_ObjFanin0(pObj), vBigNode2SmallPo, vSmallPi2BigNode ); - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } Vec_PtrFree( vBigNode2SmallPo ); Vec_PtrFree( vSmallPi2BigNode ); @@ -600,7 +600,7 @@ void Saig_ManWindowCreatePis( Aig_Man_t * pNew, Aig_Man_t * p0, Aig_Man_t * p1, pFanin = Aig_ObjFanin0(pMatch); if ( !Aig_ObjIsTravIdCurrent(p0, pFanin) && pFanin->pData == NULL ) { - pFanin->pData = Aig_ObjCreatePi(pNew); + pFanin->pData = Aig_ObjCreateCi(pNew); pMatch = Aig_ObjRepr( p0, pFanin ); assert( pFanin == Aig_ObjRepr( p1, pMatch ) ); assert( pMatch != NULL ); @@ -614,7 +614,7 @@ void Saig_ManWindowCreatePis( Aig_Man_t * pNew, Aig_Man_t * p0, Aig_Man_t * p1, pFanin = Aig_ObjFanin0(pObj); if ( !Aig_ObjIsTravIdCurrent(p0, pFanin) && pFanin->pData == NULL ) { - pFanin->pData = Aig_ObjCreatePi(pNew); + pFanin->pData = Aig_ObjCreateCi(pNew); pMatch = Aig_ObjRepr( p0, pFanin ); assert( pFanin == Aig_ObjRepr( p1, pMatch ) ); assert( pMatch != NULL ); @@ -624,7 +624,7 @@ void Saig_ManWindowCreatePis( Aig_Man_t * pNew, Aig_Man_t * p0, Aig_Man_t * p1, pFanin = Aig_ObjFanin1(pObj); if ( !Aig_ObjIsTravIdCurrent(p0, pFanin) && pFanin->pData == NULL ) { - pFanin->pData = Aig_ObjCreatePi(pNew); + pFanin->pData = Aig_ObjCreateCi(pNew); pMatch = Aig_ObjRepr( p0, pFanin ); assert( pFanin == Aig_ObjRepr( p1, pMatch ) ); assert( pMatch != NULL ); @@ -671,7 +671,7 @@ void Saig_ManWindowCreatePos( Aig_Man_t * pNew, Aig_Man_t * p0, Aig_Man_t * p1 ) if ( Aig_ObjIsTravIdCurrent(p0, pFanin0) ) { pMiter = Aig_Exor( pNew, (Aig_Obj_t *)pFanin0->pData, (Aig_Obj_t *)pFanin1->pData ); - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); } } else @@ -685,7 +685,7 @@ void Saig_ManWindowCreatePos( Aig_Man_t * pNew, Aig_Man_t * p0, Aig_Man_t * p1 ) if ( Aig_ObjIsTravIdCurrent(p0, pFanin0) ) { pMiter = Aig_Exor( pNew, (Aig_Obj_t *)pFanin0->pData, (Aig_Obj_t *)pFanin1->pData ); - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); } pFanin0 = Aig_ObjFanin1(pObj0); @@ -695,7 +695,7 @@ void Saig_ManWindowCreatePos( Aig_Man_t * pNew, Aig_Man_t * p0, Aig_Man_t * p1 ) if ( Aig_ObjIsTravIdCurrent(p0, pFanin0) ) { pMiter = Aig_Exor( pNew, (Aig_Obj_t *)pFanin0->pData, (Aig_Obj_t *)pFanin1->pData ); - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); } } } @@ -759,12 +759,12 @@ Aig_Man_t * Saig_ManWindowExtractMiter( Aig_Man_t * p0, Aig_Man_t * p1 ) Vec_PtrForEachEntry( Aig_Obj_t *, vNodes0, pObj0, i ) { if ( Saig_ObjIsLo(p0, pObj0) ) - pObj0->pData = Aig_ObjCreatePi(pNew); + pObj0->pData = Aig_ObjCreateCi(pNew); } Vec_PtrForEachEntry( Aig_Obj_t *, vNodes1, pObj1, i ) { if ( Saig_ObjIsLo(p1, pObj1) ) - pObj1->pData = Aig_ObjCreatePi(pNew); + pObj1->pData = Aig_ObjCreateCi(pNew); } // create internal nodes Vec_PtrForEachEntry( Aig_Obj_t *, vNodes0, pObj0, i ) @@ -787,7 +787,7 @@ Aig_Man_t * Saig_ManWindowExtractMiter( Aig_Man_t * p0, Aig_Man_t * p1 ) if ( Saig_ObjIsLo(p0, pObj0) ) { pMatch0 = Saig_ObjLoToLi( p0, pObj0 ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pMatch0) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pMatch0) ); nRegCount++; } } @@ -796,7 +796,7 @@ Aig_Man_t * Saig_ManWindowExtractMiter( Aig_Man_t * p0, Aig_Man_t * p1 ) if ( Saig_ObjIsLo(p1, pObj1) ) { pMatch1 = Saig_ObjLoToLi( p1, pObj1 ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pMatch1) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pMatch1) ); nRegCount++; } } diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c index ac09a945..6d705ca9 100644 --- a/src/base/abci/abcDar.c +++ b/src/base/abci/abcDar.c @@ -162,7 +162,7 @@ Aig_Man_t * Abc_NtkToDarBmc( Abc_Ntk_t * pNtk, Vec_Int_t ** pvMap ) // transfer the pointers to the basic nodes Abc_AigConst1(pNtk)->pCopy = (Abc_Obj_t *)Aig_ManConst1(pMan); Abc_NtkForEachCi( pNtk, pObj, i ) - pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreatePi(pMan); + pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreateCi(pMan); // create flops Abc_NtkForEachLatch( pNtk, pObj, i ) Abc_ObjFanout0(pObj)->pCopy = Abc_ObjNotCond( Abc_ObjFanout0(pObj)->pCopy, Abc_LatchIsInit1(pObj) ); @@ -171,11 +171,11 @@ Aig_Man_t * Abc_NtkToDarBmc( Abc_Ntk_t * pNtk, Vec_Int_t ** pvMap ) pObj->pCopy = (Abc_Obj_t *)Aig_And( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj), (Aig_Obj_t *)Abc_ObjChild1Copy(pObj) ); // create the POs Vec_PtrForEachEntry( Abc_Obj_t *, vDrivers, pTemp, k ) - Aig_ObjCreatePo( pMan, (Aig_Obj_t *)Abc_ObjNotCond(Abc_ObjRegular(pTemp)->pCopy, !Abc_ObjIsComplement(pTemp)) ); + Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjNotCond(Abc_ObjRegular(pTemp)->pCopy, !Abc_ObjIsComplement(pTemp)) ); Vec_PtrFree( vDrivers ); // create flops Abc_NtkForEachLatchInput( pNtk, pObj, i ) - Aig_ObjCreatePo( pMan, (Aig_Obj_t *)Abc_ObjNotCond(Abc_ObjChild0Copy(pObj), Abc_LatchIsInit1(Abc_ObjFanout0(pObj))) ); + Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjNotCond(Abc_ObjChild0Copy(pObj), Abc_LatchIsInit1(Abc_ObjFanout0(pObj))) ); // remove dangling nodes Aig_ManSetRegNum( pMan, Abc_NtkLatchNum(pNtk) ); @@ -254,7 +254,7 @@ Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters ) // transfer the pointers to the basic nodes Abc_AigConst1(pNtk)->pCopy = (Abc_Obj_t *)Aig_ManConst1(pMan); Abc_NtkForEachCi( pNtk, pObj, i ) - pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreatePi(pMan); + pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreateCi(pMan); // complement the 1-values registers if ( fRegisters ) { Abc_NtkForEachLatch( pNtk, pObj, i ) @@ -271,7 +271,7 @@ Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters ) pMan->fAddStrash = 0; // create the POs Abc_NtkForEachCo( pNtk, pObj, i ) - Aig_ObjCreatePo( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj) ); // complement the 1-valued registers Aig_ManSetRegNum( pMan, Abc_NtkLatchNum(pNtk) ); if ( fRegisters ) @@ -332,7 +332,7 @@ Aig_Man_t * Abc_NtkToDarChoices( Abc_Ntk_t * pNtk ) // transfer the pointers to the basic nodes Abc_AigConst1(pNtk)->pCopy = (Abc_Obj_t *)Aig_ManConst1(pMan); Abc_NtkForEachCi( pNtk, pObj, i ) - pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreatePi(pMan); + pObj->pCopy = (Abc_Obj_t *)Aig_ObjCreateCi(pMan); // perform the conversion of the internal nodes (assumes DFS ordering) Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i ) { @@ -348,7 +348,7 @@ Aig_Man_t * Abc_NtkToDarChoices( Abc_Ntk_t * pNtk ) Vec_PtrFree( vNodes ); // create the POs Abc_NtkForEachCo( pNtk, pObj, i ) - Aig_ObjCreatePo( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pMan, (Aig_Obj_t *)Abc_ObjChild0Copy(pObj) ); // complement the 1-valued registers Aig_ManSetRegNum( pMan, 0 ); if ( !Aig_ManCheck( pMan ) ) @@ -384,7 +384,7 @@ Abc_Ntk_t * Abc_NtkFromDar( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) pNtkNew->nConstrs = pMan->nConstrs; // transfer the pointers to the basic nodes Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) pObj->pData = Abc_NtkCi(pNtkNew, i); // rebuild the AIG vNodes = Aig_ManDfs( pMan, 1 ); @@ -395,7 +395,7 @@ Abc_Ntk_t * Abc_NtkFromDar( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) ); Vec_PtrFree( vNodes ); // connect the PO nodes - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) { if ( pMan->nAsserts && i == Aig_ManPoNum(pMan) - pMan->nAsserts ) break; @@ -466,7 +466,7 @@ Abc_Ntk_t * Abc_NtkFromDarSeqSweep( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) ); Vec_PtrFree( vNodes ); // connect the PO nodes - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) { // if ( pMan->nAsserts && i == Aig_ManPoNum(pMan) - pMan->nAsserts ) // break; @@ -591,7 +591,7 @@ Abc_Ntk_t * Abc_NtkFromAigPhase( Aig_Man_t * pMan ) pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) ); Vec_PtrFree( vNodes ); // connect the PO nodes - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) { pObjNew = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj); Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), pObjNew ); @@ -678,7 +678,7 @@ Abc_Ntk_t * Abc_NtkAfterTrim( Aig_Man_t * pMan, Abc_Ntk_t * pNtkOld ) pObj->pData = Abc_AigAnd( (Abc_Aig_t *)pNtkNew->pManFunc, (Abc_Obj_t *)Aig_ObjChild0Copy(pObj), (Abc_Obj_t *)Aig_ObjChild1Copy(pObj) ); Vec_PtrFree( vNodes ); // connect the PO nodes - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) { pObjNew = (Abc_Obj_t *)Aig_ObjChild0Copy(pObj); Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), pObjNew ); @@ -713,7 +713,7 @@ Abc_Ntk_t * Abc_NtkFromDarChoices( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) pNtkNew->nConstrs = pMan->nConstrs; // transfer the pointers to the basic nodes Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) pObj->pData = Abc_NtkCi(pNtkNew, i); // rebuild the AIG @@ -734,7 +734,7 @@ Abc_Ntk_t * Abc_NtkFromDarChoices( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) //Abc_Print( 1, "Total = %d. Collected = %d.\n", Aig_ManNodeNum(pMan), Vec_PtrSize(vNodes) ); Vec_PtrFree( vNodes ); // connect the PO nodes - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), (Abc_Obj_t *)Aig_ObjChild0Copy(pObj) ); if ( !Abc_NtkCheck( pNtkNew ) ) Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed.\n" ); @@ -765,7 +765,7 @@ Abc_Ntk_t * Abc_NtkFromDarSeq( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) pNtkNew->nConstrs = pMan->nConstrs; // transfer the pointers to the basic nodes Aig_ManConst1(pMan)->pData = Abc_AigConst1(pNtkNew); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) pObj->pData = Abc_NtkPi(pNtkNew, i); // create latches of the new network Aig_ManForEachObj( pMan, pObj, i ) @@ -797,7 +797,7 @@ Abc_Ntk_t * Abc_NtkFromDarSeq( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan ) } Vec_PtrFree( vNodes ); // connect the PO nodes - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) { pFaninNew = (Abc_Obj_t *)Aig_ObjChild0Copy( pObj ); Abc_ObjAddFanin( Abc_NtkPo(pNtkNew, i), pFaninNew ); diff --git a/src/base/abci/abcDress2.c b/src/base/abci/abcDress2.c index fbaf833a..4fb89759 100644 --- a/src/base/abci/abcDress2.c +++ b/src/base/abci/abcDress2.c @@ -89,21 +89,21 @@ Aig_Man_t * Aig_ManCreateDualOutputMiter( Aig_Man_t * p1, Aig_Man_t * p2 ) pNew = Aig_ManStart( Aig_ManObjNumMax(p1) + Aig_ManObjNumMax(p2) ); // add first AIG Aig_ManConst1(p1)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p1, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p1, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); Aig_ManForEachNode( p1, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // add second AIG Aig_ManConst1(p2)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p2, pObj, i ) + Aig_ManForEachCi( p2, pObj, i ) pObj->pData = Aig_ManPi( pNew, i ); Aig_ManForEachNode( p2, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // add the outputs for ( i = 0; i < Aig_ManPoNum(p1); i++ ) { - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(Aig_ManPo(p1, i)) ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(Aig_ManPo(p2, i)) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(Aig_ManPo(p1, i)) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(Aig_ManPo(p2, i)) ); } Aig_ManCleanup( pNew ); return pNew; diff --git a/src/base/io/ioWriteAiger.c b/src/base/io/ioWriteAiger.c index 303f9617..d5b17a72 100644 --- a/src/base/io/ioWriteAiger.c +++ b/src/base/io/ioWriteAiger.c @@ -848,7 +848,7 @@ void Io_WriteAigerCex( Abc_Cex_t * pCex, Abc_Ntk_t * pNtk, void * pG, char * pFi Aig_ManForEachNode( pAig, pObj, k ) pObj->fMarkA = (Aig_ObjFanin0(pObj)->fMarkA ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkA ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pAig, pObj, k ) + Aig_ManForEachCo( pAig, pObj, k ) pObj->fMarkA = (Aig_ObjFanin0(pObj)->fMarkA ^ Aig_ObjFaninC0(pObj)); Saig_ManForEachPo( pAig, pObj, k ) fprintf( pFile, "%d", pObj->fMarkA ); diff --git a/src/map/amap/amapGraph.c b/src/map/amap/amapGraph.c index c346ca98..36a3c851 100644 --- a/src/map/amap/amapGraph.c +++ b/src/map/amap/amapGraph.c @@ -341,7 +341,7 @@ void Amap_ManCreate( Amap_Man_t * p, Aig_Man_t * pAig ) // create PIs and remember them in the old nodes Aig_ManCleanData(pAig); Aig_ManConst1(pAig)->pData = Amap_ManConst1( p ); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) pObj->pData = Amap_ManCreatePi( p ); // load the AIG into the mapper Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i ) @@ -383,7 +383,7 @@ void Amap_ManCreate( Amap_Man_t * p, Aig_Man_t * pAig ) } Vec_PtrFree( vNodes ); // set the primary outputs without copying the phase - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) pObj->pData = Amap_ManCreatePo( p, (Amap_Obj_t *)Aig_ObjChild0Copy(pObj) ); if ( p->pPars->fVerbose ) printf( "Performing mapping with %d given and %d created choices.\n", diff --git a/src/opt/cgt/cgtAig.c b/src/opt/cgt/cgtAig.c index b2cfd36f..96f6a289 100644 --- a/src/opt/cgt/cgtAig.c +++ b/src/opt/cgt/cgtAig.c @@ -223,13 +223,13 @@ Aig_Obj_t * Cgt_ManConstructCareCondition( Cgt_Man_t * p, Aig_Man_t * pNew, Aig_ assert( Aig_ObjIsNode(pObj) ); if ( Saig_ObjIsPi(p->pAig, Aig_ObjFanin0(pObj)) && Vec_PtrEntry(vCopy0, Aig_ObjFaninId0(pObj)) == NULL ) { - pTemp = Aig_ObjCreatePi( pNew ); + pTemp = Aig_ObjCreateCi( pNew ); Vec_PtrWriteEntry( vCopy0, Aig_ObjFaninId0(pObj), pTemp ); Vec_PtrWriteEntry( vCopy1, Aig_ObjFaninId0(pObj), pTemp ); } if ( Saig_ObjIsPi(p->pAig, Aig_ObjFanin1(pObj)) && Vec_PtrEntry(vCopy0, Aig_ObjFaninId1(pObj)) == NULL ) { - pTemp = Aig_ObjCreatePi( pNew ); + pTemp = Aig_ObjCreateCi( pNew ); Vec_PtrWriteEntry( vCopy0, Aig_ObjFaninId1(pObj), pTemp ); Vec_PtrWriteEntry( vCopy1, Aig_ObjFaninId1(pObj), pTemp ); } @@ -274,12 +274,12 @@ Aig_Man_t * Cgt_ManDeriveAigForGating( Cgt_Man_t * p ) pNew->pName = Abc_UtilStrsav( "CG_miter" ); // build the first frame Aig_ManConst1(p->pAig)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p->pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p->pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); Aig_ManForEachNode( p->pAig, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // Saig_ManForEachPo( p->pAig, pObj, i ) -// pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); +// pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); if ( p->pPars->nOdcMax > 0 ) { // create storage for observability conditions @@ -305,7 +305,7 @@ Aig_Man_t * Cgt_ManDeriveAigForGating( Cgt_Man_t * p ) // compute the miter pMiter = Aig_Exor( pNew, (Aig_Obj_t *)pObjLo->pData, Aig_ObjChild0Copy(pObjLi) ); pMiter = Aig_And( pNew, pMiter, pCare ); - pObjLi->pData = Aig_ObjCreatePo( pNew, pMiter ); + pObjLi->pData = Aig_ObjCreateCo( pNew, pMiter ); } Vec_PtrFree( vCopy0 ); Vec_PtrFree( vCopy1 ); @@ -316,7 +316,7 @@ Aig_Man_t * Cgt_ManDeriveAigForGating( Cgt_Man_t * p ) Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i ) { pMiter = Aig_Exor( pNew, (Aig_Obj_t *)pObjLo->pData, Aig_ObjChild0Copy(pObjLi) ); - pObjLi->pData = Aig_ObjCreatePo( pNew, pMiter ); + pObjLi->pData = Aig_ObjCreateCo( pNew, pMiter ); } } Aig_ManCleanup( pNew ); @@ -395,7 +395,7 @@ void Cgt_ManConstructCare( Aig_Man_t * pNew, Aig_Man_t * pCare, Vec_Vec_t * vSup if ( pObjAig == NULL ) continue; pObjAig = Aig_NotCond( pObjAig, Aig_ObjFaninC0(pPo) ); - Aig_ObjCreatePo( pNew, pObjAig ); + Aig_ObjCreateCo( pNew, pObjAig ); } } } @@ -418,7 +418,7 @@ Aig_Obj_t * Cgt_ManDupPartition_rec( Aig_Man_t * pNew, Aig_Man_t * pAig, Aig_Obj Aig_ObjSetTravIdCurrent(pAig, pObj); if ( Aig_ObjIsPi(pObj) ) { - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); Vec_PtrPush( vLeaves, pObj ); return (Aig_Obj_t *)pObj->pData; } @@ -473,7 +473,7 @@ Aig_Man_t * Cgt_ManDupPartition( Aig_Man_t * pFrame, int nVarsMin, int nFlopsMin Cgt_ManConstructCare( pNew, pCare, vSuppsInv, vLeaves ); // create POs Vec_PtrForEachEntry( Aig_Obj_t *, vPos, pObj, i ) - pObj->pData = (Aig_Obj_t *)Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vRoots, i) ); + pObj->pData = (Aig_Obj_t *)Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Vec_PtrEntry(vRoots, i) ); if ( pnOutputs != NULL ) *pnOutputs = Vec_PtrSize( vPos ); Vec_PtrFree( vRoots ); @@ -542,8 +542,8 @@ Aig_Man_t * Cgt_ManDeriveGatedAig( Aig_Man_t * pAig, Vec_Vec_t * vGates, int fRe pNew->pName = Abc_UtilStrsav( pAig->pName ); pNew->pSpec = Abc_UtilStrsav( pAig->pSpec ); Aig_ManConst1(pAig)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); if ( fReduce ) { Aig_ManForEachNode( pAig, pObj, i ) @@ -570,7 +570,7 @@ Aig_Man_t * Cgt_ManDeriveGatedAig( Aig_Man_t * pAig, Vec_Vec_t * vGates, int fRe if ( pnUsedNodes != NULL ) *pnUsedNodes = Aig_ManNodeNum(pNew); Saig_ManForEachPo( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Saig_ManForEachLiLo( pAig, pObjLi, pObjLo, i ) { vOne = Vec_VecEntry( vGates, i ); @@ -582,7 +582,7 @@ Aig_Man_t * Cgt_ManDeriveGatedAig( Aig_Man_t * pAig, Vec_Vec_t * vGates, int fRe pGateNew = Cgt_ManBuildClockGate( pNew, vOne ); pObjNew = Aig_Mux( pNew, pGateNew, (Aig_Obj_t *)pObjLo->pData, Aig_ObjChild0Copy(pObjLi) ); } - pObjLi->pData = Aig_ObjCreatePo( pNew, pObjNew ); + pObjLi->pData = Aig_ObjCreateCo( pNew, pObjNew ); } Aig_ManCleanup( pNew ); Aig_ManSetRegNum( pNew, Aig_ManRegNum(pAig) ); diff --git a/src/opt/csw/cswCore.c b/src/opt/csw/cswCore.c index e1bdca00..9159417f 100644 --- a/src/opt/csw/cswCore.c +++ b/src/opt/csw/cswCore.c @@ -52,7 +52,7 @@ clk = clock(); // start the manager p = Csw_ManStart( pAig, nCutsMax, nLeafMax, fVerbose ); // set elementary cuts at the PIs - Aig_ManForEachPi( p->pManRes, pObj, i ) + Aig_ManForEachCi( p->pManRes, pObj, i ) { Csw_ObjPrepareCuts( p, pObj, 1 ); Csw_ObjAddRefs( p, pObj, Aig_ManPi(p->pManAig,i)->nRefs ); @@ -77,8 +77,8 @@ clk = clock(); Csw_ObjAddRefs( p, Aig_Regular(pObjRes), pObj->nRefs ); } // add the POs - Aig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( p->pManRes, Csw_ObjChild0Equiv(p, pObj) ); + Aig_ManForEachCo( pAig, pObj, i ) + Aig_ObjCreateCo( p->pManRes, Csw_ObjChild0Equiv(p, pObj) ); // remove dangling nodes Aig_ManCleanup( p->pManRes ); // return the resulting manager diff --git a/src/opt/csw/cswMan.c b/src/opt/csw/cswMan.c index 5df69492..0f0d79f9 100644 --- a/src/opt/csw/cswMan.c +++ b/src/opt/csw/cswMan.c @@ -75,7 +75,7 @@ Csw_Man_t * Csw_ManStart( Aig_Man_t * pMan, int nCutsMax, int nLeafMax, int fVer memset( p->pTable, 0, sizeof(Aig_Obj_t *) * p->nTableSize ); // set the pointers to the available fraig nodes Csw_ObjSetEquiv( p, Aig_ManConst1(p->pManAig), Aig_ManConst1(p->pManRes) ); - Aig_ManForEachPi( p->pManAig, pObj, i ) + Aig_ManForEachCi( p->pManAig, pObj, i ) Csw_ObjSetEquiv( p, pObj, Aig_ManPi(p->pManRes, i) ); // room for temporary truth tables p->puTemp[0] = ABC_ALLOC( unsigned, 4 * p->nTruthWords ); diff --git a/src/opt/dar/darBalance.c b/src/opt/dar/darBalance.c index 56ec51fa..a0a17311 100644 --- a/src/opt/dar/darBalance.c +++ b/src/opt/dar/darBalance.c @@ -503,7 +503,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel ) if ( Aig_ObjIsPi(pObj) ) { // copy the PI - pObjNew = Aig_ObjCreatePi(pNew); + pObjNew = Aig_ObjCreateCi(pNew); pObj->pData = pObjNew; pObjNew->pHaig = pObj->pHaig; // set the arrival time of the new PI @@ -520,7 +520,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel ) arrTime = (float)Aig_Regular(pObjNew)->Level; Tim_ManSetCoArrival( (Tim_Man_t *)p->pManTime, Aig_ObjPioNum(pObj), arrTime ); // create PO - pObjNew = Aig_ObjCreatePo( pNew, pObjNew ); + pObjNew = Aig_ObjCreateCo( pNew, pObjNew ); pObjNew->pHaig = pObj->pHaig; } else @@ -531,19 +531,19 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel ) } else { - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { - pObjNew = Aig_ObjCreatePi(pNew); + pObjNew = Aig_ObjCreateCi(pNew); pObjNew->Level = pObj->Level; pObj->pData = pObjNew; pObjNew->pHaig = pObj->pHaig; } - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { pDriver = Aig_ObjReal_rec( Aig_ObjChild0(pObj) ); pObjNew = Dar_Balance_rec( pNew, Aig_Regular(pDriver), vStore, 0, fUpdateLevel ); pObjNew = Aig_NotCond( pObjNew, Aig_IsComplement(pDriver) ); - pObjNew = Aig_ObjCreatePo( pNew, pObjNew ); + pObjNew = Aig_ObjCreateCo( pNew, pObjNew ); pObjNew->pHaig = pObj->pHaig; } } diff --git a/src/opt/dar/darCore.c b/src/opt/dar/darCore.c index adc41035..54e9cf84 100644 --- a/src/opt/dar/darCore.c +++ b/src/opt/dar/darCore.c @@ -302,7 +302,7 @@ Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fVerbose // Dar_ManCutsStart( p ); Aig_MmFixedRestart( p->pMemCuts ); Dar_ObjPrepareCuts( p, Aig_ManConst1(p->pAig) ); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) Dar_ObjPrepareCuts( p, pObj ); // compute cuts for each nodes in the topological order Aig_ManForEachNode( pAig, pObj, i ) diff --git a/src/opt/mfs/mfsStrash.c b/src/opt/mfs/mfsStrash.c index 922af3a8..b70b3e9b 100644 --- a/src/opt/mfs/mfsStrash.c +++ b/src/opt/mfs/mfsStrash.c @@ -75,7 +75,7 @@ Hop_Obj_t * Abc_MfsConvertAigToHop( Aig_Man_t * pMan, Hop_Man_t * pHop ) return Hop_NotCond( Hop_ManConst1(pHop), Aig_ObjFaninC0(pRoot) ); // set the PI mapping Aig_ManCleanData( pMan ); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) pObj->pData = Hop_IthVar( pHop, i ); // construct the AIG Abc_MfsConvertAigToHop_rec( Aig_ObjFanin0(pRoot), pHop ); @@ -170,7 +170,7 @@ Aig_Obj_t * Abc_NtkConstructAig_rec( Mfs_Man_t * p, Abc_Obj_t * pNode, Aig_Man_t int i; // assign AIG nodes to the leaves Vec_PtrForEachEntry( Abc_Obj_t *, p->vSupp, pObj, i ) - pObj->pCopy = pObj->pNext = (Abc_Obj_t *)Aig_ObjCreatePi( pMan ); + pObj->pCopy = pObj->pNext = (Abc_Obj_t *)Aig_ObjCreateCi( pMan ); // strash intermediate nodes Abc_NtkIncrementTravId( pNode->pNtk ); Vec_PtrForEachEntry( Abc_Obj_t *, p->vNodes, pObj, i ) @@ -242,7 +242,7 @@ Aig_Man_t * Abc_NtkConstructAig( Mfs_Man_t * p, Abc_Obj_t * pNode ) // construct the root node's AIG cone pObjAig = Abc_NtkConstructAig_rec( p, pNode, pMan ); // assert( Aig_ManConst1(pMan) == pObjAig ); - Aig_ObjCreatePo( pMan, pObjAig ); + Aig_ObjCreateCo( pMan, pObjAig ); if ( p->pCare ) { // mark the care set @@ -269,11 +269,11 @@ Aig_Man_t * Abc_NtkConstructAig( Mfs_Man_t * p, Abc_Obj_t * pNode ) if ( pObjAig == NULL ) continue; pObjAig = Aig_NotCond( pObjAig, Aig_ObjFaninC0(pPo) ); - Aig_ObjCreatePo( pMan, pObjAig ); + Aig_ObjCreateCo( pMan, pObjAig ); } } /* - Aig_ManForEachPo( p->pCare, pPo, i ) + Aig_ManForEachCo( p->pCare, pPo, i ) { // assert( Aig_ObjFanin0(pPo) != Aig_ManConst1(p->pCare) ); if ( Aig_ObjFanin0(pPo) == Aig_ManConst1(p->pCare) ) @@ -282,7 +282,7 @@ Aig_Man_t * Abc_NtkConstructAig( Mfs_Man_t * p, Abc_Obj_t * pNode ) if ( pObjAig == NULL ) continue; pObjAig = Aig_NotCond( pObjAig, Aig_ObjFaninC0(pPo) ); - Aig_ObjCreatePo( pMan, pObjAig ); + Aig_ObjCreateCo( pMan, pObjAig ); } */ } @@ -290,12 +290,12 @@ Aig_Man_t * Abc_NtkConstructAig( Mfs_Man_t * p, Abc_Obj_t * pNode ) { // construct the node pObjAig = (Aig_Obj_t *)pNode->pCopy; - Aig_ObjCreatePo( pMan, pObjAig ); + Aig_ObjCreateCo( pMan, pObjAig ); // construct the divisors Vec_PtrForEachEntry( Abc_Obj_t *, p->vDivs, pFanin, i ) { pObjAig = (Aig_Obj_t *)pFanin->pCopy; - Aig_ObjCreatePo( pMan, pObjAig ); + Aig_ObjCreateCo( pMan, pObjAig ); } } else @@ -304,7 +304,7 @@ Aig_Man_t * Abc_NtkConstructAig( Mfs_Man_t * p, Abc_Obj_t * pNode ) Abc_ObjForEachFanin( pNode, pFanin, i ) { pObjAig = (Aig_Obj_t *)pFanin->pCopy; - Aig_ObjCreatePo( pMan, pObjAig ); + Aig_ObjCreateCo( pMan, pObjAig ); } } Aig_ManCleanup( pMan ); @@ -338,7 +338,7 @@ Aig_Man_t * Abc_NtkAigForConstraints( Mfs_Man_t * p, Abc_Obj_t * pNode ) { pPi = Aig_ManPi( p->pCare, (int)(ABC_PTRUINT_T)pFanin->pData ); Aig_ObjSetTravIdCurrent( p->pCare, pPi ); - pPi->pData = Aig_ObjCreatePi(pMan); + pPi->pData = Aig_ObjCreateCi(pMan); } // construct the constraints pObjRoot = Aig_ManConst1(pMan); @@ -360,7 +360,7 @@ Aig_Man_t * Abc_NtkAigForConstraints( Mfs_Man_t * p, Abc_Obj_t * pNode ) pObjRoot = Aig_And( pMan, pObjRoot, pObjAig ); } } - Aig_ObjCreatePo( pMan, pObjRoot ); + Aig_ObjCreateCo( pMan, pObjRoot ); Aig_ManCleanup( pMan ); return pMan; } diff --git a/src/opt/nwk/nwkAig.c b/src/opt/nwk/nwkAig.c index 7dae0dca..6254bc41 100644 --- a/src/opt/nwk/nwkAig.c +++ b/src/opt/nwk/nwkAig.c @@ -55,7 +55,7 @@ Nwk_Man_t * Nwk_ManDeriveFromAig( Aig_Man_t * p ) pNtk->pSpec = Abc_UtilStrsav( p->pSpec ); pObj = Aig_ManConst1(p); pObj->pData = Nwk_ManCreateNode( pNtk, 0, pObj->nRefs ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->pData = Nwk_ManCreateCi( pNtk, pObj->nRefs ); Aig_ManForEachNode( p, pObj, i ) { @@ -63,7 +63,7 @@ Nwk_Man_t * Nwk_ManDeriveFromAig( Aig_Man_t * p ) Nwk_ObjAddFanin( (Nwk_Obj_t *)pObj->pData, (Nwk_Obj_t *)Aig_ObjFanin0(pObj)->pData ); Nwk_ObjAddFanin( (Nwk_Obj_t *)pObj->pData, (Nwk_Obj_t *)Aig_ObjFanin1(pObj)->pData ); } - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { pObj->pData = Nwk_ManCreateCo( pNtk ); Nwk_ObjAddFanin( (Nwk_Obj_t *)pObj->pData, (Nwk_Obj_t *)Aig_ObjFanin0(pObj)->pData ); diff --git a/src/opt/nwk/nwkStrash.c b/src/opt/nwk/nwkStrash.c index 74fc4d56..26fba57f 100644 --- a/src/opt/nwk/nwkStrash.c +++ b/src/opt/nwk/nwkStrash.c @@ -116,13 +116,13 @@ Aig_Man_t * Nwk_ManStrash( Nwk_Man_t * pNtk ) { if ( Nwk_ObjIsCi(pObj) ) { - pObjNew = Aig_ObjCreatePi(pMan); + pObjNew = Aig_ObjCreateCi(pMan); Level = Tim_ManGetCiArrival( (Tim_Man_t *)pMan->pManTime, pObj->PioId ); Aig_ObjSetLevel( pObjNew, Level ); } else if ( Nwk_ObjIsCo(pObj) ) { - pObjNew = Aig_ObjCreatePo( pMan, Aig_NotCond((Aig_Obj_t *)Nwk_ObjFanin0(pObj)->pCopy, pObj->fInvert) ); + pObjNew = Aig_ObjCreateCo( pMan, Aig_NotCond((Aig_Obj_t *)Nwk_ObjFanin0(pObj)->pCopy, pObj->fInvert) ); Level = Aig_ObjLevel( pObjNew ); Tim_ManSetCoArrival( (Tim_Man_t *)pMan->pManTime, pObj->PioId, (float)Level ); } diff --git a/src/proof/bbr/bbrNtbdd.c b/src/proof/bbr/bbrNtbdd.c index 09456df0..49c2873b 100644 --- a/src/proof/bbr/bbrNtbdd.c +++ b/src/proof/bbr/bbrNtbdd.c @@ -136,7 +136,7 @@ int Aig_ManSizeOfGlobalBdds( Aig_Man_t * p ) int RetValue, i; // complement the global functions vFuncsGlob = Vec_PtrAlloc( Aig_ManPoNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Vec_PtrPush( vFuncsGlob, Aig_ObjGlobalBdd(pObj) ); RetValue = Cudd_SharingSize( (DdNode **)Vec_PtrArray(vFuncsGlob), Vec_PtrSize(vFuncsGlob) ); Vec_PtrFree( vFuncsGlob ); @@ -171,7 +171,7 @@ DdManager * Aig_ManComputeGlobalBdds( Aig_Man_t * p, int nBddSizeMax, int fDropI // assign the constant node BDD Aig_ObjSetGlobalBdd( Aig_ManConst1(p), dd->one ); Cudd_Ref( dd->one ); // set the elementary variables - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { Aig_ObjSetGlobalBdd( pObj, dd->vars[i] ); Cudd_Ref( dd->vars[i] ); } @@ -180,7 +180,7 @@ DdManager * Aig_ManComputeGlobalBdds( Aig_Man_t * p, int nBddSizeMax, int fDropI Counter = 0; // construct the BDDs // pProgress = Extra_ProgressBarStart( stdout, Aig_ManNodeNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { bFunc = Bbr_NodeGlobalBdds_rec( dd, Aig_ObjFanin0(pObj), nBddSizeMax, fDropInternal, pProgress, &Counter, fVerbose ); if ( bFunc == NULL ) diff --git a/src/proof/dch/dchAig.c b/src/proof/dch/dchAig.c index 91a00c63..59828443 100644 --- a/src/proof/dch/dchAig.c +++ b/src/proof/dch/dchAig.c @@ -83,21 +83,21 @@ Aig_Man_t * Dch_DeriveTotalAig( Vec_Ptr_t * vAigs ) Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig2, k ) Aig_ManConst1(pAig2)->pData = Aig_ManConst1(pAigTotal); // map primary inputs - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) { - pObjPi = Aig_ObjCreatePi( pAigTotal ); + pObjPi = Aig_ObjCreateCi( pAigTotal ); Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig2, k ) Aig_ManPi( pAig2, i )->pData = pObjPi; } // construct the AIG in the order of POs - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) { Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig2, k ) { pObjPo = Aig_ManPo( pAig2, i ); Dch_DeriveTotalAig_rec( pAigTotal, Aig_ObjFanin0(pObjPo) ); } - Aig_ObjCreatePo( pAigTotal, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pAigTotal, Aig_ObjChild0Copy(pObj) ); } /* // mark the cone of the first AIG diff --git a/src/proof/dch/dchChoice.c b/src/proof/dch/dchChoice.c index 1772f8aa..1de11509 100644 --- a/src/proof/dch/dchChoice.c +++ b/src/proof/dch/dchChoice.c @@ -255,14 +255,14 @@ Aig_Man_t * Dch_DeriveChoiceAig_old( Aig_Man_t * pAig ) // map constants and PIs Aig_ManCleanData( pAig ); Aig_ManConst1(pAig)->pData = Aig_ManConst1(pChoices); - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pChoices ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pChoices ); // construct choices for the internal nodes assert( pAig->pReprs != NULL ); Aig_ManForEachNode( pAig, pObj, i ) Dch_DeriveChoiceAigNode( pChoices, pAig, pObj ); - Aig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( pChoices, Aig_ObjChild0CopyRepr(pChoices, pObj) ); + Aig_ManForEachCo( pAig, pObj, i ) + Aig_ObjCreateCo( pChoices, Aig_ObjChild0CopyRepr(pChoices, pObj) ); Dch_DeriveChoiceCountEquivs( pChoices ); // there is no need for cleanup ABC_FREE( pChoices->pReprs ); @@ -384,7 +384,7 @@ int Aig_ManCheckAcyclic( Aig_Man_t * p, int fVerbose ) // pNode->TravId < pNet->nTravIds - 1 means "pNode is not visited" // traverse the network to detect cycles fAcyclic = 1; - Aig_ManForEachPo( p, pNode, i ) + Aig_ManForEachCo( p, pNode, i ) { pNode = Aig_ObjFanin0(pNode); if ( Aig_ObjIsTravIdPrevious(p, pNode) ) @@ -454,14 +454,14 @@ Aig_Man_t * Dch_DeriveChoiceAigInt( Aig_Man_t * pAig ) // map constants and PIs Aig_ManCleanData( pAig ); Aig_ManConst1(pAig)->pData = Aig_ManConst1(pChoices); - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pChoices ); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pChoices ); // construct choices for the internal nodes assert( pAig->pReprs != NULL ); Aig_ManForEachNode( pAig, pObj, i ) Dch_DeriveChoiceAigNode( pChoices, pAig, pObj ); - Aig_ManForEachPo( pAig, pObj, i ) - Aig_ObjCreatePo( pChoices, Aig_ObjChild0CopyRepr(pChoices, pObj) ); + Aig_ManForEachCo( pAig, pObj, i ) + Aig_ObjCreateCo( pChoices, Aig_ObjChild0CopyRepr(pChoices, pObj) ); Dch_DeriveChoiceCountEquivs( pChoices ); Aig_ManSetRegNum( pChoices, Aig_ManRegNum(pAig) ); return pChoices; diff --git a/src/proof/dch/dchSim.c b/src/proof/dch/dchSim.c index b2d24761..3e7c575b 100644 --- a/src/proof/dch/dchSim.c +++ b/src/proof/dch/dchSim.c @@ -211,7 +211,7 @@ void Dch_PerformRandomSimulation( Aig_Man_t * pAig, Vec_Ptr_t * vSims ) memset( pSim, 0xff, sizeof(unsigned) * nWords ); // assign primary input random sim info - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) { pSim = Dch_ObjSim( vSims, pObj ); for ( k = 0; k < nWords; k++ ) diff --git a/src/proof/dch/dchSweep.c b/src/proof/dch/dchSweep.c index a1c4f79b..dafab06e 100644 --- a/src/proof/dch/dchSweep.c +++ b/src/proof/dch/dchSweep.c @@ -112,8 +112,8 @@ void Dch_ManSweep( Dch_Man_t * p ) p->pAigFraig = Aig_ManStart( Aig_ManObjNumMax(p->pAigTotal) ); Aig_ManCleanData( p->pAigTotal ); Aig_ManConst1(p->pAigTotal)->pData = Aig_ManConst1(p->pAigFraig); - Aig_ManForEachPi( p->pAigTotal, pObj, i ) - pObj->pData = Aig_ObjCreatePi( p->pAigFraig ); + Aig_ManForEachCi( p->pAigTotal, pObj, i ) + pObj->pData = Aig_ObjCreateCi( p->pAigFraig ); // sweep internal nodes pProgress = Bar_ProgressStart( stdout, Aig_ManObjNumMax(p->pAigTotal) ); Aig_ManForEachNode( p->pAigTotal, pObj, i ) diff --git a/src/proof/fra/fraBmc.c b/src/proof/fra/fraBmc.c index 7b4db3de..b0dd3c86 100644 --- a/src/proof/fra/fraBmc.c +++ b/src/proof/fra/fraBmc.c @@ -250,7 +250,7 @@ Aig_Man_t * Fra_BmcFrames( Fra_Bmc_t * p, int fKeepPos ) Bmc_ObjSetFrames( Aig_ManConst1(p->pAig), f, Aig_ManConst1(pAigFrames) ); for ( f = 0; f < p->nFramesAll; f++ ) Aig_ManForEachPiSeq( p->pAig, pObj, i ) - Bmc_ObjSetFrames( pObj, f, Aig_ObjCreatePi(pAigFrames) ); + Bmc_ObjSetFrames( pObj, f, Aig_ObjCreateCi(pAigFrames) ); // set initial state for the latches Aig_ManForEachLoSeq( p->pAig, pObj, i ) Bmc_ObjSetFrames( pObj, 0, Aig_ManConst0(pAigFrames) ); @@ -283,7 +283,7 @@ Aig_Man_t * Fra_BmcFrames( Fra_Bmc_t * p, int fKeepPos ) { for ( f = 0; f < p->nFramesAll; f++ ) Aig_ManForEachPoSeq( p->pAig, pObj, i ) - Aig_ObjCreatePo( pAigFrames, Bmc_ObjChild0Frames(pObj,f) ); + Aig_ObjCreateCo( pAigFrames, Bmc_ObjChild0Frames(pObj,f) ); Aig_ManCleanup( pAigFrames ); } else @@ -291,7 +291,7 @@ Aig_Man_t * Fra_BmcFrames( Fra_Bmc_t * p, int fKeepPos ) // add POs to all the dangling nodes Aig_ManForEachObj( pAigFrames, pObjNew, i ) if ( Aig_ObjIsNode(pObjNew) && pObjNew->nRefs == 0 ) - Aig_ObjCreatePo( pAigFrames, pObjNew ); + Aig_ObjCreateCo( pAigFrames, pObjNew ); } // return the new manager return pAigFrames; diff --git a/src/proof/fra/fraClass.c b/src/proof/fra/fraClass.c index 67351f6d..f7850241 100644 --- a/src/proof/fra/fraClass.c +++ b/src/proof/fra/fraClass.c @@ -779,7 +779,7 @@ static inline void Fra_ClassesDeriveNode( Aig_Man_t * pManFraig, Aig_Obj_t * pOb pMiter = Aig_Exor( pManFraig, Aig_Regular(pObjNew), Aig_Regular(pObjReprNew) ); pMiter = Aig_NotCond( pMiter, Aig_Regular(pMiter)->fPhase ^ Aig_IsComplement(pMiter) ); pMiter = Aig_Not( pMiter ); - Aig_ObjCreatePo( pManFraig, pMiter ); + Aig_ObjCreateCo( pManFraig, pMiter ); } /**Function************************************************************* @@ -811,14 +811,14 @@ Aig_Man_t * Fra_ClassesDeriveAig( Fra_Cla_t * p, int nFramesK ) Fra_ObjSetEqu( ppEquivs, Aig_ManConst1(p->pAig), Aig_ManConst1(pManFraig) ); // create latches for the first frame Aig_ManForEachLoSeq( p->pAig, pObj, i ) - Fra_ObjSetEqu( ppEquivs, pObj, Aig_ObjCreatePi(pManFraig) ); + Fra_ObjSetEqu( ppEquivs, pObj, Aig_ObjCreateCi(pManFraig) ); // add timeframes pLatches = ABC_ALLOC( Aig_Obj_t *, Aig_ManRegNum(p->pAig) ); for ( f = 0; f < nFramesAll; f++ ) { // create PIs for this frame Aig_ManForEachPiSeq( p->pAig, pObj, i ) - Fra_ObjSetEqu( ppEquivs, pObj, Aig_ObjCreatePi(pManFraig) ); + Fra_ObjSetEqu( ppEquivs, pObj, Aig_ObjCreateCi(pManFraig) ); // set the constraints on the latch outputs Aig_ManForEachLoSeq( p->pAig, pObj, i ) Fra_ClassesDeriveNode( pManFraig, pObj, ppEquivs ); diff --git a/src/proof/fra/fraClau.c b/src/proof/fra/fraClau.c index 48640d1d..28e9e9b9 100644 --- a/src/proof/fra/fraClau.c +++ b/src/proof/fra/fraClau.c @@ -109,7 +109,7 @@ Vec_Int_t * Fra_ClauSaveOutputVars( Aig_Man_t * pMan, Cnf_Dat_t * pCnf ) Aig_Obj_t * pObj; int i; vVars = Vec_IntAlloc( Aig_ManPoNum(pMan) ); - Aig_ManForEachPo( pMan, pObj, i ) + Aig_ManForEachCo( pMan, pObj, i ) Vec_IntPush( vVars, pCnf->pVarNums[pObj->Id] ); return vVars; } @@ -131,7 +131,7 @@ Vec_Int_t * Fra_ClauSaveInputVars( Aig_Man_t * pMan, Cnf_Dat_t * pCnf, int nStar Aig_Obj_t * pObj; int i; vVars = Vec_IntAlloc( Aig_ManPiNum(pMan) - nStarting ); - Aig_ManForEachPi( pMan, pObj, i ) + Aig_ManForEachCi( pMan, pObj, i ) { if ( i < nStarting ) continue; diff --git a/src/proof/fra/fraClaus.c b/src/proof/fra/fraClaus.c index e71219b5..f27c63ce 100644 --- a/src/proof/fra/fraClaus.c +++ b/src/proof/fra/fraClaus.c @@ -1565,7 +1565,7 @@ void Fra_ClausWriteIndClauses( Clu_Man_t * p ) pLiteral = Fra_ClausGetLiteral( p, pVar2Id, pStart[k] ); pClause = Aig_Or( pNew, pClause, pLiteral ); } - Aig_ObjCreatePo( pNew, pClause ); + Aig_ObjCreateCo( pNew, pClause ); Beg = End; } ABC_FREE( pVar2Id ); diff --git a/src/proof/fra/fraCore.c b/src/proof/fra/fraCore.c index d3b60ab7..1969b36d 100644 --- a/src/proof/fra/fraCore.c +++ b/src/proof/fra/fraCore.c @@ -193,12 +193,12 @@ void Fra_FraigVerifyCounterEx( Fra_Man_t * p, Vec_Int_t * vCex ) assert( !pObj->fMarkB ); // simulate the cex through the AIG Aig_ManConst1(p->pManAig)->fMarkB = 1; - Aig_ManForEachPi( p->pManAig, pObj, i ) + Aig_ManForEachCi( p->pManAig, pObj, i ) pObj->fMarkB = Vec_IntEntry(vCex, i); Aig_ManForEachNode( p->pManAig, pObj, i ) pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj); // check if the classes hold Vec_PtrForEachEntry( Aig_Obj_t *, p->pCla->vClasses1, pObj, i ) diff --git a/src/proof/fra/fraHot.c b/src/proof/fra/fraHot.c index 29c9c33d..03dd468a 100644 --- a/src/proof/fra/fraHot.c +++ b/src/proof/fra/fraHot.c @@ -402,9 +402,9 @@ Aig_Man_t * Fra_OneHotCreateExdc( Fra_Man_t * p, Vec_Int_t * vOneHots ) int i, Out1, Out2, nTruePis; pNew = Aig_ManStart( Vec_IntSize(vOneHots)/2 ); // for ( i = 0; i < Aig_ManRegNum(p->pManAig); i++ ) -// Aig_ObjCreatePi(pNew); - Aig_ManForEachPi( p->pManAig, pObj, i ) - Aig_ObjCreatePi(pNew); +// Aig_ObjCreateCi(pNew); + Aig_ManForEachCi( p->pManAig, pObj, i ) + Aig_ObjCreateCi(pNew); nTruePis = Aig_ManPiNum(p->pManAig) - Aig_ManRegNum(p->pManAig); for ( i = 0; i < Vec_IntSize(vOneHots); i += 2 ) { @@ -417,7 +417,7 @@ Aig_Man_t * Fra_OneHotCreateExdc( Fra_Man_t * p, Vec_Int_t * vOneHots ) pObj1 = Aig_NotCond( pObj1, Fra_LitSign(Out1) ); pObj2 = Aig_NotCond( pObj2, Fra_LitSign(Out2) ); pObj = Aig_Or( pNew, pObj1, pObj2 ); - Aig_ObjCreatePo( pNew, pObj ); + Aig_ObjCreateCo( pNew, pObj ); } Aig_ManCleanup(pNew); // printf( "Created AIG with %d nodes and %d outputs.\n", Aig_ManNodeNum(pNew), Aig_ManPoNum(pNew) ); diff --git a/src/proof/fra/fraImp.c b/src/proof/fra/fraImp.c index 9877ceaa..de24f179 100644 --- a/src/proof/fra/fraImp.c +++ b/src/proof/fra/fraImp.c @@ -717,7 +717,7 @@ void Fra_ImpRecordInManager( Fra_Man_t * p, Aig_Man_t * pNew ) pMiter = Aig_Or( pNew, Aig_NotCond((Aig_Obj_t *)pLeft->pData, !pLeft->fPhase), Aig_NotCond((Aig_Obj_t *)pRight->pData, pRight->fPhase) ); - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); } pNew->nAsserts = Aig_ManPoNum(pNew) - nPosOld; } diff --git a/src/proof/fra/fraInd.c b/src/proof/fra/fraInd.c index 1224bab3..b8a1e6bf 100644 --- a/src/proof/fra/fraInd.c +++ b/src/proof/fra/fraInd.c @@ -112,7 +112,7 @@ static inline void Fra_FramesConstrainNode( Aig_Man_t * pManFraig, Aig_Obj_t * p pMiter = Aig_Exor( pManFraig, pObjNew, pObjReprNew ); pMiter = Aig_NotCond( pMiter, !Aig_ObjPhaseReal(pMiter) ); assert( Aig_ObjPhaseReal(pMiter) == 1 ); - Aig_ObjCreatePo( pManFraig, pMiter ); + Aig_ObjCreateCo( pManFraig, pMiter ); } /**Function************************************************************* @@ -145,10 +145,10 @@ Aig_Man_t * Fra_FramesWithClasses( Fra_Man_t * p ) Fra_ObjSetFraig( Aig_ManConst1(p->pManAig), f, Aig_ManConst1(pManFraig) ); for ( f = 0; f < p->nFramesAll; f++ ) Aig_ManForEachPiSeq( p->pManAig, pObj, i ) - Fra_ObjSetFraig( pObj, f, Aig_ObjCreatePi(pManFraig) ); + Fra_ObjSetFraig( pObj, f, Aig_ObjCreateCi(pManFraig) ); // create latches for the first frame Aig_ManForEachLoSeq( p->pManAig, pObj, i ) - Fra_ObjSetFraig( pObj, 0, Aig_ObjCreatePi(pManFraig) ); + Fra_ObjSetFraig( pObj, 0, Aig_ObjCreateCi(pManFraig) ); // add timeframes // pManFraig->fAddStrash = 1; @@ -173,7 +173,7 @@ Aig_Man_t * Fra_FramesWithClasses( Fra_Man_t * p ) pManFraig->nAsserts = Aig_ManPoNum(pManFraig); // add the POs for the latch outputs of the last frame Aig_ManForEachLoSeq( p->pManAig, pObj, i ) - Aig_ObjCreatePo( pManFraig, Fra_ObjFraig(pObj,p->nFramesAll-1) ); + Aig_ObjCreateCo( pManFraig, Fra_ObjFraig(pObj,p->nFramesAll-1) ); // remove dangling nodes Aig_ManCleanup( pManFraig ); diff --git a/src/proof/fra/fraLcr.c b/src/proof/fra/fraLcr.c index 238e3096..d24b37f6 100644 --- a/src/proof/fra/fraLcr.c +++ b/src/proof/fra/fraLcr.c @@ -134,7 +134,7 @@ void Lcr_ManFree( Fra_Lcr_t * p ) int i; if ( p->fVerbose ) Lcr_ManPrint( p ); - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) pObj->pNext = NULL; Vec_PtrFree( p->vFraigs ); if ( p->pCla ) Fra_ClassesStop( p->pCla ); @@ -162,7 +162,7 @@ Fra_Man_t * Fra_LcrAigPrepare( Aig_Man_t * pAig ) int i; p = ABC_ALLOC( Fra_Man_t, 1 ); memset( p, 0, sizeof(Fra_Man_t) ); -// Aig_ManForEachPi( pAig, pObj, i ) +// Aig_ManForEachCi( pAig, pObj, i ) Aig_ManForEachObj( pAig, pObj, i ) pObj->pData = p; return p; @@ -183,7 +183,7 @@ void Fra_LcrAigPrepareTwo( Aig_Man_t * pAig, Fra_Man_t * p ) { Aig_Obj_t * pObj; int i; - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) pObj->pData = p; } @@ -300,7 +300,7 @@ Aig_Man_t * Fra_LcrDeriveAigForPartitioning( Fra_Lcr_t * pLcr ) Aig_Obj_t * pObj, * pObjPo, * pObjNew, ** ppClass, * pMiter; int i, c, Offset; // remember the numbers of the inputs of the original AIG - Aig_ManForEachPi( pLcr->pAig, pObj, i ) + Aig_ManForEachCi( pLcr->pAig, pObj, i ) { pObj->pData = pLcr; pObj->pNext = (Aig_Obj_t *)(long)i; @@ -321,7 +321,7 @@ Aig_Man_t * Fra_LcrDeriveAigForPartitioning( Fra_Lcr_t * pLcr ) pObjNew = Fra_LcrManDup_rec( pNew, pLcr->pAig, Aig_ObjFanin0(pObjPo) ); pMiter = Aig_Exor( pNew, pMiter, pObjNew ); } - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); } // go over the constant candidates Vec_PtrForEachEntry( Aig_Obj_t *, pLcr->pCla->vClasses1, pObj, i ) @@ -329,7 +329,7 @@ Aig_Man_t * Fra_LcrDeriveAigForPartitioning( Fra_Lcr_t * pLcr ) assert( Aig_ObjIsPi(pObj) ); pObjPo = Aig_ManPo( pLcr->pAig, Offset+(long)pObj->pNext ); pMiter = Fra_LcrManDup_rec( pNew, pLcr->pAig, Aig_ObjFanin0(pObjPo) ); - Aig_ObjCreatePo( pNew, pMiter ); + Aig_ObjCreateCo( pNew, pMiter ); } return pNew; } @@ -403,7 +403,7 @@ Aig_Obj_t * Fra_LcrCreatePart_rec( Fra_Cla_t * pCla, Aig_Man_t * pNew, Aig_Man_t // Aig_Obj_t * pRepr = Fra_ClassObjRepr(pObj); Aig_Obj_t * pRepr = pCla->pMemRepr[pObj->Id]; if ( pRepr == NULL ) - pObj->pData = Aig_ObjCreatePi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); else { pObj->pData = Fra_LcrCreatePart_rec( pCla, pNew, p, pRepr ); @@ -447,7 +447,7 @@ Aig_Man_t * Fra_LcrCreatePart( Fra_Lcr_t * p, Vec_Int_t * vPart ) } else pObjNew = Aig_ManConst1( pNew ); - Aig_ObjCreatePo( pNew, pObjNew ); + Aig_ObjCreateCo( pNew, pObjNew ); } return pNew; } diff --git a/src/proof/fra/fraMan.c b/src/proof/fra/fraMan.c index 90e8b762..67832f83 100644 --- a/src/proof/fra/fraMan.c +++ b/src/proof/fra/fraMan.c @@ -187,8 +187,8 @@ Aig_Man_t * Fra_ManPrepareComb( Fra_Man_t * p ) pManFraig->nAsserts = p->pManAig->nAsserts; // set the pointers to the available fraig nodes Fra_ObjSetFraig( Aig_ManConst1(p->pManAig), 0, Aig_ManConst1(pManFraig) ); - Aig_ManForEachPi( p->pManAig, pObj, i ) - Fra_ObjSetFraig( pObj, 0, Aig_ObjCreatePi(pManFraig) ); + Aig_ManForEachCi( p->pManAig, pObj, i ) + Fra_ObjSetFraig( pObj, 0, Aig_ObjCreateCi(pManFraig) ); // set the pointers to the manager Aig_ManForEachObj( pManFraig, pObj, i ) pObj->pData = p; @@ -219,8 +219,8 @@ void Fra_ManFinalizeComb( Fra_Man_t * p ) Aig_Obj_t * pObj; int i; // add the POs - Aig_ManForEachPo( p->pManAig, pObj, i ) - Aig_ObjCreatePo( p->pManFraig, Fra_ObjChild0Fra(pObj,0) ); + Aig_ManForEachCo( p->pManAig, pObj, i ) + Aig_ObjCreateCo( p->pManFraig, Fra_ObjChild0Fra(pObj,0) ); // postprocess Aig_ManCleanMarkB( p->pManFraig ); } diff --git a/src/proof/fra/fraPart.c b/src/proof/fra/fraPart.c index e9739f97..6594ac0b 100644 --- a/src/proof/fra/fraPart.c +++ b/src/proof/fra/fraPart.c @@ -64,7 +64,7 @@ clk = clock(); vSupps = (Vec_Vec_t *)Aig_ManSupports( p ); ABC_PRT( "Supports", clock() - clk ); // remove last entry - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { vSup = Vec_VecEntryInt( vSupps, i ); Vec_IntPop( vSup ); @@ -75,7 +75,7 @@ ABC_PRT( "Supports", clock() - clk ); // create reverse supports clk = clock(); vSuppsIn = Vec_VecStart( Aig_ManPiNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { vSup = Vec_VecEntryInt( vSupps, i ); Vec_IntForEachEntry( vSup, Entry, k ) @@ -90,7 +90,7 @@ clk = clock(); vOverNew = Vec_IntAlloc( Aig_ManPoNum(p) ); vQuantNew = Vec_IntAlloc( Aig_ManPoNum(p) ); // pProgress = Bar_ProgressStart( stdout, Aig_ManPoNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { // Bar_ProgressUpdate( pProgress, i, NULL ); // get old supports @@ -101,7 +101,7 @@ clk = clock(); CountOver = CountQuant = 0; vSupNew = Vec_IntDup( vSup ); // go through the nodes where the first var appears - Aig_ManForEachPo( p, pObj, k ) + Aig_ManForEachCo( p, pObj, k ) // iVar = Vec_IntEntry( vSup, 0 ); // vSupIn = Vec_VecEntry( vSuppsIn, iVar ); // Vec_IntForEachEntry( vSupIn, Entry, k ) @@ -198,7 +198,7 @@ clk = clock(); vSupps = (Vec_Vec_t *)Aig_ManSupports( p ); ABC_PRT( "Supports", clock() - clk ); // remove last entry - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { vSup = Vec_VecEntryInt( vSupps, i ); Vec_IntPop( vSup ); @@ -209,7 +209,7 @@ ABC_PRT( "Supports", clock() - clk ); // create reverse supports clk = clock(); vSuppsIn = Vec_VecStart( Aig_ManPiNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { if ( i == p->nAsserts ) break; @@ -222,7 +222,7 @@ ABC_PRT( "Inverse ", clock() - clk ); // create affective supports clk = clock(); pSupp = ABC_ALLOC( char, Aig_ManPiNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { if ( i % 50 != 0 ) continue; diff --git a/src/proof/fra/fraSim.c b/src/proof/fra/fraSim.c index eb42c665..e54846bc 100644 --- a/src/proof/fra/fraSim.c +++ b/src/proof/fra/fraSim.c @@ -243,7 +243,7 @@ void Fra_SmlSavePattern( Fra_Man_t * p ) Aig_Obj_t * pObj; int i; memset( p->pPatWords, 0, sizeof(unsigned) * p->nPatWords ); - Aig_ManForEachPi( p->pManFraig, pObj, i ) + Aig_ManForEachCi( p->pManFraig, pObj, i ) // if ( p->pSat->model.ptr[Fra_ObjSatNum(pObj)] == l_True ) if ( sat_solver_var_value(p->pSat, Fra_ObjSatNum(pObj)) ) Abc_InfoSetBit( p->pPatWords, i ); @@ -259,7 +259,7 @@ void Fra_SmlSavePattern( Fra_Man_t * p ) /* printf( "Pattern: " ); - Aig_ManForEachPi( p->pManFraig, pObj, i ) + Aig_ManForEachCi( p->pManFraig, pObj, i ) printf( "%d", Abc_InfoHasBit( p->pPatWords, i ) ); printf( "\n" ); */ @@ -299,7 +299,7 @@ void Fra_SmlCheckOutputSavePattern( Fra_Man_t * p, Aig_Obj_t * pObjPo ) BestPat = i * 32 + k; // fill in the counter-example data pModel = ABC_ALLOC( int, Aig_ManPiNum(p->pManFraig)+1 ); - Aig_ManForEachPi( p->pManAig, pObjPi, i ) + Aig_ManForEachCi( p->pManAig, pObjPi, i ) { pModel[i] = Abc_InfoHasBit(Fra_ObjSim(p->pSml, pObjPi->Id), BestPat); // printf( "%d", pModel[i] ); @@ -330,7 +330,7 @@ int Fra_SmlCheckOutput( Fra_Man_t * p ) // make sure the reference simulation pattern does not detect the bug pObj = Aig_ManPo( p->pManAig, 0 ); assert( Aig_ObjFanin0(pObj)->fPhase == (unsigned)Aig_ObjFaninC0(pObj) ); - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) { if ( !Fra_SmlNodeIsConst( Aig_ObjFanin0(pObj) ) ) { @@ -414,7 +414,7 @@ void Fra_SmlInitialize( Fra_Sml_t * p, int fInit ) } else { - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Fra_SmlAssignRandom( p, pObj ); } } @@ -438,7 +438,7 @@ void Fra_SmlAssignDist1( Fra_Sml_t * p, unsigned * pPat ) if ( p->nFrames == 1 ) { // copy the PI info - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Fra_SmlAssignConst( p, pObj, Abc_InfoHasBit(pPat, i), 0 ); // flip one bit Limit = Abc_MinInt( Aig_ManPiNum(p->pAig), p->nWordsTotal * 32 - 1 ); @@ -980,7 +980,7 @@ Abc_Cex_t * Fra_SmlCopyCounterExample( Aig_Man_t * pAig, Aig_Man_t * pFrames, in // find the PO that failed iPo = -1; iFrame = -1; - Aig_ManForEachPo( pFrames, pObj, i ) + Aig_ManForEachCo( pFrames, pObj, i ) if ( pObj->Id == pModel[Aig_ManPiNum(pFrames)] ) { iPo = i % nTruePos; diff --git a/src/proof/int/intCheck.c b/src/proof/int/intCheck.c index 6b36fe30..57d6e7d0 100644 --- a/src/proof/int/intCheck.c +++ b/src/proof/int/intCheck.c @@ -67,13 +67,13 @@ Aig_Man_t * Inter_ManUnrollFrames( Aig_Man_t * pAig, int nFrames ) Aig_ManConst1(pAig)->pData = Aig_ManConst1( pFrames ); // create variables for register outputs Saig_ManForEachLo( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add timeframes for ( f = 0; f < nFrames; f++ ) { // create PI nodes for this frame Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -84,7 +84,7 @@ Aig_Man_t * Inter_ManUnrollFrames( Aig_Man_t * pAig, int nFrames ) Saig_ManForEachLiLo( pAig, pObjLi, pObjLo, i ) { pObjLo->pData = pObjLi->pData; - Aig_ObjCreatePo( pFrames, (Aig_Obj_t *)pObjLo->pData ); + Aig_ObjCreateCo( pFrames, (Aig_Obj_t *)pObjLo->pData ); } } Aig_ManCleanup( pFrames ); @@ -240,7 +240,7 @@ int Inter_CheckPerform( Inter_Check_t * p, Cnf_Dat_t * pCnfInt, int nTimeNewOut assert( RetValue ); } // add equality clauses for the flop variables - Aig_ManForEachPi( pCnfInt->pMan, pObj, i ) + Aig_ManForEachCi( pCnfInt->pMan, pObj, i ) { pObj2 = f ? Aig_ManPo(p->pFrames, i + (f-1) * nRegs) : Aig_ManPi(p->pFrames, i); Inter_CheckAddEqual( p, pCnfInt->pVarNums[pObj->Id], p->pCnf->pVarNums[pObj2->Id] ); diff --git a/src/proof/int/intContain.c b/src/proof/int/intContain.c index 58b408d7..213c557c 100644 --- a/src/proof/int/intContain.c +++ b/src/proof/int/intContain.c @@ -121,7 +121,7 @@ Aig_Man_t * Inter_ManFramesLatches( Aig_Man_t * pAig, int nFrames, Vec_Ptr_t ** *pvMapReg = Vec_PtrAlloc( (nFrames+1) * Saig_ManRegNum(pAig) ); Saig_ManForEachLo( pAig, pObj, i ) { - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); Vec_PtrPush( *pvMapReg, pObj->pData ); } // add timeframes @@ -129,7 +129,7 @@ Aig_Man_t * Inter_ManFramesLatches( Aig_Man_t * pAig, int nFrames, Vec_Ptr_t ** { // create PI nodes for this frame Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -165,14 +165,14 @@ void Inter_ManAppendCone( Aig_Man_t * pOld, Aig_Man_t * pNew, Aig_Obj_t ** ppNew // create the PIs Aig_ManCleanData( pOld ); Aig_ManConst1(pOld)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( pOld, pObj, i ) + Aig_ManForEachCi( pOld, pObj, i ) pObj->pData = ppNewPis[i]; // duplicate internal nodes Aig_ManForEachNode( pOld, pObj, i ) pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // add one PO to new pObj = Aig_ManPo( pOld, 0 ); - Aig_ObjCreatePo( pNew, Aig_NotCond( Aig_ObjChild0Copy(pObj), fCompl ) ); + Aig_ObjCreateCo( pNew, Aig_NotCond( Aig_ObjChild0Copy(pObj), fCompl ) ); } @@ -287,7 +287,7 @@ int Inter_ManCheckUniqueness( Aig_Man_t * p, sat_solver * pSat, Cnf_Dat_t * pCnf // get the counter-example vPis = Vec_IntAlloc( 100 ); - Aig_ManForEachPi( pCnf->pMan, pObj, k ) + Aig_ManForEachCi( pCnf->pMan, pObj, k ) Vec_IntPush( vPis, pCnf->pVarNums[Aig_ObjId(pObj)] ); assert( Vec_IntSize(vPis) == Aig_ManRegNum(p) + nFrames * Saig_ManPiNum(p) ); pCounterEx = Sat_SolverGetModel( pSat, vPis->pArray, vPis->nSize ); diff --git a/src/proof/int/intCtrex.c b/src/proof/int/intCtrex.c index 9ba8c9df..22e689f4 100644 --- a/src/proof/int/intCtrex.c +++ b/src/proof/int/intCtrex.c @@ -61,7 +61,7 @@ Aig_Man_t * Inter_ManFramesBmc( Aig_Man_t * pAig, int nFrames ) { // create PI nodes for this frame Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -76,7 +76,7 @@ Aig_Man_t * Inter_ManFramesBmc( Aig_Man_t * pAig, int nFrames ) } // create POs for the output of the last frame pObj = Aig_ManPo( pAig, 0 ); - Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); Aig_ManCleanup( pFrames ); return pFrames; } diff --git a/src/proof/int/intDup.c b/src/proof/int/intDup.c index 551473ef..adc692cb 100644 --- a/src/proof/int/intDup.c +++ b/src/proof/int/intDup.c @@ -52,9 +52,9 @@ Aig_Man_t * Inter_ManStartInitState( int nRegs ) ppInputs = ABC_ALLOC( Aig_Obj_t *, nRegs ); p = Aig_ManStart( nRegs ); for ( i = 0; i < nRegs; i++ ) - ppInputs[i] = Aig_Not( Aig_ObjCreatePi(p) ); + ppInputs[i] = Aig_Not( Aig_ObjCreateCi(p) ); pRes = Aig_Multi( p, ppInputs, nRegs, AIG_OBJ_AND ); - Aig_ObjCreatePo( p, pRes ); + Aig_ObjCreateCo( p, pRes ); ABC_FREE( ppInputs ); return p; } @@ -83,8 +83,8 @@ Aig_Man_t * Inter_ManStartDuplicated( Aig_Man_t * p ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pNew ); + Aig_ManForEachCi( p, pObj, i ) + pObj->pData = Aig_ObjCreateCi( pNew ); // set registers pNew->nTruePis = p->nTruePis; pNew->nTruePos = Saig_ManConstrNum(p); @@ -98,12 +98,12 @@ Aig_Man_t * Inter_ManStartDuplicated( Aig_Man_t * p ) { if ( i < Saig_ManPoNum(p)-Saig_ManConstrNum(p) ) continue; - Aig_ObjCreatePo( pNew, Aig_Not( Aig_ObjChild0Copy(pObj) ) ); + Aig_ObjCreateCo( pNew, Aig_Not( Aig_ObjChild0Copy(pObj) ) ); } // create register inputs with MUXes Saig_ManForEachLi( p, pObj, i ) - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); Aig_ManCleanup( pNew ); return pNew; } @@ -133,11 +133,11 @@ Aig_Man_t * Inter_ManStartOneOutput( Aig_Man_t * p, int fAddFirstPo ) // create the PIs Aig_ManCleanData( p ); Aig_ManConst1(p)->pData = Aig_ManConst1(pNew); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { if ( i == Saig_ManPiNum(p) ) - pCtrl = Aig_ObjCreatePi( pNew ); - pObj->pData = Aig_ObjCreatePi( pNew ); + pCtrl = Aig_ObjCreateCi( pNew ); + pObj->pData = Aig_ObjCreateCi( pNew ); } // set registers pNew->nRegs = fAddFirstPo? 0 : p->nRegs; @@ -152,14 +152,14 @@ Aig_Man_t * Inter_ManStartOneOutput( Aig_Man_t * p, int fAddFirstPo ) { if ( i < Saig_ManPoNum(p)-Saig_ManConstrNum(p) ) continue; - Aig_ObjCreatePo( pNew, Aig_Not( Aig_ObjChild0Copy(pObj) ) ); + Aig_ObjCreateCo( pNew, Aig_Not( Aig_ObjChild0Copy(pObj) ) ); } // add the PO if ( fAddFirstPo ) { pObj = Aig_ManPo( p, 0 ); - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } else { @@ -168,7 +168,7 @@ Aig_Man_t * Inter_ManStartOneOutput( Aig_Man_t * p, int fAddFirstPo ) { pObj = Aig_Mux( pNew, pCtrl, (Aig_Obj_t *)pObjLo->pData, Aig_ObjChild0Copy(pObjLi) ); // pObj = Aig_Mux( pNew, pCtrl, Aig_ManConst0(pNew), Aig_ObjChild0Copy(pObjLi) ); - Aig_ObjCreatePo( pNew, pObj ); + Aig_ObjCreateCo( pNew, pObj ); } } Aig_ManCleanup( pNew ); diff --git a/src/proof/int/intFrames.c b/src/proof/int/intFrames.c index 0fbab6cb..8e74d99a 100644 --- a/src/proof/int/intFrames.c +++ b/src/proof/int/intFrames.c @@ -63,14 +63,14 @@ Aig_Man_t * Inter_ManFramesInter( Aig_Man_t * pAig, int nFrames, int fAddRegOuts else { Saig_ManForEachLo( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); } // add timeframes for ( f = 0; f < nFrames; f++ ) { // create PI nodes for this frame Saig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pFrames ); + pObj->pData = Aig_ObjCreateCi( pFrames ); // add internal nodes of this frame Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); @@ -79,7 +79,7 @@ Aig_Man_t * Inter_ManFramesInter( Aig_Man_t * pAig, int nFrames, int fAddRegOuts { if ( i < Saig_ManPoNum(pAig)-Saig_ManConstrNum(pAig) ) continue; - Aig_ObjCreatePo( pFrames, Aig_Not( Aig_ObjChild0Copy(pObj) ) ); + Aig_ObjCreateCo( pFrames, Aig_Not( Aig_ObjChild0Copy(pObj) ) ); } if ( f == nFrames - 1 ) break; @@ -94,13 +94,13 @@ Aig_Man_t * Inter_ManFramesInter( Aig_Man_t * pAig, int nFrames, int fAddRegOuts if ( fAddRegOuts ) { Saig_ManForEachLi( pAig, pObj, i ) - Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); } // create the only PO of the manager else { pObj = Aig_ManPo( pAig, 0 ); - Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); } Aig_ManCleanup( pFrames ); return pFrames; diff --git a/src/proof/int/intM114.c b/src/proof/int/intM114.c index 139c9bbd..c37cb2c6 100644 --- a/src/proof/int/intM114.c +++ b/src/proof/int/intM114.c @@ -113,7 +113,7 @@ sat_solver * Inter_ManDeriveSatSolver( } else { - Aig_ManForEachPi( pInter, pObj, i ) + Aig_ManForEachCi( pInter, pObj, i ) { pObj2 = Saig_ManLo( pAig, i ); @@ -137,7 +137,7 @@ sat_solver * Inter_ManDeriveSatSolver( Vec_IntClear( vVarsAB ); if ( fUseBackward ) { - Aig_ManForEachPo( pFrames, pObj, i ) + Aig_ManForEachCo( pFrames, pObj, i ) { assert( pCnfFrames->pVarNums[pObj->Id] >= 0 ); Vec_IntPush( vVarsAB, pCnfFrames->pVarNums[pObj->Id] ); @@ -155,7 +155,7 @@ sat_solver * Inter_ManDeriveSatSolver( } else { - Aig_ManForEachPi( pFrames, pObj, i ) + Aig_ManForEachCi( pFrames, pObj, i ) { if ( i == Aig_ManRegNum(pAig) ) break; diff --git a/src/proof/int/intM114p.c b/src/proof/int/intM114p.c index 7c011426..6164a389 100644 --- a/src/proof/int/intM114p.c +++ b/src/proof/int/intM114p.c @@ -87,7 +87,7 @@ M114p_Solver_t Inter_ManDeriveSatSolverM114p( assert( 0 ); } // connector clauses - Aig_ManForEachPi( pInter, pObj, i ) + Aig_ManForEachCi( pInter, pObj, i ) { pObj2 = Saig_ManLo( pAig, i ); Lits[0] = toLitCond( pCnfInter->pVarNums[pObj->Id], 0 ); @@ -109,7 +109,7 @@ M114p_Solver_t Inter_ManDeriveSatSolverM114p( assert( 0 ); } // connector clauses - Aig_ManForEachPi( pFrames, pObj, i ) + Aig_ManForEachCi( pFrames, pObj, i ) { if ( i == Aig_ManRegNum(pAig) ) break; @@ -296,7 +296,7 @@ Aig_Man_t * Inter_ManInterpolateM114pPudlak( M114p_Solver_t s, Vec_Int_t * vMapR Vec_IntFree( vLiterals ); Vec_IntFree( vClauses ); Vec_IntFree( vResolvent ); - Aig_ObjCreatePo( p, pInter ); + Aig_ObjCreateCo( p, pInter ); Aig_ManCleanup( p ); return p; } @@ -372,7 +372,7 @@ Aig_Man_t * Inter_ManpInterpolateM114( M114p_Solver_t s, Vec_Int_t * vMapRoots, assert( Vec_PtrSize(vInters) == M114p_SolverProofClauseNum(s) ); Vec_PtrFree( vInters ); - Aig_ObjCreatePo( p, pInter ); + Aig_ObjCreateCo( p, pInter ); Aig_ManCleanup( p ); assert( Aig_ManCheck(p) ); return p; diff --git a/src/proof/live/liveness.c b/src/proof/live/liveness.c index a86a8cd1..d961e509 100644 --- a/src/proof/live/liveness.c +++ b/src/proof/live/liveness.c @@ -119,7 +119,7 @@ char * retrieveTruePiName( Abc_Ntk_t *pNtkOld, Aig_Man_t *pAigOld, Aig_Man_t *pA int index; assert( Saig_ObjIsPi( pAigNew, pObjPivot ) ); - Aig_ManForEachPi( pAigNew, pObj, index ) + Aig_ManForEachCi( pAigNew, pObj, index ) if( pObj == pObjPivot ) break; assert( index < Aig_ManPiNum( pAigNew ) - Aig_ManRegNum( pAigNew ) ); @@ -287,7 +287,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ Saig_ManForEachPi( p, pObj, i ) { piCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecPis, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkPi( pNtk, i ) )); Vec_PtrPush( vecPiNames, nodeName ); @@ -298,7 +298,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ //**************************************************************** if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { - pObjSavePi = Aig_ObjCreatePi( pNew ); + pObjSavePi = Aig_ObjCreateCi( pNew ); nodeName = "SAVE_BIERE", Vec_PtrPush( vecPiNames, nodeName ); } @@ -309,7 +309,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ Saig_ManForEachLo( p, pObj, i ) { loCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecLos, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) )); Vec_PtrPush( vecLoNames, nodeName ); @@ -321,7 +321,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { loCreated++; - pObjSavedLo = Aig_ObjCreatePi( pNew ); + pObjSavedLo = Aig_ObjCreateCi( pNew ); Vec_PtrPush( vecLos, pObjSavedLo ); nodeName = "SAVED_LO"; Vec_PtrPush( vecLoNames, nodeName ); @@ -360,7 +360,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ pArgument = Aig_NotCond( (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ); pObjAndAcc = Aig_And( pNew, pArgument, pObjAndAcc ); } - pObjOriginalSafetyPropertyOutput = Aig_ObjCreatePo( pNew, Aig_Not(pObjAndAcc) ); + pObjOriginalSafetyPropertyOutput = Aig_ObjCreateCo( pNew, Aig_Not(pObjAndAcc) ); } else if( Vec_PtrSize( vAssertSafety ) != 0 && Vec_PtrSize( vAssumeSafety ) != 0 ) { @@ -379,12 +379,12 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ pObjAndAcc = Aig_And( pNew, pArgument, pObjAndAcc ); } collectiveAssumeSafety = pObjAndAcc; - pObjOriginalSafetyPropertyOutput = Aig_ObjCreatePo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); + pObjOriginalSafetyPropertyOutput = Aig_ObjCreateCo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); } else { printf("WARNING!! No safety property is found, a new (negated) constant 1 output is created\n"); - pObjOriginalSafetyPropertyOutput = Aig_ObjCreatePo( pNew, Aig_Not( Aig_ManConst1(pNew) ) ); + pObjOriginalSafetyPropertyOutput = Aig_ObjCreateCo( pNew, Aig_Not( Aig_ManConst1(pNew) ) ); } } @@ -394,7 +394,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ //******************************************************************** if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { - pObjSafetyPropertyOutput = Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + pObjSafetyPropertyOutput = Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); } // create register inputs for the original registers @@ -403,7 +403,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ Saig_ManForEachLo( p, pObj, i ) { pMatch = Saig_ObjLoToLi( p, pObj ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); nRegCount++; liCopied++; } @@ -412,7 +412,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { #ifndef DUPLICATE_CKT_DEBUG - pObjSavedLi = Aig_ObjCreatePo( pNew, pObjSaveOrSaved ); + pObjSavedLi = Aig_ObjCreateCo( pNew, pObjSaveOrSaved ); nRegCount++; liCreated++; @@ -423,7 +423,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ // create the family of shadow registers, then create the cascade of Xnor and And gates for the comparator Saig_ManForEachLo( p, pObj, i ) { - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -434,7 +434,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ #endif pObjShadowLiDriver = Aig_Mux( pNew, pObjSaveAndNotSaved, (Aig_Obj_t *)pObj->pData, pObjShadowLo ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -459,7 +459,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ { liveLatch++; pDriverImage = Aig_NotCond((Aig_Obj_t *)Aig_Regular(Aig_ObjChild0( pObj ))->pData, Aig_ObjFaninC0(pObj)); - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -469,7 +469,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ #endif pObjShadowLiDriver = Aig_Or( pNew, pObjShadowLo, Aig_And( pNew, pDriverImage, pObjSaveOrSaved ) ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -488,7 +488,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ { fairLatch++; pDriverImage = Aig_NotCond((Aig_Obj_t *)Aig_Regular(Aig_ObjChild0( pObj ))->pData, Aig_ObjFaninC0(pObj)); - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -498,7 +498,7 @@ Aig_Man_t * LivenessToSafetyTransformation( int mode, Abc_Ntk_t * pNtk, Aig_Man_ #endif pObjShadowLiDriver = Aig_Or( pNew, pObjShadowLo, Aig_And( pNew, pDriverImage, pObjSaveOrSaved ) ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -584,7 +584,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M Saig_ManForEachPi( p, pObj, i ) { piCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecPis, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkPi( pNtk, i ) )); Vec_PtrPush( vecPiNames, nodeName ); @@ -595,7 +595,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M //**************************************************************** if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { - pObjSavePi = Aig_ObjCreatePi( pNew ); + pObjSavePi = Aig_ObjCreateCi( pNew ); nodeName = "SAVE_BIERE", Vec_PtrPush( vecPiNames, nodeName ); } @@ -606,7 +606,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M Saig_ManForEachLo( p, pObj, i ) { loCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecLos, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) )); Vec_PtrPush( vecLoNames, nodeName ); @@ -618,7 +618,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { loCreated++; - pObjSavedLo = Aig_ObjCreatePi( pNew ); + pObjSavedLo = Aig_ObjCreateCi( pNew ); Vec_PtrPush( vecLos, pObjSavedLo ); nodeName = "SAVED_LO"; Vec_PtrPush( vecLoNames, nodeName ); @@ -657,7 +657,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M pArgument = Aig_NotCond( (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ); pObjAndAcc = Aig_And( pNew, pArgument, pObjAndAcc ); } - Aig_ObjCreatePo( pNew, Aig_Not(pObjAndAcc) ); + Aig_ObjCreateCo( pNew, Aig_Not(pObjAndAcc) ); } else if( Vec_PtrSize( vAssertSafety ) != 0 && Vec_PtrSize( vAssumeSafety ) != 0 ) { @@ -676,12 +676,12 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M pObjAndAcc = Aig_And( pNew, pArgument, pObjAndAcc ); } collectiveAssumeSafety = pObjAndAcc; - Aig_ObjCreatePo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); + Aig_ObjCreateCo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); } else { printf("WARNING!! No safety property is found, a new (negated) constant 1 output is created\n"); - Aig_ObjCreatePo( pNew, Aig_Not( Aig_ManConst1(pNew) ) ); + Aig_ObjCreateCo( pNew, Aig_Not( Aig_ManConst1(pNew) ) ); } } @@ -691,7 +691,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M //******************************************************************** if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { - pObjSafetyPropertyOutput = Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + pObjSafetyPropertyOutput = Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); } // create register inputs for the original registers @@ -700,7 +700,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M Saig_ManForEachLo( p, pObj, i ) { pMatch = Saig_ObjLoToLi( p, pObj ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); nRegCount++; liCopied++; } @@ -709,7 +709,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { #ifndef DUPLICATE_CKT_DEBUG - pObjSavedLi = Aig_ObjCreatePo( pNew, pObjSaveOrSaved ); + pObjSavedLi = Aig_ObjCreateCo( pNew, pObjSaveOrSaved ); nRegCount++; liCreated++; @@ -725,7 +725,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M } Vec_IntForEachEntry( vFlops, iEntry, i ) { - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); pObj = Aig_ManLo( p, iEntry ); #ifdef PROPAGATE_NAMES @@ -737,7 +737,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M #endif pObjShadowLiDriver = Aig_Mux( pNew, pObjSaveAndNotSaved, (Aig_Obj_t *)pObj->pData, pObjShadowLo ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -762,7 +762,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M { liveLatch++; pDriverImage = Aig_NotCond((Aig_Obj_t *)Aig_Regular(Aig_ObjChild0( pObj ))->pData, Aig_ObjFaninC0(pObj)); - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -772,7 +772,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M #endif pObjShadowLiDriver = Aig_Or( pNew, pObjShadowLo, Aig_And( pNew, pDriverImage, pObjSaveOrSaved ) ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -791,7 +791,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M { fairLatch++; pDriverImage = Aig_NotCond((Aig_Obj_t *)Aig_Regular(Aig_ObjChild0( pObj ))->pData, Aig_ObjFaninC0(pObj)); - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -801,7 +801,7 @@ Aig_Man_t * LivenessToSafetyTransformationAbs( int mode, Abc_Ntk_t * pNtk, Aig_M #endif pObjShadowLiDriver = Aig_Or( pNew, pObjShadowLo, Aig_And( pNew, pDriverImage, pObjSaveOrSaved ) ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -892,7 +892,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt Saig_ManForEachPi( p, pObj, i ) { piCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecPis, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkPi( pNtk, i ) )); Vec_PtrPush( vecPiNames, nodeName ); @@ -903,7 +903,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt //**************************************************************** if( mode == FULL_BIERE_ONE_LOOP_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_ONE_LOOP_MODE ) { - pObjSavePi = Aig_ObjCreatePi( pNew ); + pObjSavePi = Aig_ObjCreateCi( pNew ); nodeName = "SAVE_BIERE", Vec_PtrPush( vecPiNames, nodeName ); } @@ -914,7 +914,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt Saig_ManForEachLo( p, pObj, i ) { loCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecLos, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) )); Vec_PtrPush( vecLoNames, nodeName ); @@ -926,7 +926,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt #if 0 loCreated++; - pObjSavedLo = Aig_ObjCreatePi( pNew ); + pObjSavedLo = Aig_ObjCreateCi( pNew ); Vec_PtrPush( vecLos, pObjSavedLo ); nodeName = "SAVED_LO"; Vec_PtrPush( vecLoNames, nodeName ); @@ -954,7 +954,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt //******************************************************************** Vec_PtrForEachEntry( Aig_Obj_t *, vAssertSafety, pObj, i ) { - pObj->pData = Aig_ObjCreatePo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); + pObj->pData = Aig_ObjCreateCo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); } #endif @@ -965,7 +965,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt pObjAndAcc = NULL; Vec_PtrForEachEntry( Aig_Obj_t *, vAssertSafety, pObj, i ) { - //pObj->pData = Aig_ObjCreatePo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); + //pObj->pData = Aig_ObjCreateCo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); pArgument = Aig_NotCond( (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ); if( pObjAndAcc == NULL ) pObjAndAcc = pArgument; @@ -975,14 +975,14 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt pObjAndAcc = Aig_And( pNew, pArgument, pObjAndAccDummy ); } } - Aig_ObjCreatePo( pNew, Aig_Not(pObjAndAcc) ); + Aig_ObjCreateCo( pNew, Aig_Not(pObjAndAcc) ); } else if( Vec_PtrSize( vAssertSafety ) != 0 && Vec_PtrSize( vAssumeSafety ) != 0 ) { pObjAndAcc = NULL; Vec_PtrForEachEntry( Aig_Obj_t *, vAssertSafety, pObj, i ) { - //pObj->pData = Aig_ObjCreatePo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); + //pObj->pData = Aig_ObjCreateCo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); pArgument = Aig_NotCond( (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ); if( pObjAndAcc == NULL ) pObjAndAcc = pArgument; @@ -996,7 +996,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt pObjAndAcc = NULL; Vec_PtrForEachEntry( Aig_Obj_t *, vAssumeSafety, pObj, i ) { - //pObj->pData = Aig_ObjCreatePo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); + //pObj->pData = Aig_ObjCreateCo( pNew, Aig_NotCond(Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ) ); pArgument = Aig_NotCond( (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0( pObj ) ); if( pObjAndAcc == NULL ) pObjAndAcc = pArgument; @@ -1007,7 +1007,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt } } collectiveAssumeSafety = pObjAndAcc; - Aig_ObjCreatePo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); + Aig_ObjCreateCo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); } else printf("No safety property is specified, hence no safety gate is created\n"); @@ -1021,7 +1021,7 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt if( mode == FULL_BIERE_ONE_LOOP_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_ONE_LOOP_MODE ) { - pObjSafetyPropertyOutput = Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + pObjSafetyPropertyOutput = Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); } // create register inputs for the original registers @@ -1030,15 +1030,15 @@ Aig_Man_t * LivenessToSafetyTransformationOneStepLoop( int mode, Abc_Ntk_t * pNt Saig_ManForEachLo( p, pObj, i ) { pMatch = Saig_ObjLoToLi( p, pObj ); - //Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pMatch) ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); + //Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pMatch) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); nRegCount++; liCopied++; } #if 0 // create register input corresponding to the register "saved" - pObjSavedLi = Aig_ObjCreatePo( pNew, pObjSaveOrSaved ); + pObjSavedLi = Aig_ObjCreateCo( pNew, pObjSaveOrSaved ); nRegCount++; liCreated++;7 #endif @@ -1919,7 +1919,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A Saig_ManForEachPi( p, pObj, i ) { piCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecPis, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkPi( pNtk, i ) )); Vec_PtrPush( vecPiNames, nodeName ); @@ -1930,7 +1930,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A //**************************************************************** if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { - pObjSavePi = Aig_ObjCreatePi( pNew ); + pObjSavePi = Aig_ObjCreateCi( pNew ); nodeName = "SAVE_BIERE", Vec_PtrPush( vecPiNames, nodeName ); } @@ -1941,7 +1941,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A Saig_ManForEachLo( p, pObj, i ) { loCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecLos, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) )); Vec_PtrPush( vecLoNames, nodeName ); @@ -1953,7 +1953,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { loCreated++; - pObjSavedLo = Aig_ObjCreatePi( pNew ); + pObjSavedLo = Aig_ObjCreateCi( pNew ); Vec_PtrPush( vecLos, pObjSavedLo ); nodeName = "SAVED_LO"; Vec_PtrPush( vecLoNames, nodeName ); @@ -1995,7 +1995,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A } pNegatedSafetyConjunction = Aig_Not(pObjAndAcc); if( mode == FULL_BIERE_MODE || mode == IGNORE_LIVENESS_KEEP_SAFETY_MODE ) - pObjOriginalSafetyPropertyOutput = Aig_ObjCreatePo( pNew, Aig_Not(pObjAndAcc) ); + pObjOriginalSafetyPropertyOutput = Aig_ObjCreateCo( pNew, Aig_Not(pObjAndAcc) ); } else if( Vec_PtrSize( vAssertSafety ) != 0 && Vec_PtrSize( vAssumeSafety ) != 0 ) { @@ -2016,14 +2016,14 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A collectiveAssumeSafety = pObjAndAcc; pNegatedSafetyConjunction = Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ); if( mode == FULL_BIERE_MODE || mode == IGNORE_LIVENESS_KEEP_SAFETY_MODE ) - pObjOriginalSafetyPropertyOutput = Aig_ObjCreatePo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); + pObjOriginalSafetyPropertyOutput = Aig_ObjCreateCo( pNew, Aig_And( pNew, Aig_Not(collectiveAssertSafety), collectiveAssumeSafety ) ); } else { printf("WARNING!! No safety property is found, a new (negated) constant 1 output is created\n"); pNegatedSafetyConjunction = Aig_Not( Aig_ManConst1(pNew) ); if( mode == FULL_BIERE_MODE || mode == IGNORE_LIVENESS_KEEP_SAFETY_MODE ) - pObjOriginalSafetyPropertyOutput = Aig_ObjCreatePo( pNew, Aig_Not( Aig_ManConst1(pNew) ) ); + pObjOriginalSafetyPropertyOutput = Aig_ObjCreateCo( pNew, Aig_Not( Aig_ManConst1(pNew) ) ); } } assert( pNegatedSafetyConjunction != NULL ); @@ -2042,7 +2042,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A } for( i=0; i<Vec_PtrSize( vTopASTNodeArray ); i++ ) { - pObjSafetyPropertyOutput = Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + pObjSafetyPropertyOutput = Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); Vec_PtrPush( vPoForLtlProps, pObjSafetyPropertyOutput ); } } @@ -2058,7 +2058,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A Saig_ManForEachLo( p, pObj, i ) { pMatch = Saig_ObjLoToLi( p, pObj ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); nRegCount++; liCopied++; } @@ -2069,7 +2069,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A if( mode == FULL_BIERE_MODE || mode == IGNORE_SAFETY_KEEP_LIVENESS_MODE ) { #ifndef DUPLICATE_CKT_DEBUG - pObjSavedLi = Aig_ObjCreatePo( pNew, pObjSaveOrSaved ); + pObjSavedLi = Aig_ObjCreateCo( pNew, pObjSaveOrSaved ); nRegCount++; liCreated++; @@ -2087,7 +2087,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A // if( strcmp( Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) ), "top|route0_queue1_num[0]" ) == 0 // || strcmp( Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) ), "top|route0_queue1_num[1]" ) == 0 || strcmp( Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) ), "top|route0_queue1_num[2]" ) == 0 ) { - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -2098,7 +2098,7 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A #endif pObjShadowLiDriver = Aig_Mux( pNew, pObjSaveAndNotSaved, (Aig_Obj_t *)pObj->pData, pObjShadowLo ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -2175,9 +2175,9 @@ Aig_Man_t * LivenessToSafetyTransformationWithLTL( int mode, Abc_Ntk_t * pNtk, A liveLatch++; pDriverImage = pObj; - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); pObjShadowLiDriver = Aig_Or( pNew, pObjShadowLo, Aig_And( pNew, pDriverImage, pObjSaveOrSaved ) ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; diff --git a/src/proof/live/liveness_sim.c b/src/proof/live/liveness_sim.c index c631e187..552c5204 100644 --- a/src/proof/live/liveness_sim.c +++ b/src/proof/live/liveness_sim.c @@ -82,7 +82,7 @@ static char * retrieveTruePiName( Abc_Ntk_t *pNtkOld, Aig_Man_t *pAigOld, Aig_Ma int index; assert( Saig_ObjIsPi( pAigNew, pObjPivot ) ); - Aig_ManForEachPi( pAigNew, pObj, index ) + Aig_ManForEachCi( pAigNew, pObj, index ) if( pObj == pObjPivot ) break; assert( index < Aig_ManPiNum( pAigNew ) - Aig_ManRegNum( pAigNew ) ); @@ -243,7 +243,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ Saig_ManForEachPi( p, pObj, i ) { piCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecPis, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkPi( pNtk, i ) )); Vec_PtrPush( vecPiNames, nodeName ); @@ -253,7 +253,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ // Step 4: create the special Pi corresponding to SAVE //**************************************************************** #ifndef DUPLICATE_CKT_DEBUG - pObjSavePi = Aig_ObjCreatePi( pNew ); + pObjSavePi = Aig_ObjCreateCi( pNew ); nodeName = Abc_UtilStrsav("SAVE_BIERE"), Vec_PtrPush( vecPiNames, nodeName ); #endif @@ -264,7 +264,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ Saig_ManForEachLo( p, pObj, i ) { loCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecLos, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) )); Vec_PtrPush( vecLoNames, nodeName ); @@ -275,7 +275,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ //**************************************************************** #ifndef DUPLICATE_CKT_DEBUG loCreated++; - pObjSavedLo = Aig_ObjCreatePi( pNew ); + pObjSavedLo = Aig_ObjCreateCi( pNew ); Vec_PtrPush( vecLos, pObjSavedLo ); nodeName = Abc_UtilStrsav("SAVED_LO"); Vec_PtrPush( vecLoNames, nodeName ); @@ -303,7 +303,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ // of the whole circuit, discuss with Sat/Alan for an alternative implementation //******************************************************************** #ifndef DUPLICATE_CKT_DEBUG - pObjSafetyPropertyOutput = Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + pObjSafetyPropertyOutput = Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); #endif //******************************************************************** @@ -313,7 +313,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ #ifdef DUPLICATE_CKT_DEBUG Saig_ManForEachPo( p, pObj, i ) { - Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pObj) ); + Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pObj) ); } #endif @@ -323,15 +323,15 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ Saig_ManForEachLo( p, pObj, i ) { pMatch = Saig_ObjLoToLi( p, pObj ); - //Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pMatch) ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); + //Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pMatch) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); nRegCount++; liCopied++; } // create register input corresponding to the register "saved" #ifndef DUPLICATE_CKT_DEBUG - pObjSavedLi = Aig_ObjCreatePo( pNew, pObjSaveOrSaved ); + pObjSavedLi = Aig_ObjCreateCo( pNew, pObjSaveOrSaved ); nRegCount++; liCreated++; @@ -340,7 +340,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ // create the family of shadow registers, then create the cascade of Xnor and And gates for the comparator Saig_ManForEachLo( p, pObj, i ) { - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -350,7 +350,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ #endif pObjShadowLiDriver = Aig_Mux( pNew, pObjSavePi, (Aig_Obj_t *)pObj->pData, pObjShadowLo ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -380,7 +380,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ //Aig_ObjPrint( pNew, pObj ); liveLatch++; pDriverImage = Aig_NotCond((Aig_Obj_t *)Aig_Regular(Aig_ObjChild0( pObj ))->pData, Aig_ObjFaninC0(pObj)); - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -391,7 +391,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ pObjShadowLiDriver = Aig_Or( pNew, Aig_Mux(pNew, pObjSavePi, Aig_Not(Aig_ManConst1(pNew)), pObjShadowLo), Aig_And( pNew, pDriverImage, pObjSaveOrSaved ) ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -421,7 +421,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ fairLatch++; //assert( Aig_ObjIsNode( Aig_ObjChild0( pObj ) ) ); pDriverImage = Aig_NotCond((Aig_Obj_t *)Aig_Regular(Aig_ObjChild0( pObj ))->pData, Aig_ObjFaninC0(pObj)); - pObjShadowLo = Aig_ObjCreatePi( pNew ); + pObjShadowLo = Aig_ObjCreateCi( pNew ); #ifdef PROPAGATE_NAMES Vec_PtrPush( vecLos, pObjShadowLo ); @@ -432,7 +432,7 @@ static Aig_Man_t * LivenessToSafetyTransformationSim( Abc_Ntk_t * pNtk, Aig_Man_ pObjShadowLiDriver = Aig_Or( pNew, Aig_Mux(pNew, pObjSavePi, Aig_Not(Aig_ManConst1(pNew)), pObjShadowLo), Aig_And( pNew, pDriverImage, pObjSaveOrSaved ) ); - pObjShadowLi = Aig_ObjCreatePo( pNew, pObjShadowLiDriver ); + pObjShadowLi = Aig_ObjCreateCo( pNew, pObjShadowLiDriver ); nRegCount++; loCreated++; liCreated++; @@ -520,7 +520,7 @@ static Aig_Man_t * LivenessToSafetyTransformationOneStepLoopSim( Abc_Ntk_t * pNt Saig_ManForEachPi( p, pObj, i ) { piCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecPis, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkPi( pNtk, i ) )); Vec_PtrPush( vecPiNames, nodeName ); @@ -529,7 +529,7 @@ static Aig_Man_t * LivenessToSafetyTransformationOneStepLoopSim( Abc_Ntk_t * pNt //**************************************************************** // Step 4: create the special Pi corresponding to SAVE //**************************************************************** - pObjSavePi = Aig_ObjCreatePi( pNew ); + pObjSavePi = Aig_ObjCreateCi( pNew ); nodeName = "SAVE_BIERE", Vec_PtrPush( vecPiNames, nodeName ); @@ -539,7 +539,7 @@ static Aig_Man_t * LivenessToSafetyTransformationOneStepLoopSim( Abc_Ntk_t * pNt Saig_ManForEachLo( p, pObj, i ) { loCopied++; - pObj->pData = Aig_ObjCreatePi(pNew); + pObj->pData = Aig_ObjCreateCi(pNew); Vec_PtrPush( vecLos, pObj->pData ); nodeName = Abc_UtilStrsav(Abc_ObjName( Abc_NtkCi( pNtk, Abc_NtkPiNum(pNtk) + i ) )); Vec_PtrPush( vecLoNames, nodeName ); @@ -551,7 +551,7 @@ static Aig_Man_t * LivenessToSafetyTransformationOneStepLoopSim( Abc_Ntk_t * pNt #if 0 loCreated++; - pObjSavedLo = Aig_ObjCreatePi( pNew ); + pObjSavedLo = Aig_ObjCreateCi( pNew ); Vec_PtrPush( vecLos, pObjSavedLo ); nodeName = "SAVED_LO"; Vec_PtrPush( vecLoNames, nodeName ); @@ -579,7 +579,7 @@ static Aig_Man_t * LivenessToSafetyTransformationOneStepLoopSim( Abc_Ntk_t * pNt // of the whole circuit, discuss with Sat/Alan for an alternative implementation //******************************************************************** - pObjSafetyPropertyOutput = Aig_ObjCreatePo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); + pObjSafetyPropertyOutput = Aig_ObjCreateCo( pNew, (Aig_Obj_t *)Aig_ObjFanin0(pObj)->pData ); // create register inputs for the original registers nRegCount = 0; @@ -587,15 +587,15 @@ static Aig_Man_t * LivenessToSafetyTransformationOneStepLoopSim( Abc_Ntk_t * pNt Saig_ManForEachLo( p, pObj, i ) { pMatch = Saig_ObjLoToLi( p, pObj ); - //Aig_ObjCreatePo( pNew, Aig_ObjChild0Copy(pMatch) ); - Aig_ObjCreatePo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); + //Aig_ObjCreateCo( pNew, Aig_ObjChild0Copy(pMatch) ); + Aig_ObjCreateCo( pNew, Aig_NotCond((Aig_Obj_t *)Aig_ObjFanin0(pMatch)->pData, Aig_ObjFaninC0( pMatch ) ) ); nRegCount++; liCopied++; } #if 0 // create register input corresponding to the register "saved" - pObjSavedLi = Aig_ObjCreatePo( pNew, pObjSaveOrSaved ); + pObjSavedLi = Aig_ObjCreateCo( pNew, pObjSaveOrSaved ); nRegCount++; liCreated++; #endif diff --git a/src/proof/llb/llb1Constr.c b/src/proof/llb/llb1Constr.c index 67fb30ba..4ce911db 100644 --- a/src/proof/llb/llb1Constr.c +++ b/src/proof/llb/llb1Constr.c @@ -236,7 +236,7 @@ DdManager * Llb_ManConstructGlobalBdds( Aig_Man_t * p ) Cudd_AutodynEnable( dd, CUDD_REORDER_SYMM_SIFT ); pObj = Aig_ManConst1(p); pObj->pData = Cudd_ReadOne(dd); Cudd_Ref( (DdNode *)pObj->pData ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) { pObj->pData = Cudd_bddIthVar(dd, i); Cudd_Ref( (DdNode *)pObj->pData ); } @@ -246,7 +246,7 @@ DdManager * Llb_ManConstructGlobalBdds( Aig_Man_t * p ) bBdd1 = Cudd_NotCond( (DdNode *)Aig_ObjFanin1(pObj)->pData, Aig_ObjFaninC1(pObj) ); pObj->pData = Cudd_bddAnd( dd, bBdd0, bBdd1 ); Cudd_Ref( (DdNode *)pObj->pData ); } - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { pObj->pData = Cudd_NotCond( (DdNode *)Aig_ObjFanin0(pObj)->pData, Aig_ObjFaninC0(pObj) ); Cudd_Ref( (DdNode *)pObj->pData ); } diff --git a/src/proof/llb/llb1Hint.c b/src/proof/llb/llb1Hint.c index f68030ff..6e705a38 100644 --- a/src/proof/llb/llb1Hint.c +++ b/src/proof/llb/llb1Hint.c @@ -46,7 +46,7 @@ int Llb_ManMaxFanoutCi( Aig_Man_t * pAig ) { Aig_Obj_t * pObj; int i, WeightMax = -ABC_INFINITY, iInput = -1; - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) if ( WeightMax < Aig_ObjRefs(pObj) ) { WeightMax = Aig_ObjRefs(pObj); diff --git a/src/proof/llb/llb1Pivot.c b/src/proof/llb/llb1Pivot.c index 688060bc..7a5bb66f 100644 --- a/src/proof/llb/llb1Pivot.c +++ b/src/proof/llb/llb1Pivot.c @@ -154,7 +154,7 @@ void Llb_ManLabelLiCones( Aig_Man_t * p ) int i; // mark const and PIs Aig_ManConst1(p)->fMarkB = 1; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->fMarkB = 1; // mark cones Saig_ManForEachLi( p, pObj, i ) @@ -223,7 +223,7 @@ Vec_Int_t * Llb_ManMarkPivotNodes( Aig_Man_t * p, int fUseInternal ) Aig_Obj_t * pObj; int i; // mark inputs/outputs - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->fMarkA = 1; Saig_ManForEachLi( p, pObj, i ) pObj->fMarkA = 1; @@ -235,7 +235,7 @@ Vec_Int_t * Llb_ManMarkPivotNodes( Aig_Man_t * p, int fUseInternal ) // assign variable numbers Aig_ManConst1(p)->fMarkA = 0; vVar2Obj = Vec_IntAlloc( 100 ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Vec_IntPush( vVar2Obj, Aig_ObjId(pObj) ); Aig_ManForEachNode( p, pObj, i ) if ( pObj->fMarkA ) diff --git a/src/proof/llb/llb1Reach.c b/src/proof/llb/llb1Reach.c index 722a8342..d8c667ae 100644 --- a/src/proof/llb/llb1Reach.c +++ b/src/proof/llb/llb1Reach.c @@ -430,7 +430,7 @@ DdNode * Llb_ManCreateConstraints( Llb_Man_t * p, Vec_Int_t * vHints, int fUseNs // transfer them to the global AIG Aig_ManCleanData( p->pAigGlo ); Aig_ManConst1( p->pAigGlo )->pData = Cudd_ReadOne( p->dd ); - Aig_ManForEachPi( p->pAigGlo, pObj, i ) + Aig_ManForEachCi( p->pAigGlo, pObj, i ) pObj->pData = Aig_ManPi(p->pAig, i)->pData; // derive consraints bConstr = Cudd_ReadOne( p->dd ); Cudd_Ref( bConstr ); diff --git a/src/proof/llb/llb2Flow.c b/src/proof/llb/llb2Flow.c index 544d7c04..295f0bfe 100644 --- a/src/proof/llb/llb2Flow.c +++ b/src/proof/llb/llb2Flow.c @@ -960,7 +960,7 @@ void Llb_ManFlowPrepareCut( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUppe } // clean PIs and const Aig_ManConst1(p)->fMarkB = 0; - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->fMarkB = 0; // clean upper cut //printf( "Upper: "); @@ -1077,7 +1077,7 @@ Vec_Ptr_t * Llb_ManComputeCutLo( Aig_Man_t * p ) Aig_Obj_t * pObj; int i; vMinCut = Vec_PtrAlloc( 100 ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Vec_PtrPush( vMinCut, pObj ); return vMinCut; } diff --git a/src/proof/llb/llb3Nonlin.c b/src/proof/llb/llb3Nonlin.c index d28edecc..678a6fff 100644 --- a/src/proof/llb/llb3Nonlin.c +++ b/src/proof/llb/llb3Nonlin.c @@ -712,7 +712,7 @@ Llb_Mnn_t * Llb_MnnStart( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * p p->vRings = Vec_PtrAlloc( 100 ); // create leaves p->vLeaves = Vec_PtrAlloc( Aig_ManPiNum(pAig) ); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) Vec_PtrPush( p->vLeaves, pObj ); // create roots p->vRoots = Vec_PtrAlloc( Aig_ManPoNum(pAig) ); @@ -723,7 +723,7 @@ Llb_Mnn_t * Llb_MnnStart( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * p p->pOrderL2= ABC_CALLOC( int, Aig_ManObjNumMax(pAig) ); p->pOrderG = ABC_CALLOC( int, Aig_ManObjNumMax(pAig) ); p->pVars2Q = ABC_CALLOC( int, Aig_ManObjNumMax(pAig) ); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) p->pVars2Q[Aig_ObjId(pObj)] = 1; for ( i = 0; i < Aig_ManObjNumMax(pAig); i++ ) p->pOrderL[i] = p->pOrderL2[i] = p->pOrderG[i] = i; diff --git a/src/proof/llb/llb4Cex.c b/src/proof/llb/llb4Cex.c index 3a1c96e5..69ba6ab1 100644 --- a/src/proof/llb/llb4Cex.c +++ b/src/proof/llb/llb4Cex.c @@ -230,7 +230,7 @@ Vec_Ptr_t * Llb4_Nonlin4VerifyCex( Aig_Man_t * pAig, Abc_Cex_t * p ) Aig_ManForEachNode( pAig, pObj, k ) pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) & (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj)); - Aig_ManForEachPo( pAig, pObj, k ) + Aig_ManForEachCo( pAig, pObj, k ) pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj); if ( i == p->iFrame ) break; diff --git a/src/proof/llb/llb4Cluster.c b/src/proof/llb/llb4Cluster.c index 8d29eed4..c151a618 100644 --- a/src/proof/llb/llb4Cluster.c +++ b/src/proof/llb/llb4Cluster.c @@ -94,20 +94,20 @@ Vec_Int_t * Llb_Nonlin4FindOrder( Aig_Man_t * pAig, int * pCounter ) Aig_ManForEachNode( pAig, pObj, i ) if ( Aig_ObjLevel(pObj) > 3 ) pObj->fMarkA = 1; - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) Aig_ObjFanin0(pObj)->fMarkA = 0; // collect nodes in the order vOrder = Vec_IntStartFull( Aig_ManObjNumMax(pAig) ); Aig_ManIncrementTravId( pAig ); Aig_ObjSetTravIdCurrent( pAig, Aig_ManConst1(pAig) ); -// Aig_ManForEachPo( pAig, pObj, i ) +// Aig_ManForEachCo( pAig, pObj, i ) Saig_ManForEachLi( pAig, pObj, i ) { Vec_IntWriteEntry( vOrder, Aig_ObjId(pObj), Counter++ ); Llb_Nonlin4FindOrder_rec( pAig, Aig_ObjFanin0(pObj), vOrder, &Counter ); } - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) if ( Llb_ObjBddVar(vOrder, pObj) < 0 ) Vec_IntWriteEntry( vOrder, Aig_ObjId(pObj), Counter++ ); Aig_ManCleanMarkA( pAig ); @@ -232,7 +232,7 @@ Vec_Int_t * Llb_Nonlin4FindVars2Q( DdManager * dd, Aig_Man_t * pAig, Vec_Int_t * Vec_IntFill( vVars2Q, Cudd_ReadSize(dd), 1 ); Saig_ManForEachLo( pAig, pObj, i ) Vec_IntWriteEntry( vVars2Q, Llb_ObjBddVar(vOrder, pObj), 0 ); -// Aig_ManForEachPo( pAig, pObj, i ) +// Aig_ManForEachCo( pAig, pObj, i ) Saig_ManForEachLi( pAig, pObj, i ) Vec_IntWriteEntry( vVars2Q, Llb_ObjBddVar(vOrder, pObj), 0 ); return vVars2Q; diff --git a/src/proof/llb/llb4Nonlin.c b/src/proof/llb/llb4Nonlin.c index 6442d62e..31f94acf 100644 --- a/src/proof/llb/llb4Nonlin.c +++ b/src/proof/llb/llb4Nonlin.c @@ -81,7 +81,7 @@ DdNode * Llb_Nonlin4ComputeBad( DdManager * dd, Aig_Man_t * pAig, Vec_Int_t * vO Aig_ManCleanData( pAig ); // assign elementary variables Aig_ManConst1(pAig)->pData = Cudd_ReadOne(dd); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) pObj->pData = Cudd_bddIthVar( dd, Llb_ObjBddVar(vOrder, pObj) ); // compute internal nodes vNodes = Aig_ManDfsNodes( pAig, (Aig_Obj_t **)Vec_PtrArray(pAig->vPos), Saig_ManPoNum(pAig) ); @@ -171,7 +171,7 @@ Vec_Ptr_t * Llb_Nonlin4DerivePartitions( DdManager * dd, Aig_Man_t * pAig, Vec_I Aig_ManCleanData( pAig ); // assign elementary variables Aig_ManConst1(pAig)->pData = Cudd_ReadOne(dd); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) pObj->pData = Cudd_bddIthVar( dd, Llb_ObjBddVar(vOrder, pObj) ); Aig_ManForEachNode( pAig, pObj, i ) if ( Llb_ObjBddVar(vOrder, pObj) >= 0 ) @@ -248,7 +248,7 @@ Vec_Int_t * Llb_Nonlin4CreateOrderSimple( Aig_Man_t * pAig ) Aig_Obj_t * pObj; int i, Counter = 0; vOrder = Vec_IntStartFull( Aig_ManObjNumMax(pAig) ); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) Vec_IntWriteEntry( vOrder, Aig_ObjId(pObj), Counter++ ); Saig_ManForEachLi( pAig, pObj, i ) Vec_IntWriteEntry( vOrder, Aig_ObjId(pObj), Counter++ ); @@ -364,7 +364,7 @@ printf( "Techmapping added %d pivots.\n", Vec_IntSize(vNodes) ); Vec_IntWriteEntry( vOrder, Aig_ObjId(pObj), Counter++ ); Llb_Nonlin4CreateOrder_rec( pAig, Aig_ObjFanin0(pObj), vOrder, &Counter ); } - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) if ( Llb_ObjBddVar(vOrder, pObj) < 0 ) { // if ( Saig_ObjIsLo(pAig, pObj) ) diff --git a/src/proof/llb/llb4Sweep.c b/src/proof/llb/llb4Sweep.c index d13c366f..292fb176 100644 --- a/src/proof/llb/llb4Sweep.c +++ b/src/proof/llb/llb4Sweep.c @@ -92,12 +92,12 @@ Vec_Int_t * Llb_Nonlin4SweepOrder( Aig_Man_t * pAig, int * pCounter, int fSaveAl vOrder = Vec_IntStartFull( Aig_ManObjNumMax(pAig) ); Aig_ManIncrementTravId( pAig ); Aig_ObjSetTravIdCurrent( pAig, Aig_ManConst1(pAig) ); - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) { Vec_IntWriteEntry( vOrder, Aig_ObjId(pObj), Counter++ ); Llb_Nonlin4SweepOrder_rec( pAig, Aig_ObjFanin0(pObj), vOrder, &Counter, fSaveAll ); } - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) if ( Llb_ObjBddVar(vOrder, pObj) < 0 ) Vec_IntWriteEntry( vOrder, Aig_ObjId(pObj), Counter++ ); // assert( Counter == Aig_ManObjNum(pAig) - 1 ); // no dangling nodes @@ -127,7 +127,7 @@ int Llb4_Nonlin4SweepCutpoints( Aig_Man_t * pAig, Vec_Int_t * vOrder, int nBddLi dd = Cudd_Init( Aig_ManObjNumMax(pAig), 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 ); // assign elementary variables Aig_ManCleanData( pAig ); - Aig_ManForEachPi( pAig, pObj, i ) + Aig_ManForEachCi( pAig, pObj, i ) pObj->pData = Cudd_bddIthVar( dd, Llb_ObjBddVar(vOrder, pObj) ); // sweep internal nodes Aig_ManForEachNode( pAig, pObj, i ) diff --git a/src/proof/pdr/pdrClass.c b/src/proof/pdr/pdrClass.c index 4b28c196..cbe5e1c2 100644 --- a/src/proof/pdr/pdrClass.c +++ b/src/proof/pdr/pdrClass.c @@ -55,8 +55,8 @@ Aig_Man_t * Pdr_ManRehashWithMap( Aig_Man_t * pAig, Vec_Int_t * vMap ) // create CI mapping Aig_ManCleanData( pAig ); Aig_ManConst1(pAig)->pData = Aig_ManConst1(pFrames); - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi(pFrames); + Aig_ManForEachCi( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCi(pFrames); Saig_ManForEachLo( pAig, pObj, i ) { iReg = Vec_IntEntry(vMap, i); @@ -69,8 +69,8 @@ Aig_Man_t * Pdr_ManRehashWithMap( Aig_Man_t * pAig, Vec_Int_t * vMap ) Aig_ManForEachNode( pAig, pObj, i ) pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); // add output nodes - Aig_ManForEachPo( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePo( pFrames, Aig_ObjChild0Copy(pObj) ); + Aig_ManForEachCo( pAig, pObj, i ) + pObj->pData = Aig_ObjCreateCo( pFrames, Aig_ObjChild0Copy(pObj) ); // finish off Aig_ManCleanup( pFrames ); Aig_ManSetRegNum( pFrames, Aig_ManRegNum(pAig) ); diff --git a/src/proof/ssw/sswAig.c b/src/proof/ssw/sswAig.c index 8ab99f83..5cdced62 100644 --- a/src/proof/ssw/sswAig.c +++ b/src/proof/ssw/sswAig.c @@ -120,13 +120,13 @@ static inline void Ssw_FramesConstrainNode( Ssw_Man_t * p, Aig_Man_t * pFrames, // add the constraint if ( fTwoPos ) { - Aig_ObjCreatePo( pFrames, pObjNew2 ); - Aig_ObjCreatePo( pFrames, pObjNew ); + Aig_ObjCreateCo( pFrames, pObjNew2 ); + Aig_ObjCreateCo( pFrames, pObjNew ); } else { pMiter = Aig_Exor( pFrames, pObjNew, pObjNew2 ); - Aig_ObjCreatePo( pFrames, Aig_NotCond(pMiter, Aig_ObjPhaseReal(pMiter)) ); + Aig_ObjCreateCo( pFrames, Aig_NotCond(pMiter, Aig_ObjPhaseReal(pMiter)) ); } } @@ -155,7 +155,7 @@ Aig_Man_t * Ssw_FramesWithClasses( Ssw_Man_t * p ) pFrames = Aig_ManStart( Aig_ManObjNumMax(p->pAig) * p->nFrames ); // create latches for the first frame Saig_ManForEachLo( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreatePi(pFrames) ); + Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreateCi(pFrames) ); // add timeframes iLits = 0; for ( f = 0; f < p->pPars->nFramesK; f++ ) @@ -164,7 +164,7 @@ Aig_Man_t * Ssw_FramesWithClasses( Ssw_Man_t * p ) Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePi(pFrames); + pObjNew = Aig_ObjCreateCi(pFrames); pObjNew->fPhase = (p->vInits != NULL) && Vec_IntEntry(p->vInits, iLits++); Ssw_ObjSetFrame( p, pObj, f, pObjNew ); } @@ -179,7 +179,7 @@ Aig_Man_t * Ssw_FramesWithClasses( Ssw_Man_t * p ) Ssw_FramesConstrainNode( p, pFrames, p->pAig, pObj, f, 1 ); } // transfer to the primary outputs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) Ssw_ObjSetFrame( p, pObj, f, Ssw_ObjChild0Fra(p, pObj,f) ); // transfer latch input to the latch outputs Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i ) @@ -188,7 +188,7 @@ Aig_Man_t * Ssw_FramesWithClasses( Ssw_Man_t * p ) assert( p->vInits == NULL || Vec_IntSize(p->vInits) == iLits + Saig_ManPiNum(p->pAig) ); // add the POs for the latch outputs of the last frame Saig_ManForEachLo( p->pAig, pObj, i ) - Aig_ObjCreatePo( pFrames, Ssw_ObjFrame( p, pObj, p->pPars->nFramesK ) ); + Aig_ObjCreateCo( pFrames, Ssw_ObjFrame( p, pObj, p->pPars->nFramesK ) ); // remove dangling nodes Aig_ManCleanup( pFrames ); @@ -225,10 +225,10 @@ Aig_Man_t * Ssw_SpeculativeReduction( Ssw_Man_t * p ) // map constants and PIs Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), 0, Aig_ManConst1(pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreatePi(pFrames) ); + Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreateCi(pFrames) ); // create latches for the first frame Saig_ManForEachLo( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreatePi(pFrames) ); + Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreateCi(pFrames) ); // set the constraints on the latch outputs Saig_ManForEachLo( p->pAig, pObj, i ) Ssw_FramesConstrainNode( p, pFrames, p->pAig, pObj, 0, 0 ); @@ -241,7 +241,7 @@ Aig_Man_t * Ssw_SpeculativeReduction( Ssw_Man_t * p ) } // add the POs for the latch outputs of the last frame Saig_ManForEachLi( p->pAig, pObj, i ) - Aig_ObjCreatePo( pFrames, Ssw_ObjChild0Fra(p, pObj,0) ); + Aig_ObjCreateCo( pFrames, Ssw_ObjChild0Fra(p, pObj,0) ); // remove dangling nodes Aig_ManCleanup( pFrames ); Aig_ManSetRegNum( pFrames, Aig_ManRegNum(p->pAig) ); diff --git a/src/proof/ssw/sswBmc.c b/src/proof/ssw/sswBmc.c index 8cb14f4a..0eabaa92 100644 --- a/src/proof/ssw/sswBmc.c +++ b/src/proof/ssw/sswBmc.c @@ -50,7 +50,7 @@ Aig_Obj_t * Ssw_BmcUnroll_rec( Ssw_Frm_t * pFrm, Aig_Obj_t * pObj, int f ) if ( Aig_ObjIsConst1(pObj) ) pRes = Aig_ManConst1( pFrm->pFrames ); else if ( Saig_ObjIsPi(pFrm->pAig, pObj) ) - pRes = Aig_ObjCreatePi( pFrm->pFrames ); + pRes = Aig_ObjCreateCi( pFrm->pFrames ); else if ( Aig_ObjIsPo(pObj) ) { Ssw_BmcUnroll_rec( pFrm, Aig_ObjFanin0(pObj), f ); diff --git a/src/proof/ssw/sswConstr.c b/src/proof/ssw/sswConstr.c index 239e35b9..6d8a152d 100644 --- a/src/proof/ssw/sswConstr.c +++ b/src/proof/ssw/sswConstr.c @@ -63,19 +63,19 @@ Aig_Man_t * Ssw_FramesWithConstraints( Aig_Man_t * p, int nFrames ) // map constants and PIs Aig_ObjSetCopy( Aig_ManConst1(p), Aig_ManConst1(pFrames) ); Saig_ManForEachPi( p, pObj, i ) - Aig_ObjSetCopy( pObj, Aig_ObjCreatePi(pFrames) ); + Aig_ObjSetCopy( pObj, Aig_ObjCreateCi(pFrames) ); // add internal nodes of this frame Aig_ManForEachNode( p, pObj, i ) Aig_ObjSetCopy( pObj, Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ) ); // transfer to the primary output - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ObjSetCopy( pObj, Aig_ObjChild0Copy(pObj) ); // create constraint outputs Saig_ManForEachPo( p, pObj, i ) { if ( i < Saig_ManPoNum(p) - Saig_ManConstrNum(p) ) continue; - Aig_ObjCreatePo( pFrames, Aig_Not( Aig_ObjCopy(pObj) ) ); + Aig_ObjCreateCo( pFrames, Aig_Not( Aig_ObjCopy(pObj) ) ); } // transfer latch inputs to the latch outputs Saig_ManForEachLiLo( p, pObjLi, pObjLo, i ) @@ -125,10 +125,10 @@ int Ssw_ManSetConstrPhases( Aig_Man_t * p, int nFrames, Vec_Int_t ** pvInits ) if ( RetValue == l_True && pvInits ) { *pvInits = Vec_IntAlloc( 1000 ); - Aig_ManForEachPi( pFrames, pObj, i ) + Aig_ManForEachCi( pFrames, pObj, i ) Vec_IntPush( *pvInits, sat_solver_var_value(pSat, pCnf->pVarNums[Aig_ObjId(pObj)]) ); -// Aig_ManForEachPi( pFrames, pObj, i ) +// Aig_ManForEachCi( pFrames, pObj, i ) // printf( "%d", Vec_IntEntry(*pvInits, i) ); // printf( "\n" ); } @@ -268,7 +268,7 @@ void Ssw_ManRefineByConstrSim( Ssw_Man_t * p ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) ); // assign the COs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ); // check the outputs Saig_ManForEachPo( p->pAig, pObj, i ) @@ -424,7 +424,7 @@ clk = clock(); Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePi(p->pFrames); + pObjNew = Aig_ObjCreateCi(p->pFrames); pObjNew->fPhase = Vec_IntEntry( p->vInits, iLits++ ); Ssw_ObjSetFrame( p, pObj, f, pObjNew ); } @@ -464,7 +464,7 @@ clk = clock(); if ( f == p->pPars->nFramesK - 1 ) break; // transfer latch input to the latch outputs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) Ssw_ObjSetFrame( p, pObj, f, Ssw_ObjChild0Fra(p, pObj, f) ); // build logic cones for register outputs Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i ) @@ -514,7 +514,7 @@ clk = clock(); Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePi(p->pFrames); + pObjNew = Aig_ObjCreateCi(p->pFrames); pObjNew->fPhase = Vec_IntEntry( p->vInits, iLits++ ); Ssw_ObjSetFrame( p, pObj, f, pObjNew ); } @@ -544,7 +544,7 @@ clk = clock(); if ( f == p->pPars->nFramesK - 1 ) break; // transfer latch input to the latch outputs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) Ssw_ObjSetFrame( p, pObj, f, Ssw_ObjChild0Fra(p, pObj, f) ); // build logic cones for register outputs Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i ) @@ -648,7 +648,7 @@ clk = clock(); Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePi(p->pFrames); + pObjNew = Aig_ObjCreateCi(p->pFrames); pObjNew->fPhase = (p->vInits != NULL) && Vec_IntEntry(p->vInits, iLits++); Ssw_ObjSetFrame( p, pObj, f, pObjNew ); } diff --git a/src/proof/ssw/sswDyn.c b/src/proof/ssw/sswDyn.c index d9a16e22..0f6002fa 100644 --- a/src/proof/ssw/sswDyn.c +++ b/src/proof/ssw/sswDyn.c @@ -215,7 +215,7 @@ void Ssw_ManSweepTransferDyn( Ssw_Man_t * p ) int i, f, nFrames; // transfer simulation information - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) { pObjFraig = Ssw_ObjFrame( p, pObj, 0 ); if ( pObjFraig == Aig_ManConst0(p->pFrames) ) @@ -385,7 +385,7 @@ clk = clock(); f = p->pPars->nFramesK; Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreatePi(p->pFrames) ); + Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreateCi(p->pFrames) ); Aig_ManSetPioNumbers( p->pFrames ); // label nodes corresponding to primary inputs Ssw_ManLabelPiNodes( p ); diff --git a/src/proof/ssw/sswFilter.c b/src/proof/ssw/sswFilter.c index 4f6fb26e..536316ff 100644 --- a/src/proof/ssw/sswFilter.c +++ b/src/proof/ssw/sswFilter.c @@ -65,7 +65,7 @@ void Ssw_ManRefineByFilterSim( Ssw_Man_t * p, int nFrames ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) ); // assign the COs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ); // transfer if ( f == 0 ) @@ -115,7 +115,7 @@ void Ssw_ManRollForward( Ssw_Man_t * p, int nFrames ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) ); // assign the COs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ); } // record the new pattern @@ -157,7 +157,7 @@ void Ssw_ManFindStartingState( Ssw_Man_t * p, Abc_Cex_t * pCex ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) ); // assign the COs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ); } assert( iBit == pCex->nBits ); @@ -317,7 +317,7 @@ int Ssw_ManSweepBmcFilter( Ssw_Man_t * p, int TimeLimit ) Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) { - pObjNew = Aig_ObjCreatePi(p->pFrames); + pObjNew = Aig_ObjCreateCi(p->pFrames); Ssw_ObjSetFrame( p, pObj, f, pObjNew ); } // sweep internal nodes @@ -351,7 +351,7 @@ int Ssw_ManSweepBmcFilter( Ssw_Man_t * p, int TimeLimit ) if ( TimeLimit && ((float)TimeLimit <= (float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC)) ) break; // transfer latch input to the latch outputs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) Ssw_ObjSetFrame( p, pObj, f, Ssw_ObjChild0Fra(p, pObj, f) ); // build logic cones for register outputs Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i ) diff --git a/src/proof/ssw/sswIslands.c b/src/proof/ssw/sswIslands.c index ca95cf23..3173ec6f 100644 --- a/src/proof/ssw/sswIslands.c +++ b/src/proof/ssw/sswIslands.c @@ -90,7 +90,7 @@ void Ssw_MatchingStart( Aig_Man_t * p0, Aig_Man_t * p1, Vec_Int_t * vPairs ) assert( pObj1->pData == pObj0 ); } // make sure the POs are not matched - Aig_ManForEachPo( p0, pObj0, i ) + Aig_ManForEachCo( p0, pObj0, i ) { pObj1 = Aig_ManPo( p1, i ); assert( pObj0->pData == NULL ); @@ -295,7 +295,7 @@ void Ssw_MatchingComplete( Aig_Man_t * p0, Aig_Man_t * p1 ) { if ( pObj0->pData != NULL ) continue; - pObj1 = Aig_ObjCreatePi( p1 ); + pObj1 = Aig_ObjCreateCi( p1 ); pObj0->pData = pObj1; pObj1->pData = pObj0; Vec_PtrPush( vNewLis, pObj0Li ); @@ -311,7 +311,7 @@ void Ssw_MatchingComplete( Aig_Man_t * p0, Aig_Man_t * p1 ) } // create register outputs in p0 that are absent in p1 Vec_PtrForEachEntry( Aig_Obj_t *, vNewLis, pObj0Li, i ) - Aig_ObjCreatePo( p1, Aig_ObjChild0Copy(pObj0Li) ); + Aig_ObjCreateCo( p1, Aig_ObjChild0Copy(pObj0Li) ); // increment the number of registers Aig_ManSetRegNum( p1, Aig_ManRegNum(p1) + Vec_PtrSize(vNewLis) ); Vec_PtrFree( vNewLis ); diff --git a/src/proof/ssw/sswLcorr.c b/src/proof/ssw/sswLcorr.c index ce9c2563..c41a74ef 100644 --- a/src/proof/ssw/sswLcorr.c +++ b/src/proof/ssw/sswLcorr.c @@ -49,7 +49,7 @@ void Ssw_ManSweepTransfer( Ssw_Man_t * p ) unsigned * pInfo; int i; // transfer simulation information - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) { pObjFraig = Ssw_ObjFrame( p, pObj, 0 ); if ( pObjFraig == Aig_ManConst0(p->pFrames) ) @@ -245,7 +245,7 @@ int Ssw_ManSweepLatch( Ssw_Man_t * p ) // map constants and PIs Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), 0, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreatePi(p->pFrames) ); + Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreateCi(p->pFrames) ); // implement equivalence classes Saig_ManForEachLo( p->pAig, pObj, i ) @@ -253,7 +253,7 @@ int Ssw_ManSweepLatch( Ssw_Man_t * p ) pRepr = Aig_ObjRepr( p->pAig, pObj ); if ( pRepr == NULL ) { - pTemp = Aig_ObjCreatePi(p->pFrames); + pTemp = Aig_ObjCreateCi(p->pFrames); pTemp->pData = pObj; } else diff --git a/src/proof/ssw/sswRarity.c b/src/proof/ssw/sswRarity.c index 25a80be7..6e36ae12 100644 --- a/src/proof/ssw/sswRarity.c +++ b/src/proof/ssw/sswRarity.c @@ -587,7 +587,7 @@ void Ssw_RarManSimulate( Ssw_RarMan_t * p, Vec_Int_t * vInit, int fUpdate, int f Aig_ManIncrementTravId( p->pAig ); // check comb inputs if ( fUpdate ) - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) { pRepr = Aig_ObjRepr(p->pAig, pObj); if ( pRepr == NULL || Aig_ObjIsTravIdCurrent( p->pAig, pRepr ) ) @@ -631,7 +631,7 @@ void Ssw_RarManSimulate( Ssw_RarMan_t * p, Vec_Int_t * vInit, int fUpdate, int f } } // transfer to POs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) { pSim = Ssw_RarObjSim( p, Aig_ObjId(pObj) ); pSim0 = Ssw_RarObjSim( p, Aig_ObjFaninId0(pObj) ); @@ -826,7 +826,7 @@ static Vec_Int_t * Ssw_RarFindStartingState( Aig_Man_t * pAig, Abc_Cex_t * pCex pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) ); // assign the COs - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ); } assert( iBit == pCex->nBits ); diff --git a/src/proof/ssw/sswRarity2.c b/src/proof/ssw/sswRarity2.c index ac22b0d5..dce7ac3e 100644 --- a/src/proof/ssw/sswRarity2.c +++ b/src/proof/ssw/sswRarity2.c @@ -277,7 +277,7 @@ static Vec_Int_t * Ssw_RarFindStartingState( Aig_Man_t * pAig, Abc_Cex_t * pCex pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ) & ( Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj) ); // assign the COs - Aig_ManForEachPo( pAig, pObj, i ) + Aig_ManForEachCo( pAig, pObj, i ) pObj->fMarkB = ( Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj) ); } assert( iBit == pCex->nBits ); diff --git a/src/proof/ssw/sswSemi.c b/src/proof/ssw/sswSemi.c index ec50ab50..a04f6f54 100644 --- a/src/proof/ssw/sswSemi.c +++ b/src/proof/ssw/sswSemi.c @@ -198,7 +198,7 @@ clk = clock(); // map constants and PIs Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreatePi(p->pFrames) ); + Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreateCi(p->pFrames) ); // sweep internal nodes Aig_ManForEachNode( p->pAig, pObj, i ) { diff --git a/src/proof/ssw/sswSim.c b/src/proof/ssw/sswSim.c index 9ce89a71..946224cd 100644 --- a/src/proof/ssw/sswSim.c +++ b/src/proof/ssw/sswSim.c @@ -458,7 +458,7 @@ int * Ssw_SmlCheckOutputSavePattern( Ssw_Sml_t * p, Aig_Obj_t * pObjPo ) BestPat = i * 32 + k; // fill in the counter-example data pModel = ABC_ALLOC( int, Aig_ManPiNum(p->pAig)+1 ); - Aig_ManForEachPi( p->pAig, pObjPi, i ) + Aig_ManForEachCi( p->pAig, pObjPi, i ) { pModel[i] = Abc_InfoHasBit(Ssw_ObjSim(p, pObjPi->Id), BestPat); // printf( "%d", pModel[i] ); @@ -486,7 +486,7 @@ int * Ssw_SmlCheckOutput( Ssw_Sml_t * p ) // make sure the reference simulation pattern does not detect the bug pObj = Aig_ManPo( p->pAig, 0 ); assert( Aig_ObjFanin0(pObj)->fPhase == (unsigned)Aig_ObjFaninC0(pObj) ); - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) { if ( !Ssw_SmlObjIsConstWord( p, Aig_ObjFanin0(pObj) ) ) { @@ -628,7 +628,7 @@ void Ssw_SmlAssignDist1( Ssw_Sml_t * p, unsigned * pPat ) if ( p->nFrames == 1 ) { // copy the PI info - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Ssw_SmlObjAssignConst( p, pObj, Abc_InfoHasBit(pPat, i), 0 ); // flip one bit Limit = Abc_MinInt( Aig_ManPiNum(p->pAig), p->nWordsTotal * 32 - 1 ); @@ -678,7 +678,7 @@ void Ssw_SmlAssignDist1Plus( Ssw_Sml_t * p, unsigned * pPat ) assert( p->nFrames > 0 ); // copy the pattern into the primary inputs - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Ssw_SmlObjAssignConst( p, pObj, Abc_InfoHasBit(pPat, i), 0 ); // set distance one PIs for the first frame @@ -909,7 +909,7 @@ void Ssw_SmlInitialize( Ssw_Sml_t * p, int fInit ) } else { - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) Ssw_SmlAssignRandom( p, pObj ); } } diff --git a/src/proof/ssw/sswSimSat.c b/src/proof/ssw/sswSimSat.c index 4c094a2d..098b1e0f 100644 --- a/src/proof/ssw/sswSimSat.c +++ b/src/proof/ssw/sswSimSat.c @@ -48,7 +48,7 @@ void Ssw_ManResimulateBit( Ssw_Man_t * p, Aig_Obj_t * pCand, Aig_Obj_t * pRepr ) int i, RetValue1, RetValue2, clk = clock(); // set the PI simulation information Aig_ManConst1(p->pAig)->fMarkB = 1; - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) pObj->fMarkB = Abc_InfoHasBit( p->pPatWords, i ); // simulate internal nodes Aig_ManForEachNode( p->pAig, pObj, i ) diff --git a/src/proof/ssw/sswSweep.c b/src/proof/ssw/sswSweep.c index e2a4f65d..a3a8d1c8 100644 --- a/src/proof/ssw/sswSweep.c +++ b/src/proof/ssw/sswSweep.c @@ -117,7 +117,7 @@ void Ssw_SmlSavePatternAigPhase( Ssw_Man_t * p, int f ) Aig_Obj_t * pObj; int i; memset( p->pPatWords, 0, sizeof(unsigned) * p->nPatWords ); - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) if ( Aig_ObjPhaseReal( Ssw_ObjFrame(p, pObj, f) ) ) Abc_InfoSetBit( p->pPatWords, i ); } @@ -138,7 +138,7 @@ void Ssw_SmlSavePatternAig( Ssw_Man_t * p, int f ) Aig_Obj_t * pObj; int i; memset( p->pPatWords, 0, sizeof(unsigned) * p->nPatWords ); - Aig_ManForEachPi( p->pAig, pObj, i ) + Aig_ManForEachCi( p->pAig, pObj, i ) if ( Ssw_ManGetSatVarValue( p, pObj, f ) ) Abc_InfoSetBit( p->pPatWords, i ); } @@ -284,7 +284,7 @@ clk = clock(); // map constants and PIs Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreatePi(p->pFrames) ); + Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreateCi(p->pFrames) ); // sweep internal nodes Aig_ManForEachNode( p->pAig, pObj, i ) { @@ -298,7 +298,7 @@ clk = clock(); if ( f == p->pPars->nFramesK - 1 ) break; // transfer latch input to the latch outputs - Aig_ManForEachPo( p->pAig, pObj, i ) + Aig_ManForEachCo( p->pAig, pObj, i ) Ssw_ObjSetFrame( p, pObj, f, Ssw_ObjChild0Fra(p, pObj, f) ); // build logic cones for register outputs Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i ) @@ -393,7 +393,7 @@ clk = clock(); f = p->pPars->nFramesK; Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) ); Saig_ManForEachPi( p->pAig, pObj, i ) - Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreatePi(p->pFrames) ); + Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreateCi(p->pFrames) ); p->timeReduce += clock() - clk; // sweep internal nodes diff --git a/src/sat/bsat/satInterA.c b/src/sat/bsat/satInterA.c index 01a5ca31..4057ce7e 100644 --- a/src/sat/bsat/satInterA.c +++ b/src/sat/bsat/satInterA.c @@ -1017,7 +1017,7 @@ p->timeTotal += clock() - clkTotal; } pObj = *Inta_ManAigRead( p, p->pCnf->pTail ); - Aig_ObjCreatePo( pRes, pObj ); + Aig_ObjCreateCo( pRes, pObj ); Aig_ManCleanup( pRes ); p->pAig = NULL; @@ -1066,7 +1066,7 @@ Aig_Man_t * Inta_ManDeriveClauses( Inta_Man_t * pMan, Sto_Man_t * pCnf, int fCla } pMiter = Aig_And( p, pMiter, pSum ); } - Aig_ObjCreatePo( p, pMiter ); + Aig_ObjCreateCo( p, pMiter ); return p; } diff --git a/src/sat/bsat/satInterB.c b/src/sat/bsat/satInterB.c index 5d348f62..a9b18fd5 100644 --- a/src/sat/bsat/satInterB.c +++ b/src/sat/bsat/satInterB.c @@ -1053,7 +1053,7 @@ p->timeTotal += clock() - clkTotal; } pObj = *Intb_ManAigRead( p, p->pCnf->pTail ); - Aig_ObjCreatePo( pRes, pObj ); + Aig_ObjCreateCo( pRes, pObj ); Aig_ManCleanup( pRes ); p->pAig = NULL; @@ -1102,7 +1102,7 @@ Aig_Man_t * Intb_ManDeriveClauses( Intb_Man_t * pMan, Sto_Man_t * pCnf, int fCla } pMiter = Aig_And( p, pMiter, pSum ); } - Aig_ObjCreatePo( p, pMiter ); + Aig_ObjCreateCo( p, pMiter ); return p; } diff --git a/src/sat/bsat/satProof.c b/src/sat/bsat/satProof.c index d61dea4f..81a6a67a 100644 --- a/src/sat/bsat/satProof.c +++ b/src/sat/bsat/satProof.c @@ -695,7 +695,7 @@ void * Sat_ProofInterpolant( sat_solver2 * s, void * pGloVars ) pAig = Aig_ManStart( 10000 ); pAig->pName = Abc_UtilStrsav( "interpol" ); for ( i = 0; i < Vec_IntSize(vGlobVars); i++ ) - Aig_ObjCreatePi( pAig ); + Aig_ObjCreateCi( pAig ); // copy the numbers out and derive interpol for clause vCoreNums = Vec_IntAlloc( Vec_IntSize(vCore) ); @@ -736,7 +736,7 @@ void * Sat_ProofInterpolant( sat_solver2 * s, void * pGloVars ) } // save the result // assert( Proof_NodeHandle(vProof, pNode) == hRoot ); - Aig_ObjCreatePo( pAig, pObj ); + Aig_ObjCreateCo( pAig, pObj ); Aig_ManCleanup( pAig ); // move the results back @@ -844,7 +844,7 @@ word * Sat_ProofInterpolantTruth( sat_solver2 * s, void * pGloVars ) } // save the result // assert( Proof_NodeHandle(vProof, pNode) == hRoot ); -// Aig_ObjCreatePo( pAig, pObj ); +// Aig_ObjCreateCo( pAig, pObj ); // Aig_ManCleanup( pAig ); // move the results back diff --git a/src/sat/cnf/cnfFast.c b/src/sat/cnf/cnfFast.c index 840c923e..ea831844 100644 --- a/src/sat/cnf/cnfFast.c +++ b/src/sat/cnf/cnfFast.c @@ -306,11 +306,11 @@ void Cnf_DeriveFastMark( Aig_Man_t * p ) vSupps = Vec_IntStart( Aig_ManObjNumMax(p) ); // mark CIs - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pObj->fMarkA = 1; // mark CO drivers - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Aig_ObjFanin0(pObj)->fMarkA = 1; // mark MUX/XOR nodes @@ -403,7 +403,7 @@ void Cnf_DeriveFastMark( Aig_Man_t * p ) // check CO drivers Counter = 0; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Counter += !Aig_ObjFanin0(pObj)->fMarkA; if ( Counter ) printf( "PO-driver rule is violated %d times.\n", Counter ); @@ -562,7 +562,7 @@ Cnf_Dat_t * Cnf_DeriveFastClauses( Aig_Man_t * p, int nOutputs ) if ( Aig_ManRegNum(p) == 0 ) { assert( nOutputs == Aig_ManPoNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Vec_IntWriteEntry( vMap, Aig_ObjId(pObj), nVars++ ); } else @@ -577,7 +577,7 @@ Cnf_Dat_t * Cnf_DeriveFastClauses( Aig_Man_t * p, int nOutputs ) if ( pObj->fMarkA ) Vec_IntWriteEntry( vMap, Aig_ObjId(pObj), nVars++ ); // assign variables to the PIs and constant node - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Vec_IntWriteEntry( vMap, Aig_ObjId(pObj), nVars++ ); Vec_IntWriteEntry( vMap, Aig_ObjId(Aig_ManConst1(p)), nVars++ ); @@ -605,7 +605,7 @@ Cnf_Dat_t * Cnf_DeriveFastClauses( Aig_Man_t * p, int nOutputs ) Vec_IntFree( vTemp ); // create clauses for the outputs - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { DriLit = Cnf_ObjGetLit( vMap, Aig_ObjFanin0(pObj), Aig_ObjFaninC0(pObj) ); if ( i < Aig_ManPoNum(p) - nOutputs ) diff --git a/src/sat/cnf/cnfMan.c b/src/sat/cnf/cnfMan.c index a670a69d..1a28bd2a 100644 --- a/src/sat/cnf/cnfMan.c +++ b/src/sat/cnf/cnfMan.c @@ -107,7 +107,7 @@ Vec_Int_t * Cnf_DataCollectPiSatNums( Cnf_Dat_t * pCnf, Aig_Man_t * p ) Aig_Obj_t * pObj; int i; vCiIds = Vec_IntAlloc( Aig_ManPiNum(p) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Vec_IntPush( vCiIds, pCnf->pVarNums[pObj->Id] ); return vCiIds; } @@ -541,7 +541,7 @@ int Cnf_DataWriteOrClause( void * p, Cnf_Dat_t * pCnf ) Aig_Obj_t * pObj; int i, * pLits; pLits = ABC_ALLOC( int, Aig_ManPoNum(pCnf->pMan) ); - Aig_ManForEachPo( pCnf->pMan, pObj, i ) + Aig_ManForEachCo( pCnf->pMan, pObj, i ) pLits[i] = toLitCond( pCnf->pVarNums[pObj->Id], 0 ); if ( !sat_solver_addclause( pSat, pLits, pLits + Aig_ManPoNum(pCnf->pMan) ) ) { @@ -569,7 +569,7 @@ int Cnf_DataWriteOrClause2( void * p, Cnf_Dat_t * pCnf ) Aig_Obj_t * pObj; int i, * pLits; pLits = ABC_ALLOC( int, Aig_ManPoNum(pCnf->pMan) ); - Aig_ManForEachPo( pCnf->pMan, pObj, i ) + Aig_ManForEachCo( pCnf->pMan, pObj, i ) pLits[i] = toLitCond( pCnf->pVarNums[pObj->Id], 0 ); if ( !sat_solver2_addclause( pSat, pLits, pLits + Aig_ManPoNum(pCnf->pMan) ) ) { @@ -596,7 +596,7 @@ int Cnf_DataWriteAndClauses( void * p, Cnf_Dat_t * pCnf ) sat_solver * pSat = (sat_solver *)p; Aig_Obj_t * pObj; int i, Lit; - Aig_ManForEachPo( pCnf->pMan, pObj, i ) + Aig_ManForEachCo( pCnf->pMan, pObj, i ) { Lit = toLitCond( pCnf->pVarNums[pObj->Id], 0 ); if ( !sat_solver_addclause( pSat, &Lit, &Lit+1 ) ) diff --git a/src/sat/cnf/cnfMap.c b/src/sat/cnf/cnfMap.c index 8907485e..a6345471 100644 --- a/src/sat/cnf/cnfMap.c +++ b/src/sat/cnf/cnfMap.c @@ -144,7 +144,7 @@ void Cnf_DeriveMapping( Cnf_Man_t * p ) /* // compute the area of mapping AreaFlow = 0; - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) AreaFlow += Dar_ObjBestCut(Aig_ObjFanin0(pObj))->uSign / 100 / Aig_ObjFanin0(pObj)->nRefs; printf( "Area of the network = %d.\n", AreaFlow ); */ diff --git a/src/sat/cnf/cnfUtil.c b/src/sat/cnf/cnfUtil.c index 236b6bfa..dd495d89 100644 --- a/src/sat/cnf/cnfUtil.c +++ b/src/sat/cnf/cnfUtil.c @@ -99,7 +99,7 @@ Vec_Ptr_t * Aig_ManScanMapping( Cnf_Man_t * p, int fCollect ) vMapped = Vec_PtrAlloc( 1000 ); // collect nodes reachable from POs in the DFS order through the best cuts p->aArea = 0; - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) p->aArea += Aig_ManScanMapping_rec( p, Aig_ObjFanin0(pObj), vMapped ); // printf( "Variables = %6d. Clauses = %8d.\n", vMapped? Vec_PtrSize(vMapped) + Aig_ManPiNum(p->pManAig) + 1 : 0, p->aArea + 2 ); return vMapped; @@ -179,7 +179,7 @@ Vec_Ptr_t * Cnf_ManScanMapping( Cnf_Man_t * p, int fCollect, int fPreorder ) vMapped = Vec_PtrAlloc( 1000 ); // collect nodes reachable from POs in the DFS order through the best cuts p->aArea = 0; - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) p->aArea += Cnf_ManScanMapping_rec( p, Aig_ObjFanin0(pObj), vMapped, fPreorder ); // printf( "Variables = %6d. Clauses = %8d.\n", vMapped? Vec_PtrSize(vMapped) + Aig_ManPiNum(p->pManAig) + 1 : 0, p->aArea + 2 ); return vMapped; @@ -202,7 +202,7 @@ Vec_Int_t * Cnf_DataCollectCiSatNums( Cnf_Dat_t * pCnf, Aig_Man_t * p ) Aig_Obj_t * pObj; int i; vCiIds = Vec_IntAlloc( Aig_ManPiNum(p) ); - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) Vec_IntPush( vCiIds, pCnf->pVarNums[pObj->Id] ); return vCiIds; } @@ -224,7 +224,7 @@ Vec_Int_t * Cnf_DataCollectCoSatNums( Cnf_Dat_t * pCnf, Aig_Man_t * p ) Aig_Obj_t * pObj; int i; vCoIds = Vec_IntAlloc( Aig_ManPoNum(p) ); - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) Vec_IntPush( vCoIds, pCnf->pVarNums[pObj->Id] ); return vCoIds; } diff --git a/src/sat/cnf/cnfWrite.c b/src/sat/cnf/cnfWrite.c index 54c28967..42809299 100644 --- a/src/sat/cnf/cnfWrite.c +++ b/src/sat/cnf/cnfWrite.c @@ -268,7 +268,7 @@ Cnf_Dat_t * Cnf_ManWriteCnf( Cnf_Man_t * p, Vec_Ptr_t * vMapped, int nOutputs ) if ( Aig_ManRegNum(p->pManAig) == 0 ) { assert( nOutputs == Aig_ManPoNum(p->pManAig) ); - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; } else @@ -282,7 +282,7 @@ Cnf_Dat_t * Cnf_ManWriteCnf( Cnf_Man_t * p, Vec_Ptr_t * vMapped, int nOutputs ) Vec_PtrForEachEntry( Aig_Obj_t *, vMapped, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; // assign variables to the PIs and constant node - Aig_ManForEachPi( p->pManAig, pObj, i ) + Aig_ManForEachCi( p->pManAig, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; pCnf->pVarNums[Aig_ManConst1(p->pManAig)->Id] = Number++; pCnf->nVars = Number; @@ -297,7 +297,7 @@ Cnf_Dat_t * Cnf_ManWriteCnf( Cnf_Man_t * p, Vec_Ptr_t * vMapped, int nOutputs ) if ( Aig_ManRegNum(p->pManAig) == 0 ) { assert( nOutputs == Aig_ManPoNum(p->pManAig) ); - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) pCnf->pVarNums[pObj->Id] = Number--; } else @@ -311,7 +311,7 @@ Cnf_Dat_t * Cnf_ManWriteCnf( Cnf_Man_t * p, Vec_Ptr_t * vMapped, int nOutputs ) Vec_PtrForEachEntry( Aig_Obj_t *, vMapped, pObj, i ) pCnf->pVarNums[pObj->Id] = Number--; // assign variables to the PIs and constant node - Aig_ManForEachPi( p->pManAig, pObj, i ) + Aig_ManForEachCi( p->pManAig, pObj, i ) pCnf->pVarNums[pObj->Id] = Number--; pCnf->pVarNums[Aig_ManConst1(p->pManAig)->Id] = Number--; assert( Number >= 0 ); @@ -374,7 +374,7 @@ Cnf_Dat_t * Cnf_ManWriteCnf( Cnf_Man_t * p, Vec_Ptr_t * vMapped, int nOutputs ) *pLits++ = 2 * OutVar; // write the output literals - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) { OutVar = pCnf->pVarNums[ Aig_ObjFanin0(pObj)->Id ]; if ( i < Aig_ManPoNum(p->pManAig) - nOutputs ) @@ -477,7 +477,7 @@ Cnf_Dat_t * Cnf_ManWriteCnfOther( Cnf_Man_t * p, Vec_Ptr_t * vMapped ) pCnf->nVars = Aig_ManObjNumMax(p->pManAig); // clear the PI counters - Aig_ManForEachPi( p->pManAig, pObj, i ) + Aig_ManForEachCi( p->pManAig, pObj, i ) pCnf->pObj2Count[pObj->Id] = 0; // assign the clauses @@ -537,7 +537,7 @@ Cnf_Dat_t * Cnf_ManWriteCnfOther( Cnf_Man_t * p, Vec_Ptr_t * vMapped ) Vec_IntFree( vSopTemp ); // write the output literals - Aig_ManForEachPo( p->pManAig, pObj, i ) + Aig_ManForEachCo( p->pManAig, pObj, i ) { // remember the starting clause pCnf->pObj2Clause[pObj->Id] = pClas - pCnf->pClauses; @@ -617,14 +617,14 @@ Cnf_Dat_t * Cnf_DeriveSimple( Aig_Man_t * p, int nOutputs ) // assert( nOutputs == Aig_ManRegNum(p) ); // Aig_ManForEachLiSeq( p, pObj, i ) // pCnf->pVarNums[pObj->Id] = Number++; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; } // assign variables to the internal nodes Aig_ManForEachNode( p, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; // assign variables to the PIs and constant node - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; pCnf->pVarNums[Aig_ManConst1(p)->Id] = Number++; pCnf->nVars = Number; @@ -665,7 +665,7 @@ Cnf_Dat_t * Cnf_DeriveSimple( Aig_Man_t * p, int nOutputs ) *pLits++ = 2 * OutVar; // write the output literals - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { OutVar = pCnf->pVarNums[ Aig_ObjFanin0(pObj)->Id ]; if ( i < Aig_ManPoNum(p) - nOutputs ) @@ -734,13 +734,13 @@ Cnf_Dat_t * Cnf_DeriveSimpleForRetiming( Aig_Man_t * p ) pCnf->pVarNums[i] = -1; // assign variables to the last (nOutputs) POs Number = 1; - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; // assign variables to the internal nodes Aig_ManForEachNode( p, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; // assign variables to the PIs and constant node - Aig_ManForEachPi( p, pObj, i ) + Aig_ManForEachCi( p, pObj, i ) pCnf->pVarNums[pObj->Id] = Number++; pCnf->pVarNums[Aig_ManConst1(p)->Id] = Number++; pCnf->nVars = Number; @@ -774,7 +774,7 @@ Cnf_Dat_t * Cnf_DeriveSimpleForRetiming( Aig_Man_t * p ) *pLits++ = 2 * OutVar; // write the output literals - Aig_ManForEachPo( p, pObj, i ) + Aig_ManForEachCo( p, pObj, i ) { OutVar = pCnf->pVarNums[ Aig_ObjFanin0(pObj)->Id ]; PoVar = pCnf->pVarNums[ pObj->Id ]; |