88 k = vArray->nSize; vArray->nSize = 0;
113 int k, Fanin, Level = 0;
116 return Level + fAddLevel;
141 int k, Fanout, LevelR = 0;
144 return LevelR + fAddLevel;
175 p->nNodes = p->nObjs - p->nPis - p->nPos;
179 p->vTruths = vTruths;
180 p->vFanins = *vFanins;
197 p->nLevelMax =
Vec_IntFindMax(&p->vLevels) + p->pPars->nGrowthLevel;
318 assert( iFanin != iFaninNew );
319 if ( uTruth == 0 || ~uTruth == 0 )
338 if ( iFaninNew != -1 )
static int Sfm_ObjAddsLevel(Sfm_Ntk_t *p, int i)
void Sfm_NtkUpdateLevelR_rec(Sfm_Ntk_t *p, int iNode)
static Vec_Wec_t * Vec_WecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Sfm_NtkPrepare(Sfm_Ntk_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
#define Sfm_ObjForEachFanin(p, Node, Fan, i)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Vec_WecFree(Vec_Wec_t *p)
int Sfm_NodeReadUsed(Sfm_Ntk_t *p, int i)
void sat_solver_delete(sat_solver *s)
void Sfm_NtkRemoveFanin(Sfm_Ntk_t *p, int iNode, int iFanin)
static int Sfm_ObjFaninNum(Sfm_Ntk_t *p, int i)
static int Vec_IntFind(Vec_Int_t *p, int Entry)
void Sfm_NtkUpdate(Sfm_Ntk_t *p, int iNode, int f, int iFaninNew, word uTruth)
typedefABC_NAMESPACE_HEADER_START struct Sfm_Ntk_t_ Sfm_Ntk_t
INCLUDES ///.
static int Abc_MaxInt(int a, int b)
static void Vec_WrdFreeP(Vec_Wrd_t **p)
static int Vec_WecSize(Vec_Wec_t *p)
static int Sfm_ObjIsNode(Sfm_Ntk_t *p, int i)
word * Sfm_NodeReadTruth(Sfm_Ntk_t *p, int i)
void Sfm_CreateLevel(Vec_Wec_t *vFanins, Vec_Int_t *vLevels, Vec_Str_t *vEmpty)
static int Sfm_ObjLevel(Sfm_Ntk_t *p, int iObj)
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
static int Sfm_ObjFanin(Sfm_Ntk_t *p, int i, int k)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Sfm_ObjIsPi(Sfm_Ntk_t *p, int i)
static char Vec_StrEntry(Vec_Str_t *p, int i)
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Sfm_ObjForEachFanout(p, Node, Fan, i)
static void Vec_StrFree(Vec_Str_t *p)
static void Vec_WrdWriteEntry(Vec_Wrd_t *p, int i, word Entry)
static int Sfm_ObjIsPo(Sfm_Ntk_t *p, int i)
static void Vec_WecErase(Vec_Wec_t *p)
void sat_solver_setnvars(sat_solver *s, int n)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Vec_IntFindMax(Vec_Int_t *p)
unsigned __int64 word
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
void Sfm_CreateFanout(Vec_Wec_t *vFanins, Vec_Wec_t *vFanouts)
int Sfm_NodeReadFixed(Sfm_Ntk_t *p, int i)
void Sfm_NtkDeleteObj_rec(Sfm_Ntk_t *p, int iNode)
static void Vec_WrdFree(Vec_Wrd_t *p)
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
static int Sfm_ObjLevelNewR(Vec_Int_t *vArray, Vec_Int_t *vLevelsR, int fAddLevel)
Vec_Wec_t * Sfm_CreateCnf(Sfm_Ntk_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static Vec_Int_t * Sfm_ObjFiArray(Sfm_Ntk_t *p, int i)
static int Sfm_ObjLevelNew(Vec_Int_t *vArray, Vec_Int_t *vLevels, int fAddLevel)
static void Vec_IntFreeP(Vec_Int_t **p)
static int Sfm_ObjLevelR(Sfm_Ntk_t *p, int iObj)
static int Vec_IntCap(Vec_Int_t *p)
Sfm_Ntk_t * Sfm_NtkConstruct(Vec_Wec_t *vFanins, int nPis, int nPos, Vec_Str_t *vFixed, Vec_Str_t *vEmpty, Vec_Wrd_t *vTruths)
static int Vec_IntRemove(Vec_Int_t *p, int Entry)
void Sfm_NtkFree(Sfm_Ntk_t *p)
#define ABC_NAMESPACE_IMPL_START
static Vec_Int_t * Vec_WecEntry(Vec_Wec_t *p, int i)
static Vec_Wrd_t * Vec_WrdStart(int nSize)
static int Sfm_ObjAddsLevelArray(Vec_Str_t *p, int i)
void Sfm_CreateLevelR(Vec_Wec_t *vFanouts, Vec_Int_t *vLevelsR, Vec_Str_t *vEmpty)
sat_solver * sat_solver_new(void)
static int Vec_IntSize(Vec_Int_t *p)
int Sfm_TruthToCnf(word Truth, int nVars, Vec_Int_t *vCover, Vec_Str_t *vCnf)
static int Sfm_ObjFanoutNum(Sfm_Ntk_t *p, int i)
static void Sfm_ObjSetLevel(Sfm_Ntk_t *p, int iObj, int Lev)
static Vec_Int_t * Sfm_ObjFoArray(Sfm_Ntk_t *p, int i)
#define ABC_CALLOC(type, num)
ABC_NAMESPACE_IMPL_START void Sfm_CheckConsistency(Vec_Wec_t *vFanins, int nPis, int nPos, Vec_Str_t *vFixed)
DECLARATIONS ///.
#define Vec_WecForEachLevelReverse(vGlob, vVec, i)
static void Vec_WecFreeP(Vec_Wec_t **p)
static int Sfm_ObjIsFixed(Sfm_Ntk_t *p, int i)
void Sfm_NtkAddFanin(Sfm_Ntk_t *p, int iNode, int iFanin)
void Sfm_NtkUpdateLevel_rec(Sfm_Ntk_t *p, int iNode)
static void Vec_IntFree(Vec_Int_t *p)
Vec_Int_t * Sfm_NodeReadFanins(Sfm_Ntk_t *p, int i)
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
static void Sfm_ObjSetLevelR(Sfm_Ntk_t *p, int iObj, int Lev)
static void Vec_StrFreeP(Vec_Str_t **p)
static void Vec_WecInit(Vec_Wec_t *p, int nSize)
static word * Vec_WrdEntryP(Vec_Wrd_t *p, int i)