232 int i, nodePart, nParts;
264 printf(
"Aig_ManPartSplit(): Skipping partition # %d without nodes (warning).\n", i );
384 int i, Lits[2], iSatVarOld, iNodeIdOld;
403 if ( iSatVarOld == 0 )
424 if ( iSatVarOld == 0 )
450 assert( iSatVarOld != 0 );
492 int nConfPart,
int nConfTotal,
int fAlignPol,
int fSynthesize,
int fVerbose )
499 int nConfRemaining = nConfTotal, nNodes = 0;
500 int i, status, RetValue = -1;
520 printf(
"Unknown partitioning algorithm.\n" );
526 printf(
"Partitioning derived %d partitions. ",
Vec_IntFindMax(vNode2Part) + 1 );
538 printf(
"Partions were transformed into AIGs. " );
574 status =
sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfRemaining, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
577 printf(
"%4d : Aig = %6d. Vs = %7d. RootCs = %7d. LearnCs = %6d. ",
588 else if ( status ==
l_True )
593 if ( nConfRemaining <= 0 )
595 printf(
"Exceeded the limit on the total number of conflicts (%d).\n", nConfTotal );
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
void Aig_ManDeriveCounterExample(Aig_Man_t *p, Vec_Int_t *vNode2Var, sat_solver *pSat)
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
static Vec_Vec_t * Vec_VecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Aig_ObjFaninId0(Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int sat_solver_addclause(sat_solver *s, lit *begin, lit *end)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_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)
void sat_solver_delete(sat_solver *s)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
void Cnf_DataTranformPolarity(Cnf_Dat_t *pCnf, int fTransformPos)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define Aig_ManForEachCo(p, pObj, i)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
static abctime Abc_Clock()
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START Aig_Man_t * Dar_ManRwsat(Aig_Man_t *pAig, int fBalance, int fVerbose)
DECLARATIONS ///.
static int Aig_ManNodeNum(Aig_Man_t *p)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
static lit lit_neg(lit l)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Aig_ManCoNum(Aig_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
#define Aig_ManForEachNode(p, pObj, i)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Vec_Int_t * Aig_ManPartitionDfs(Aig_Man_t *p, int nPartSize, int fPreorder)
static lit toLitCond(int v, int c)
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)
static int Aig_ManCiNum(Aig_Man_t *p)
int sat_solver_nvars(sat_solver *s)
#define ABC_NAMESPACE_IMPL_END
Vec_Ptr_t * Aig_ManDfsPreorder(Aig_Man_t *p, int fNodesOnly)
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Vec_Vec_t * Aig_ManLevelize(Aig_Man_t *p)
Vec_Ptr_t * Aig_ManDfs(Aig_Man_t *p, int fNodesOnly)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Aig_Man_t * Aig_ManPartSplitOne(Aig_Man_t *p, Vec_Ptr_t *vNodes, Vec_Int_t **pvPio2Id)
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
static Vec_Vec_t * Vec_VecStart(int nSize)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static int Aig_ManObjNumMax(Aig_Man_t *p)
void Cnf_DataLift(Cnf_Dat_t *p, int nVarsPlus)
int Aig_ManPartitionedSat(Aig_Man_t *p, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
void Aig_ManPartResetNodePolarity(Aig_Man_t *pPart)
#define ABC_NAMESPACE_IMPL_START
void Aig_ManPartSetNodePolarity(Aig_Man_t *p, Aig_Man_t *pPart, Vec_Int_t *vPio2Id)
sat_solver * sat_solver_new(void)
#define Aig_ManForEachObj(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
int Aig_ManAddNewCnfToSolver(sat_solver *pSat, Aig_Man_t *pAig, Vec_Int_t *vNode2Var, Vec_Int_t *vPioIds, Vec_Ptr_t *vPartPos, int fAlignPol)
void Aig_ManPartSplitOne_rec(Aig_Man_t *pNew, Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Int_t *vPio2Id)
void Cnf_DataFree(Cnf_Dat_t *p)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
static int Aig_ObjId(Aig_Obj_t *pObj)
#define Cnf_CnfForClause(p, pBeg, pEnd, i)
MACRO DEFINITIONS ///.
Vec_Ptr_t * Aig_ManPartSplit(Aig_Man_t *p, Vec_Int_t *vNode2Part, Vec_Ptr_t **pvPio2Id, Vec_Ptr_t **pvPart2Pos)
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
static int Aig_ObjRefs(Aig_Obj_t *pObj)
Vec_Int_t * Aig_ManPartitionLevelized(Aig_Man_t *p, int nPartSize)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Vec_Int_t * Aig_ManPartitionMonolithic(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
int * Sat_SolverGetModel(sat_solver *p, int *pVars, int nVars)
#define Vec_VecForEachEntryReverseReverse(Type, vGlob, pEntry, i, k)
static void Vec_PtrFree(Vec_Ptr_t *p)