140 int nBTLimit = 1000000;
143 int status, i, Div, iVar, nFinal, * pFinal, nIter = 0, RetValue = 0;
153 { RetValue = -1;
break; }
155 { RetValue = 1;
break; }
169 { RetValue = -1;
break; }
177 printf(
"Cube %d : ", nIter );
178 for ( i = 0; i < nFinal; i++ )
180 if ( pFinal[i] == pLits[0] )
210 int i, Lit, RetValue, Root;
218 for ( i = 0; i < pCnf->
nClauses; i++ )
242 if ( i >= nOuts + 1 )
267 char * pFileGold =
"eco_gold.aig";
268 char * pFileOld =
"eco_old.aig";
277 pFile = fopen( pFileGold,
"r" );
280 printf(
"File \"%s\" does not exist.\n", pFileGold );
284 pFile = fopen( pFileOld,
"r" );
287 printf(
"File \"%s\" does not exist.\n", pFileOld );
304 printf(
"Patch is computed.\n" );
306 printf(
"Cannot be patched.\n" );
307 if ( RetValue == -1 )
308 printf(
"Resource limit exceeded.\n" );
static int * Vec_IntArray(Vec_Int_t *p)
void Gia_ManStop(Gia_Man_t *p)
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
#define Gia_ManForEachCo(p, pObj, i)
Gia_Man_t * Gia_AigerRead(char *pFileName, int fSkipStrash, int fCheck)
static int Gia_ManPoNum(Gia_Man_t *p)
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
int sat_solver_addclause(sat_solver *s, lit *begin, lit *end)
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
int sat_solver_solve(sat_solver *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
static int Gia_ManAppendCi(Gia_Man_t *p)
static int Abc_Var2Lit(int Var, int fCompl)
int Bmc_EcoPatch(Gia_Man_t *p, int nIns, int nOuts)
static int Vec_IntFind(Vec_Int_t *p, int Entry)
ABC_NAMESPACE_IMPL_START Gia_Man_t * Bmc_EcoMiter(Gia_Man_t *pGold, Gia_Man_t *pOld, Vec_Int_t *vFans)
DECLARATIONS ///.
static int sat_solver_var_value(sat_solver *s, int v)
static int sat_solver_final(sat_solver *s, int **ppArray)
#define Gia_ManForEachCi(p, pObj, i)
static int Aig_ManCoNum(Aig_Man_t *p)
static int Abc_LitIsCompl(int Lit)
static Gia_Obj_t * Gia_ManPi(Gia_Man_t *p, int v)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
void sat_solver_setnvars(sat_solver *s, int n)
int sat_solver_nvars(sat_solver *s)
#define ABC_NAMESPACE_IMPL_END
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static Cnf_Dat_t * Cnf_DeriveGiaRemapped(Gia_Man_t *p)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static int Gia_ManCiNum(Gia_Man_t *p)
static int Abc_LitNot(int Lit)
int sat_solver_simplify(sat_solver *s)
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
sat_solver * sat_solver_new(void)
static int Vec_IntSize(Vec_Int_t *p)
static int sat_solver_var_literal(sat_solver *s, int v)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static int Abc_Lit2Var(int Lit)
int Bmc_EcoSolve(sat_solver *pSat, int Root, Vec_Int_t *vVars)
void Gia_ManHashAlloc(Gia_Man_t *p)
static void Vec_IntFree(Vec_Int_t *p)
static int Gia_ManPiNum(Gia_Man_t *p)
static void Vec_IntClear(Vec_Int_t *p)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
#define Gia_ManForEachPo(p, pObj, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Gia_ManCoNum(Gia_Man_t *p)