55 pNew->
pName = Abc_UtilStrsav(
p->pName );
56 pNew->
pSpec = Abc_UtilStrsav(
p->pSpec );
58 Gia_ManConst0(
p)->Value = 0;
59 for ( k = 0; k < nFrames; k++ )
61 Gia_ManAppendCi( pNew );
63 pObj->
Value = Gia_ManAppendCi( pNew );
64 for ( k = 0; k < nFrames; k++ )
67 pObj->
Value = Gia_ManCiLit( pNew, (nFrames - 1 - k) * Gia_ManPiNum(
p) + i );
71 pObj->
Value = Gia_ObjFanin0Copy(pObj);
75 pObj = Gia_ManPo(
p, 0 );
76 pObj->
Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
97 int i, Limit = nFrames * Gia_ManPiNum(
p);
99 for ( i = 0; i < Limit; i++ )
101 printf(
"%3d : ", i );
102 if ( i % Gia_ManPiNum(
p) == 0 )
132 int fCompl0, fCompl1;
134 assert( pCex->nRegs == 0 );
135 assert( pCex->nPis == Gia_ManCiNum(
p) );
136 assert( fStart <= pCex->iFrame );
139 pNew->
pName = Abc_UtilStrsav(
"unate" );
141 Gia_ManConst0(
p)->fMark0 = 0;
142 Gia_ManConst0(
p)->fMark1 = 1;
143 Gia_ManConst0(
p)->Value = ~0;
147 pObj->
fMark0 = Abc_InfoHasBit( pCex->pData, pCex->nRegs + fStart * Gia_ManCiNum(
p) + Gia_ManPiNum(
p) + k );
149 pObj->
Value = Abc_LitNotCond( Gia_ManAppendCi(pNew), !pObj->
fMark0 );
152 iBit = pCex->nRegs + fStart * Gia_ManCiNum(
p);
153 for ( i = fStart; i <= pCex->iFrame; i++ )
158 pObj->
fMark0 = Abc_InfoHasBit( pCex->pData, iBit++ );
162 iBit += Gia_ManRegNum(
p);
173 fCompl0 = Gia_ObjFanin0(pObj)->fMark0 ^ Gia_ObjFaninC0(pObj);
174 fCompl1 = Gia_ObjFanin1(pObj)->fMark0 ^ Gia_ObjFaninC1(pObj);
175 pObj->
fMark0 = fCompl0 & fCompl1;
177 pObj->
fMark1 = Gia_ObjFanin0(pObj)->fMark1 & Gia_ObjFanin1(pObj)->fMark1;
178 else if ( !fCompl0 && !fCompl1 )
179 pObj->
fMark1 = Gia_ObjFanin0(pObj)->fMark1 | Gia_ObjFanin1(pObj)->fMark1;
181 pObj->
fMark1 = Gia_ObjFanin0(pObj)->fMark1;
183 pObj->
fMark1 = Gia_ObjFanin1(pObj)->fMark1;
189 pObj->
Value =
Gia_ManHashAnd( pNew, Gia_ObjFanin0(pObj)->Value, Gia_ObjFanin1(pObj)->Value );
190 else if ( !fCompl0 && !fCompl1 )
191 pObj->
Value =
Gia_ManHashOr( pNew, Gia_ObjFanin0(pObj)->Value, Gia_ObjFanin1(pObj)->Value );
193 pObj->
Value = Gia_ObjFanin0(pObj)->Value;
195 pObj->
Value = Gia_ObjFanin1(pObj)->Value;
202 pObj->
fMark0 = Gia_ObjFanin0(pObj)->fMark0 ^ Gia_ObjFaninC0(pObj);
203 pObj->
fMark1 = Gia_ObjFanin0(pObj)->fMark1;
204 pObj->
Value = Gia_ObjFanin0(pObj)->Value;
208 assert( iBit == pCex->nBits );
210 pObj = Gia_ManPo(
p, pCex->iPo);
214 Gia_ManAppendCo( pNew, pObj->
Value );
224 int fCompl0, fCompl1;
226 assert( pCex->nRegs == 0 );
227 assert( pCex->nPis == Gia_ManCiNum(
p) );
228 assert( fStart <= pCex->iFrame );
231 pNew->
pName = Abc_UtilStrsav(
"unate" );
233 Gia_ManConst0(
p)->fMark0 = 0;
234 Gia_ManConst0(
p)->Value = 1;
238 pObj->
fMark0 = Abc_InfoHasBit( pCex->pData, pCex->nRegs + fStart * Gia_ManCiNum(
p) + Gia_ManPiNum(
p) + k );
239 pObj->
Value = Abc_LitNotCond( Gia_ManAppendCi(pNew), !pObj->
fMark0 );
242 iBit = pCex->nRegs + fStart * Gia_ManCiNum(
p);
243 for ( i = fStart; i <= pCex->iFrame; i++ )
248 pObj->
fMark0 = Abc_InfoHasBit( pCex->pData, iBit++ );
251 iBit += Gia_ManRegNum(
p);
261 fCompl0 = Gia_ObjFanin0(pObj)->fMark0 ^ Gia_ObjFaninC0(pObj);
262 fCompl1 = Gia_ObjFanin1(pObj)->fMark0 ^ Gia_ObjFaninC1(pObj);
263 pObj->
fMark0 = fCompl0 & fCompl1;
265 pObj->
Value =
Gia_ManHashAnd( pNew, Gia_ObjFanin0(pObj)->Value, Gia_ObjFanin1(pObj)->Value );
266 else if ( !fCompl0 && !fCompl1 )
267 pObj->
Value =
Gia_ManHashOr( pNew, Gia_ObjFanin0(pObj)->Value, Gia_ObjFanin1(pObj)->Value );
269 pObj->
Value = Gia_ObjFanin0(pObj)->Value;
271 pObj->
Value = Gia_ObjFanin1(pObj)->Value;
277 pObj->
fMark0 = Gia_ObjFanin0(pObj)->fMark0 ^ Gia_ObjFaninC0(pObj);
278 pObj->
Value = Gia_ObjFanin0(pObj)->Value;
282 assert( iBit == pCex->nBits );
284 pObj = Gia_ManPo(
p, pCex->iPo);
287 Gia_ManAppendCo( pNew, pObj->
Value );
300 nFramesMax = Abc_MinInt( nFramesMax, pCex->iFrame );
301 printf(
"Processing CEX in frame %d (max frames %d).\n", pCex->iFrame, nFramesMax );
302 vCones = Vec_PtrAlloc( nFramesMax );
303 for ( i = pCex->iFrame; i > pCex->iFrame - nFramesMax; i-- )
305 printf(
"Frame %5d : ", i );
308 Vec_PtrPush( vCones, pNew );
315 Vec_PtrFree( vCones );
316 printf(
"GIA with additional properties is written into \"miter2.aig\".\n" );
318 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
345 printf(
"Counter-example care-set verification has failed.\n" );
355 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Gia_Man_t * Bmc_CexTargetEnlarge(Gia_Man_t *p, int nFrames)
FUNCTION DEFINITIONS ///.
Abc_Cex_t * Bmc_CexCareBits(Gia_Man_t *p, Abc_Cex_t *pCexState, Abc_Cex_t *pCexImpl, Abc_Cex_t *pCexEss, int fFindAll, int fVerbose)
Gia_Man_t * Bmc_CexBuildNetwork2Test(Gia_Man_t *p, Abc_Cex_t *pCex, int nFramesMax)
Gia_Man_t * Bmc_CexDepthTest(Gia_Man_t *p, Abc_Cex_t *pCex, int nFrames, int fVerbose)
Gia_Man_t * Bmc_CexBuildNetwork2(Gia_Man_t *p, Abc_Cex_t *pCex, int fStart)
int Bmc_CexVerify(Gia_Man_t *p, Abc_Cex_t *pCex, Abc_Cex_t *pCexCare)
Gia_Man_t * Bmc_CexTarget(Gia_Man_t *p, int nFrames)
ABC_NAMESPACE_IMPL_START Abc_Cex_t * Bmc_CexInnerStates(Gia_Man_t *p, Abc_Cex_t *pCex, Abc_Cex_t **ppCexImpl, int fVerbose)
DECLARATIONS ///.
Gia_Man_t * Bmc_CexBuildNetwork2_(Gia_Man_t *p, Abc_Cex_t *pCex, int fStart)
void Gia_ManStop(Gia_Man_t *p)
Gia_Man_t * Gia_ManDupAppendCones(Gia_Man_t *p, Gia_Man_t **ppCones, int nCones, int fOnlyRegs)
#define Gia_ManForEachRo(p, pObj, i)
#define Gia_ManForEachAnd(p, pObj, i)
Gia_Man_t * Gia_ManDupLastPis(Gia_Man_t *p, int nLastPis)
void Gia_ManHashAlloc(Gia_Man_t *p)
#define Gia_ManForEachPi(p, pObj, i)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
struct Gia_Obj_t_ Gia_Obj_t
Gia_Man_t * Gia_ManDupExist(Gia_Man_t *p, int iVar)
struct Gia_Man_t_ Gia_Man_t
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
#define Gia_ManForEachCo(p, pObj, i)
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
void Gia_ManHashStop(Gia_Man_t *p)
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
#define Gia_ManForEachRi(p, pObj, i)
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact, int fWriteNewLine)
void Abc_CexFreeP(Abc_Cex_t **p)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.