156 int i, iVecId, iSatVar;
157 assert( k < p->nFramesMax );
161 iVecId =
Vec_IntSize( p->vVec2Var ) / p->nFramesMax;
162 for ( i = 0; i < p->nFramesMax; i++ )
166 iSatVar =
Vec_IntEntry( p->vVec2Var, iVecId * p->nFramesMax + k );
227 int i, f, ObjId, nVars, RetValue = 1;
230 for ( f = p->nFramesMax - 1; f >= 0; f-- )
303 for ( f = p->nStart; f < p->nFramesMax; f++ )
313 printf(
"The resulting SAT problem contains %d variables and %d clauses.\n",
314 p->pSat->size, p->pSat->stats.clauses );
345 p->nFramesMax = nFramesMax;
346 p->fVerbose = fVerbose;
347 for ( i = 0; i < p->nFramesMax; i++ )
397 clock_t clk = clock();
401 RetValue =
sat_solver2_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
404 printf(
"Conflict limit is reached.\n" );
409 printf(
"The BMC problem is SAT.\n" );
416 printf(
"SAT solver returned UNSAT after %7d conflicts. ", (
int)pSat->
stats.
conflicts );
447 int i, ClaId, iVecId;
469 int v, f, Entry, nVecIds =
Vec_IntSize(p->vVec2Use) / p->nFramesMax;
470 for ( f = 0; f < p->nFramesMax; f++ )
471 for ( v = 0; v < nVecIds; v++ )
472 if (
Vec_IntEntry( p->vVec2Use, v * p->nFramesMax + f ) )
475 printf(
"%d ", Entry );
499 clock_t clk, clk2 = clock();
505 printf(
"Abstracting from frame %d to frame %d with timeout %d sec.\n", nStart, nFramesMax, TimeLimit );
507 printf(
"Abstracting from frame %d to frame %d with no timeout.\n", nStart, nFramesMax );
515 printf(
"Error! SAT solver became UNSAT.\n" );
519 p->pSat->fNotUseRandom = fSkipRand;
520 p->timePre += clock() - clk;
534 p->timeSat += clock() - clk;
535 p->timeTotal += clock() - clk2;
540 ABC_PRTP(
"Pre ", p->timePre, p->timeTotal );
541 ABC_PRTP(
"Sat ", p->timeSat, p->timeTotal );
542 ABC_PRTP(
"Total ", p->timeTotal, p->timeTotal );
Vec_Int_t * Aig_Gla3ManCollect(Aig_Gla3Man_t *p, Vec_Int_t *vCore)
static int * Vec_IntArray(Vec_Int_t *p)
static int Aig_Gla3AddNode(sat_solver2 *pSat, int iVar, int iVar0, int iVar1, int fCompl0, int fCompl1)
static int sat_solver2_nclauses(sat_solver2 *s)
void * Sat_ProofCore(sat_solver2 *s)
static int Saig_ManPoNum(Aig_Man_t *p)
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_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 Aig_Obj_t * Saig_ObjLoToLi(Aig_Man_t *p, Aig_Obj_t *pObj)
void sat_solver2_delete(sat_solver2 *s)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Aig_Gla3Man_t * Aig_Gla3ManStart(Aig_Man_t *pAig, int nStart, int nFramesMax, int fVerbose)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
int Aig_Gla3FetchVar(Aig_Gla3Man_t *p, Aig_Obj_t *pObj, int k)
sat_solver2 * sat_solver2_new(void)
int sat_solver2_addclause(sat_solver2 *s, lit *begin, lit *end, int Id)
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
void sat_solver2_setnvars(sat_solver2 *s, int n)
#define ABC_PRTP(a, t, T)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Int_t * Vec_IntStart(int nSize)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Aig_Gla3AssignVars_rec(Aig_Gla3Man_t *p, Aig_Obj_t *pObj, int f)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static lit toLitCond(int v, int c)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Saig_ObjIsPo(Aig_Man_t *p, Aig_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
static int Aig_Gla3AddConst(sat_solver2 *pSat, int iVar, int fCompl)
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Vec_Int_t * Aig_Gla3ManPerform(Aig_Man_t *pAig, int nStart, int nFramesMax, int nConfLimit, int TimeLimit, int fSkipRand, int fVerbose)
static void Vec_IntFreeP(Vec_Int_t **p)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
static int Aig_ManObjNumMax(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
static int Aig_Gla3AddBuffer(sat_solver2 *pSat, int iVar0, int iVar1, int fCompl)
static int Vec_IntSize(Vec_Int_t *p)
Vec_Int_t * Aig_Gla3ManUnsatCore(sat_solver2 *pSat, int nConfMax, int fVerbose, int *piRetValue)
typedefABC_NAMESPACE_IMPL_START struct Aig_Gla3Man_t_ Aig_Gla3Man_t
DECLARATIONS ///.
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
void Aig_Gla3ManStop(Aig_Gla3Man_t *p)
int sat_solver2_solve(sat_solver2 *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
static int Aig_ObjId(Aig_Obj_t *pObj)
int Aig_Gla3CreateSatSolver(Aig_Gla3Man_t *p)
static void Vec_IntFree(Vec_Int_t *p)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Saig_ObjIsPi(Aig_Man_t *p, Aig_Obj_t *pObj)
static abctime sat_solver2_set_runtime_limit(sat_solver2 *s, abctime Limit)