49 int Prio, Prio0, Prio1;
50 int i, Phase0, Phase1;
67 if ( Phase0 && Phase1 )
69 else if ( Phase0 && !Phase1 )
71 else if ( !Phase0 && Phase1 )
88 for ( f = 0; f <= pCex->iFrame; f++ )
110 int i, Phase0, Phase1;
122 if ( Phase0 && Phase1 )
127 else if ( Phase0 && !Phase1 )
129 else if ( !Phase0 && Phase1 )
141 Abc_InfoSetBit( pCexMin->pData, pCexMin->nRegs + pCexMin->nPis * f + i );
148 pCexMin =
Abc_CexAlloc( pCex->nRegs, pCex->nPis, pCex->iFrame + 1 );
149 pCexMin->iPo = pCex->iPo;
150 pCexMin->iFrame = pCex->iFrame;
153 for ( f = pCex->iFrame; f >= 0; f-- )
180 Abc_Cex_t * pCexBest, * pCexMin[4] = {NULL};
181 int k, nOnesBest, nOnesCur;
185 printf(
"Given CEX does to have same number of inputs as the AIG.\n" );
190 printf(
"Given CEX does to have same number of flops as the AIG.\n" );
195 printf(
"Given CEX has PO whose index is out of range for the AIG.\n" );
203 printf(
"Original : " );
206 vPrios =
Vec_IntAlloc( pCex->nRegs * (pCex->iFrame + 1) );
207 for ( k = 0; k < nTryCexes; k++ )
213 printf(
"Counter-example is invalid.\n" );
221 printf(
"Decrease : " );
223 printf(
"Increase : " );
229 pCexBest = pCexMin[0];
231 for ( k = 1; k < nTryCexes; k++ )
234 if ( nOnesBest > nOnesCur )
236 nOnesBest = nOnesCur;
237 pCexBest = pCexMin[k];
240 for ( k = 0; k < nTryCexes; k++ )
241 if ( pCexBest != pCexMin[k] )
246 printf(
"Final : " );
250 printf(
"Counter-example verification has failed.\n" );
252 printf(
"Counter-example verification succeeded.\n" );
279 printf(
"Original : " );
281 printf(
"Minimized: " );
285 printf(
"Counter-example verification has failed.\n" );
287 printf(
"Counter-example verification succeeded.\n" );
Abc_Cex_t * Bmc_CexCareMinimizeAig(Gia_Man_t *p, Abc_Cex_t *pCex, int fCheck, int fVerbose)
void Gia_ManStop(Gia_Man_t *p)
#define Gia_ManForEachCo(p, pObj, i)
static int Gia_ManPoNum(Gia_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Abc_InfoHasBit(unsigned *p, int i)
ABC_NAMESPACE_IMPL_START Abc_Cex_t * Abc_CexAlloc(int nRegs, int nRealPis, int nFrames)
DECLARATIONS ///.
void Bmc_CexCarePropagateFwd(Gia_Man_t *p, Abc_Cex_t *pCex, int fGrow, Vec_Int_t *vPrios)
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
static int Abc_Var2Lit(int Var, int fCompl)
int Abc_CexCountOnes(Abc_Cex_t *p)
void Bmc_CexCareVerify(Aig_Man_t *p, Abc_Cex_t *pCex, Abc_Cex_t *pCexMin, int fVerbose)
Gia_Man_t * Gia_ManFromAigSimple(Aig_Man_t *p)
static int Abc_MaxInt(int a, int b)
static int Abc_LitNotCond(int Lit, int c)
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
static int Abc_MinInt(int a, int b)
static int Abc_LitIsCompl(int Lit)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
ABC_NAMESPACE_IMPL_START void Bmc_CexCarePropagateFwdOne(Gia_Man_t *p, Abc_Cex_t *pCex, int f, int fGrow)
DECLARATIONS ///.
#define Gia_ManForEachAndReverse(p, pObj, i)
static int Vec_IntEntry(Vec_Int_t *p, int i)
void Abc_CexFreeP(Abc_Cex_t **p)
#define ABC_NAMESPACE_IMPL_END
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define Gia_ManForEachPi(p, pObj, i)
#define Gia_ManForEachCand(p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static void Abc_InfoSetBit(unsigned *p, int i)
static int Vec_IntSize(Vec_Int_t *p)
int Bmc_CexVerify(Gia_Man_t *p, Abc_Cex_t *pCex, Abc_Cex_t *pCexCare)
void Bmc_CexCarePropagateBwdOne(Gia_Man_t *p, Abc_Cex_t *pCex, int f, Abc_Cex_t *pCexMin)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static int Abc_Lit2Var(int Lit)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
#define Gia_ManForEachRo(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
#define Gia_ManForEachRi(p, pObj, i)
Abc_Cex_t * Bmc_CexCareMinimize(Aig_Man_t *p, Abc_Cex_t *pCex, int fCheck, int fVerbose)
void Bmc_CexPrint(Abc_Cex_t *pCex, int nInputs, int fVerbose)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
Abc_Cex_t * Bmc_CexCarePropagateBwd(Gia_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vPrios, int fGrow)
static int Gia_ManPiNum(Gia_Man_t *p)
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ManRegNum(Gia_Man_t *p)