61 assert( Aig_ManRegNum(pInter) == 0 );
62 assert( Aig_ManRegNum(pAig) > 0 );
63 assert( Aig_ManRegNum(pFrames) == 0 );
64 assert( Aig_ManCoNum(pInter) == 1 );
65 assert( Aig_ManCoNum(pFrames) == fUseBackward? Saig_ManRegNum(pAig) : 1 );
66 assert( fUseBackward || Aig_ManCiNum(pInter) == Aig_ManRegNum(pAig) );
80 for ( i = 0; i < pCnfInter->
nClauses; i++ )
96 if ( Saig_ManRegNum(pAig) == Aig_ManCiNum(pInter) )
97 pObj = Aig_ManCi( pInter, i );
100 assert( Aig_ManCiNum(pAig) == Aig_ManCiNum(pInter) );
101 pObj = Aig_ManCi( pInter, Aig_ManCiNum(pAig)-Saig_ManRegNum(pAig) + i );
104 Lits[0] = toLitCond( pCnfInter->
pVarNums[pObj->
Id], 0 );
105 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 1 );
108 Lits[0] = toLitCond( pCnfInter->
pVarNums[pObj->
Id], 1 );
109 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 0 );
118 pObj2 = Saig_ManLo( pAig, i );
120 Lits[0] = toLitCond( pCnfInter->
pVarNums[pObj->
Id], 0 );
121 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 1 );
124 Lits[0] = toLitCond( pCnfInter->
pVarNums[pObj->
Id], 1 );
125 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 0 );
131 for ( i = 0; i < pCnfAig->
nClauses; i++ )
137 Vec_IntClear( vVarsAB );
143 Vec_IntPush( vVarsAB, pCnfFrames->
pVarNums[pObj->
Id] );
145 pObj2 = Saig_ManLo( pAig, i );
146 Lits[0] = toLitCond( pCnfFrames->
pVarNums[pObj->
Id], 0 );
147 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 1 );
150 Lits[0] = toLitCond( pCnfFrames->
pVarNums[pObj->
Id], 1 );
151 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 0 );
160 if ( i == Aig_ManRegNum(pAig) )
162 Vec_IntPush( vVarsAB, pCnfFrames->
pVarNums[pObj->
Id] );
164 pObj2 = Saig_ManLi( pAig, i );
165 Lits[0] = toLitCond( pCnfFrames->
pVarNums[pObj->
Id], 0 );
166 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 1 );
169 Lits[0] = toLitCond( pCnfFrames->
pVarNums[pObj->
Id], 1 );
170 Lits[1] = toLitCond( pCnfAig->
pVarNums[pObj2->
Id], 0 );
177 for ( i = 0; i < pCnfFrames->
nClauses; i++ )
206 void * pSatCnf = NULL;
210 int status, RetValue;
225 sat_solver_set_runtime_limit( pSat, nTimeNewOut );
230 pGlobalVars[
Var] = 1;
235 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)
p->nConfLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
237p->timeSat += Abc_Clock() - clk;
246 else if ( status ==
l_True )
255 if ( pSatCnf == NULL )
310p->timeInt += Abc_Clock() - clk;
312 if (
p->pInterNew == NULL )
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
struct Aig_Obj_t_ Aig_Obj_t
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
#define Aig_ManForEachCo(p, pObj, i)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define sat_solver_addclause
struct Cnf_Dat_t_ Cnf_Dat_t
void Cnf_DataLift(Cnf_Dat_t *p, int nVarsPlus)
typedefABC_NAMESPACE_HEADER_START struct Inter_Man_t_ Inter_Man_t
INCLUDES ///.
int Inter_ManPerformOneStep(Inter_Man_t *p, int fUseBias, int fUseBackward, abctime nTimeNewOut)
ABC_NAMESPACE_IMPL_START sat_solver * Inter_ManDeriveSatSolver(Aig_Man_t *pInter, Cnf_Dat_t *pCnfInter, Aig_Man_t *pAig, Cnf_Dat_t *pCnfAig, Aig_Man_t *pFrames, Cnf_Dat_t *pCnfFrames, Vec_Int_t *vVarsAB, int fUseBackward)
DECLARATIONS ///.
#define Saig_ManForEachLi(p, pObj, i)
void * Inta_ManInterpolate(Inta_Man_t *p, Sto_Man_t *pCnf, abctime TimeToStop, void *vVarsAB, int fVerbose)
Inta_Man_t * Inta_ManAlloc()
FUNCTION DEFINITIONS ///.
void Inta_ManFree(Inta_Man_t *p)
sat_solver * sat_solver_new(void)
void sat_solver_store_mark_clauses_a(sat_solver *s)
void sat_solver_setnvars(sat_solver *s, int n)
void sat_solver_store_alloc(sat_solver *s)
int sat_solver_nvars(sat_solver *s)
void sat_solver_store_mark_roots(sat_solver *s)
void * sat_solver_store_release(sat_solver *s)
void sat_solver_delete(sat_solver *s)
void Sto_ManFree(Sto_Man_t *p)
struct Sto_Man_t_ Sto_Man_t
struct Inta_Man_t_ Inta_Man_t
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.