78 printf(
"%d ", pLeaf->
Id );
98 int i, iFunc0, iFunc1;
112 for ( i = 0, pTemp = pIfObj; pTemp; pTemp = pTemp->
pEquiv, i++ )
148 Abc_Print( -1,
"If_ManNodeShapeMap(): Computing local AIG has failed.\n" );
173 uWord = (uWord & 0x55555555) + ((uWord>>1) & 0x55555555);
174 uWord = (uWord & 0x33333333) + ((uWord>>2) & 0x33333333);
175 uWord = (uWord & 0x0F0F0F0F) + ((uWord>>4) & 0x0F0F0F0F);
176 uWord = (uWord & 0x00FF00FF) + ((uWord>>8) & 0x00FF00FF);
177 return (uWord & 0x0000FFFF) + (uWord>>16);
182 If_Obj_t * pTemp, * pTempBest = NULL;
183 int i, iFunc, iFunc0, iFunc1, iBest = 0;
197 for ( i = 0, pTemp = pIfObj; pTemp; pTemp = pTemp->
pEquiv, i++ )
205 iFunc = iFunc0 | iFunc1;
238 Abc_Print( -1,
"If_ManNodeShapeMap2(): Computing local AIG has failed.\n" );
282 for ( pTemp = pIfObj; pTemp; pTemp = pTemp->
pEquiv )
293 if ( fRootAdded == 0 && pTemp == pIfObj )
296 if ( fNodeAdded && !fRootAdded )
339 int i, k, Lits[2], Value;
342 for ( i = 0; i < nVars; i++ )
349 for ( i = 0; i < nVars; i++ )
353 for ( i = 0; i < nVars; i++ )
360 for ( i = 0; i < nVars; i++ )
361 for ( k = i+1; k < nVars; k++ )
391 for ( pTemp = pIfObj; pTemp; pTemp = pTemp->
pEquiv )
452 for ( pTemp = pObj; pTemp; pTemp = pTemp->
pEquiv )
536 int i, Entry1, Entry2, RetValue = 1;
550 if ( pLeaf->
fMark == 0 )
int If_ManNodeShapeMap2(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Int_t *vShape)
static int * Vec_IntArray(Vec_Int_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static If_Obj_t * If_ManObj(If_Man_t *p, int i)
int sat_solver_addclause(sat_solver *s, lit *begin, lit *end)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int If_ObjIsAnd(If_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)
#define If_CutForEachLeaf(p, pCut, pLeaf, i)
int If_ManNodeShapeMap(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Int_t *vShape)
void sat_solver_delete(sat_solver *s)
static int Abc_Var2Lit(int Var, int fCompl)
static void If_ObjSetSatVar(If_Obj_t *pIfObj, int v)
void If_ObjConePrint(If_Man_t *pIfMan, If_Obj_t *pIfObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int If_ObjIsCi(If_Obj_t *pObj)
static If_Cut_t * If_ObjCutBest(If_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static int sat_solver_var_value(sat_solver *s, int v)
int If_ManNodeShape(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Int_t *vShape, int fExact)
void If_ManNodeShape2_rec(sat_solver *pSat, If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Int_t *vShape)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
int If_ManNodeShapeSat(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Int_t *vShape)
static void If_CutSetDataInt(If_Cut_t *pCut, int Data)
void sat_solver_setnvars(sat_solver *s, int n)
Vec_Ptr_t * If_ManConeCollect(If_Man_t *pIfMan, If_Obj_t *pIfObj, If_Cut_t *pCut)
#define ABC_NAMESPACE_IMPL_END
static void sat_solver_add_choice(sat_solver *pSat, int iVar, Vec_Int_t *vVars)
static int If_CutDataInt(If_Cut_t *pCut)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Vec_IntCap(Vec_Int_t *p)
int If_ManNodeShapeMap_rec(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Ptr_t *vVisited, Vec_Int_t *vShape)
static void Abc_Print(int level, const char *format,...)
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
#define ABC_NAMESPACE_IMPL_START
static int If_ObjSatVar(If_Obj_t *pIfObj)
static int If_WordCountOnes(unsigned uWord)
sat_solver * sat_solver_new(void)
static int Vec_IntSize(Vec_Int_t *p)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
int If_ManCheckShape(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Int_t *vShape)
static int Abc_Lit2Var(int Lit)
int If_ManConeCollect_rec(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Ptr_t *vVisited, Vec_Ptr_t *vCone)
static void Vec_PtrClear(Vec_Ptr_t *p)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static void Vec_IntClear(Vec_Int_t *p)
int If_ManNodeShapeMap2_rec(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Ptr_t *vVisited, Vec_Int_t *vShape)
ABC_NAMESPACE_IMPL_START void If_ObjConePrint_rec(If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Ptr_t *vVisited)
DECLARATIONS ///.
static void Vec_PtrFree(Vec_Ptr_t *p)