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-- )
305 for ( f = p->nStart; f < p->nFramesMax; f++ )
319 printf(
"The resulting SAT problem contains %d variables and %d clauses.\n",
320 p->pSat->size, p->pSat->stats.clauses );
351 p->nFramesMax = nFramesMax;
352 p->fVerbose = fVerbose;
353 for ( i = 0; i < p->nFramesMax; i++ )
405 clock_t clk = clock();
409 RetValue =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
412 printf(
"Conflict limit is reached.\n" );
417 printf(
"The BMC problem is SAT.\n" );
424 printf(
"SAT solver returned UNSAT after %7d conflicts. ", (
int)pSat->
stats.
conflicts );
458 int i, ClaId, iVecId;
499 int v, f, Entry, nVecIds =
Vec_IntSize(p->vVec2Use) / p->nFramesMax;
500 for ( f = 0; f < p->nFramesMax; f++ )
501 for ( v = 0; v < nVecIds; v++ )
502 if (
Vec_IntEntry( p->vVec2Use, v * p->nFramesMax + f ) )
505 printf(
"%d ", Entry );
529 clock_t nTimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock(): 0;
530 clock_t clk, clk2 = clock();
536 printf(
"Abstracting from frame %d to frame %d with timeout %d sec.\n", nStart, nFramesMax, TimeLimit );
538 printf(
"Abstracting from frame %d to frame %d with no timeout.\n", nStart, nFramesMax );
546 printf(
"Error! SAT solver became UNSAT.\n" );
551 p->timePre += clock() - clk;
565 p->timeSat += clock() - clk;
566 p->timeTotal += clock() - clk2;
571 ABC_PRTP(
"Pre ", p->timePre, p->timeTotal );
572 ABC_PRTP(
"Sat ", p->timeSat, p->timeTotal );
573 ABC_PRTP(
"Total ", p->timeTotal, p->timeTotal );
static abctime sat_solver_set_runtime_limit(sat_solver *s, abctime Limit)
static int * Vec_IntArray(Vec_Int_t *p)
void * Intp_ManUnsatCore(Intp_Man_t *p, Sto_Man_t *pCnf, int fLearned, int fVerbose)
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 ///.
int sat_solver_addclause(sat_solver *s, lit *begin, lit *end)
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)
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)
typedefABC_NAMESPACE_IMPL_START struct Aig_Gla2Man_t_ Aig_Gla2Man_t
DECLARATIONS ///.
void sat_solver_delete(sat_solver *s)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
void * sat_solver_store_release(sat_solver *s)
static int sat_solver_set_random(sat_solver *s, int fNotUseRandom)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Intp_Man_t * Intp_ManAlloc()
FUNCTION DEFINITIONS ///.
#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)
void Intp_ManFree(Intp_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Aig_Gla2AddConst(sat_solver *pSat, int iVar, int fCompl)
FUNCTION DEFINITIONS ///.
int Aig_Gla2CreateSatSolver(Aig_Gla2Man_t *p)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
void sat_solver_store_alloc(sat_solver *s)
static lit toLitCond(int v, int c)
void sat_solver_setnvars(sat_solver *s, int n)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Saig_ObjIsPo(Aig_Man_t *p, Aig_Obj_t *pObj)
void Aig_Gla2ManStop(Aig_Gla2Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
void Aig_Gla2AssignVars_rec(Aig_Gla2Man_t *p, Aig_Obj_t *pObj, int f)
static void Vec_IntFreeP(Vec_Int_t **p)
static int Aig_Gla2AddBuffer(sat_solver *pSat, int iVar0, int iVar1, int fCompl)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
static int Aig_ManObjNumMax(Aig_Man_t *p)
int sat_solver_nclauses(sat_solver *s)
#define ABC_NAMESPACE_IMPL_START
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
void sat_solver_store_mark_roots(sat_solver *s)
sat_solver * sat_solver_new(void)
static int Vec_IntSize(Vec_Int_t *p)
void Sto_ManFree(Sto_Man_t *p)
int Aig_Gla2FetchVar(Aig_Gla2Man_t *p, Aig_Obj_t *pObj, int k)
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
static int Aig_ObjId(Aig_Obj_t *pObj)
static int Aig_Gla2AddNode(sat_solver *pSat, int iVar, int iVar0, int iVar1, int fCompl0, int fCompl1)
static void Vec_IntFree(Vec_Int_t *p)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Vec_Int_t * Aig_Gla2ManCollect(Aig_Gla2Man_t *p, Vec_Int_t *vCore)
Vec_Int_t * Aig_Gla2ManPerform(Aig_Man_t *pAig, int nStart, int nFramesMax, int nConfLimit, int TimeLimit, int fSkipRand, int fVerbose)
static int Saig_ObjIsPi(Aig_Man_t *p, Aig_Obj_t *pObj)
Aig_Gla2Man_t * Aig_Gla2ManStart(Aig_Man_t *pAig, int nStart, int nFramesMax, int fVerbose)
Vec_Int_t * Saig_AbsSolverUnsatCore(sat_solver *pSat, int nConfMax, int fVerbose, int *piRetValue)