150{
151 void * pSatCnf = NULL;
158 int Lits[3], status, i;
160 int iLast = -1;
161
162 assert( Aig_ManCiNum(pManOn) == Aig_ManCiNum(pManOff) );
163
164clk = Abc_Clock();
165
166
167
172
173clk = Abc_Clock();
174
178
179
180 for ( i = 0; i < pCnfOn->
nClauses; i++ )
181 {
183 {
187 return NULL;
188 }
189 }
191
192
193 if ( fRelation )
194 {
197 }
198
199
200 for ( i = 0; i < pCnfOff->
nClauses; i++ )
201 {
203 {
207 return NULL;
208 }
209 }
210
211
212
213 vVarsAB = Vec_IntAlloc( Aig_ManCiNum(pManOn) );
214 if ( fRelation )
215 Vec_IntPush( vVarsAB, iLast );
216
218 {
219 Vec_IntPush( vVarsAB, pCnfOn->
pVarNums[pObj->
Id] );
220 pObj2 = Aig_ManCi( pManOff, i );
221
222 Lits[0] = toLitCond( pCnfOn->
pVarNums[pObj->
Id], 0 );
223 Lits[1] = toLitCond( pCnfOff->
pVarNums[pObj2->
Id], 1 );
226 Lits[0] = toLitCond( pCnfOn->
pVarNums[pObj->
Id], 1 );
227 Lits[1] = toLitCond( pCnfOff->
pVarNums[pObj2->
Id], 0 );
230 }
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
251 {
253
254 }
255 else if ( status ==
l_True )
256 {
257
258 }
259 else
260 {
261
262 }
264 if ( pSatCnf == NULL )
265 {
266 printf( "The SAT problem is not unsat.\n" );
267 Vec_IntFree( vVarsAB );
268 return NULL;
269 }
270
271
272clk = Abc_Clock();
277
278
279
280
281
282
283
284
285
286
287
288 Vec_IntFree( vVarsAB );
290
291
292 return pRes;
293}
ABC_NAMESPACE_IMPL_START abctime timeCnf
DECLARATIONS ///.
#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 ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define sat_solver_addclause
Cnf_Dat_t * Cnf_DeriveSimple(Aig_Man_t *p, int nOutputs)
struct Cnf_Dat_t_ Cnf_Dat_t
void Cnf_DataFree(Cnf_Dat_t *p)
void Cnf_DataLift(Cnf_Dat_t *p, int nVarsPlus)
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)
int sat_solver_store_change_last(sat_solver *s)
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)
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