58 int i, nNodes, status;
61 pObj = (
Abc_Obj_t *)Vec_PtrEntry( vFanins, 0 );
62 assert( pObj->
pNtk == pAig && Abc_ObjIsPo(pObj) );
86 (
int)(ABC_PTRUINT_T)Abc_ObjFanin0(pObj)->pCopy, (
int)(ABC_PTRUINT_T)Abc_ObjFanin1(pObj)->pCopy, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) );
87 Vec_PtrFree( vNodes );
91 (
int)(ABC_PTRUINT_T)Abc_ObjFanin0(pObj)->pCopy, Abc_ObjFaninC0(pObj) );
93 pObj = (
Abc_Obj_t *)Vec_PtrEntry(vFanins, 0);
95 pObj = (
Abc_Obj_t *)Vec_PtrEntry(vFanins, 1);
102 pObj = (
Abc_Obj_t *)Vec_PtrEntry(vFanins, 1);
112 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)10000, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
118 else if ( status ==
l_True )
150 vFanins = Vec_PtrAlloc( 2 );
151 pObj = Abc_NtkPo( pAig, 0 );
152 Vec_PtrPush( vFanins, pObj );
153 pObj = Abc_NtkPo( pAig, 1 );
154 Vec_PtrPush( vFanins, pObj );
177 (
int)(ABC_PTRUINT_T)Abc_ObjFanin0(pObj)->pCopy, (
int)(ABC_PTRUINT_T)Abc_ObjFanin1(pObj)->pCopy, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) );
178 Vec_PtrFree( vNodes );
180 pObj = Abc_NtkPo( pAig, 0 );
182 (
int)(ABC_PTRUINT_T)Abc_ObjFanin0(pObj)->pCopy, Abc_ObjFaninC0(pObj) );
184 pObj = Abc_NtkPo( pAig, 1 );
186 (
int)(ABC_PTRUINT_T)Abc_ObjFanin0(pObj)->pCopy, Abc_ObjFaninC0(pObj) );
189 pObj = Abc_NtkPo( pAig, 0 );
192 pObj = Abc_NtkPo( pAig, 1 );
195 Vec_PtrFree( vFanins );
218 int i, k,
value, status, Lit,
Var, iPat;
224 Lit = toLitCond( (
int)(ABC_PTRUINT_T)Abc_NtkPo(
p->pAig,1)->pCopy, !fOnSet );
235 assert( iPat < nPatsLimit );
256 vLits = Vec_IntAlloc( 32 );
257 for ( k = iPat; k < nPatsLimit; k++ )
261 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)10000, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
275 else if ( status ==
l_True )
278 Vec_IntClear( vLits );
279 for ( i = 0; i <
p->nTruePis; i++ )
281 Var = (int)(ABC_PTRUINT_T)Abc_NtkPi(
p->pAig,i)->pCopy;
283 value = sat_solver_var_value(pSat,
Var);
285 Abc_InfoSetBit( (
unsigned *)Vec_PtrEntry(vPats, i), k );
287 Vec_IntPush( vLits, Lit );
292 status =
sat_solver_addclause( pSat, Vec_IntArray(vLits), Vec_IntArray(vLits) + Vec_IntSize(vLits) );
310 Vec_IntFree( vLits );
322p->timeSat += Abc_Clock() - clk;
340 lit Lit = toLitCond( iVar, fCompl );
361 Lits[0] = toLitCond( iVar0, 0 );
362 Lits[1] = toLitCond( iVar1, !fCompl );
366 Lits[0] = toLitCond( iVar0, 1 );
367 Lits[1] = toLitCond( iVar1, fCompl );
389 Lits[0] = toLitCond( iVar, 1 );
390 Lits[1] = toLitCond( iVar0, fCompl0 );
394 Lits[0] = toLitCond( iVar, 1 );
395 Lits[1] = toLitCond( iVar1, fCompl1 );
399 Lits[0] = toLitCond( iVar, 0 );
400 Lits[1] = toLitCond( iVar0, !fCompl0 );
401 Lits[2] = toLitCond( iVar1, !fCompl1 );
struct Abc_Obj_t_ Abc_Obj_t
struct Abc_Ntk_t_ Abc_Ntk_t
#define Abc_NtkForEachPi(pNtk, pPi, i)
ABC_DLL Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START typedef signed char value
#define sat_solver_addclause
struct Res_Sim_t_ Res_Sim_t
int Res_SatSimulate(Res_Sim_t *p, int nPatsLimit, int fOnSet)
void * Res_SatSimulateConstr(Abc_Ntk_t *pAig, int fOnSet)
int Res_SatAddEqual(sat_solver *pSat, int iVar0, int iVar1, int fCompl)
void * Res_SatProveUnsat(Abc_Ntk_t *pAig, Vec_Ptr_t *vFanins)
FUNCTION DEFINITIONS ///.
int Res_SatAddAnd(sat_solver *pSat, int iVar, int iVar0, int iVar1, int fCompl0, int fCompl1)
ABC_NAMESPACE_IMPL_START int Res_SatAddConst1(sat_solver *pSat, int iVar, int fCompl)
DECLARATIONS ///.
sat_solver * sat_solver_new(void)
void sat_solver_store_mark_clauses_a(sat_solver *s)
int sat_solver_simplify(sat_solver *s)
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 Sat_SolverDoubleClauses(sat_solver *p, int iVar)
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.