67 int pLits[4], RetValue, VarF, VarI, VarT, VarE, fCompT, fCompE;
93 if ( p->
pPars->fPolarFlip )
104 if ( p->
pPars->fPolarFlip )
115 if ( p->
pPars->fPolarFlip )
126 if ( p->
pPars->fPolarFlip )
151 if ( p->
pPars->fPolarFlip )
162 if ( p->
pPars->fPolarFlip )
186 int * pLits, nLits, RetValue, i;
198 if ( p->
pPars->fPolarFlip )
210 if ( p->
pPars->fPolarFlip )
216 if ( p->
pPars->fPolarFlip )
218 if ( pNode->
fPhase ) pLits[nLits-1] =
lit_neg( pLits[nLits-1] );
310 int i, k, fUseMuxes = 1;
408 float dActConeBumpMax = 20.0;
442 float dActConeRatio = 0.5;
443 int LevelMin, LevelMax;
449 assert( dActConeRatio > 0 && dActConeRatio < 1 );
451 LevelMin = (int)(LevelMax * (1.0 - dActConeRatio));
473 int nBTLimit = p->
pPars->nBTLimit;
474 int Lit, RetValue, status, nConflicts;
489 if ( p->
pSat == NULL ||
490 (p->
pPars->nSatVarMax &&
516 if ( p->
pPars->fPolarFlip )
526 (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
540 else if ( RetValue ==
l_True )
573 int nBTLimit = p->
pPars->nBTLimit;
574 int Lits[2], RetValue, status, nConflicts;
589 if ( p->
pSat == NULL ||
590 (p->
pPars->nSatVarMax &&
619 if ( p->
pPars->fPolarFlip )
630 (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
645 else if ( RetValue ==
l_True )
689 pPat->nPatLitsMin = 0;
707 pObj->
fMark0 = (status == 0);
708 pObj->
fMark1 = (status == 1);
725 pPat->timeTotalSave +=
Abc_Clock() - clk3;
728 if ( pPars->fCheckMiter )
733 if ( pPars->fVerbose )
761 for ( k = 0; k < nSize; k++ )
771 int i, status, iStart = 0;
779 pPat->nPatLitsMin = 0;
784 pObj->
fMark0 = (status == 0);
785 pObj->
fMark1 = (status == 1);
795 pPat->timeTotalSave +=
Abc_Clock() - clk3;
798 if ( pPars->fCheckMiter )
873 int iPat = 0, nPatsInit, nPats;
913 if ( iPat % nPatsInit == 0 )
931 if ( pPars->fVerbose )
1086 *pvStatus = vStatus;
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
Vec_Int_t * Cec_ManSatSolveMiter(Gia_Man_t *pAig, Cec_ParSat_t *pPars, Vec_Str_t **pvStatus)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
void Cec_ManSatSolveSeq_rec(Cec_ManSat_t *pSat, Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Ptr_t *vInfo, int iPat, int nRegs)
void Cec_ManPatSavePatternCSat(Cec_ManPat_t *pMan, Vec_Int_t *vPat)
static ABC_NAMESPACE_IMPL_START int Cec_ObjSatNum(Cec_ManSat_t *p, Gia_Obj_t *pObj)
DECLARATIONS ///.
#define Gia_ManForEachCo(p, pObj, i)
void Cec_ManSatPrintStats(Cec_ManSat_t *p)
static int Gia_ManPoNum(Gia_Man_t *p)
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 Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Abc_InfoHasBit(unsigned *p, int i)
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)
Vec_Int_t * Cec_ManSatReadCex(Cec_ManSat_t *pSat)
static void Abc_InfoXorBit(unsigned *p, int i)
static void veci_push(veci *v, int e)
void Cec_CollectSuper(Gia_Obj_t *pObj, int fUseMuxes, Vec_Ptr_t *vSuper)
void sat_solver_delete(sat_solver *s)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
static int Abc_Var2Lit(int Var, int fCompl)
static void Vec_PtrCleanSimInfo(Vec_Ptr_t *vInfo, int iWord, int nWords)
static int Gia_ObjValue(Gia_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
static Vec_Str_t * Vec_StrAlloc(int nCap)
static void veci_resize(veci *v, int k)
void Cec_ManSavePattern(Cec_ManSat_t *p, Gia_Obj_t *pObj1, Gia_Obj_t *pObj2)
static abctime Abc_Clock()
static void Vec_StrPush(Vec_Str_t *p, char Entry)
static int Vec_PtrSize(Vec_Ptr_t *p)
void Cec_CollectSuper_rec(Gia_Obj_t *pObj, Vec_Ptr_t *vSuper, int fFirst, int fUseMuxes)
static void Cec_ObjSetSatNum(Cec_ManSat_t *p, Gia_Obj_t *pObj, int Num)
static Gia_Obj_t * Gia_ManConst1(Gia_Man_t *p)
static int sat_solver_var_value(sat_solver *s, int v)
void Cec_ManSatSolve(Cec_ManPat_t *pPat, Gia_Man_t *pAig, Cec_ParSat_t *pPars)
void Cec_ManSatSolverRecycle(Cec_ManSat_t *p)
Vec_Int_t * Cbs_ManSolveMiterNc(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int fVerbose)
int Cec_ManSatSolveExractPattern(Vec_Int_t *vCexStore, int iStart, Vec_Int_t *vPat)
static Gia_Obj_t * Gia_ObjChild1(Gia_Obj_t *pObj)
static lit lit_neg(lit l)
static Gia_Obj_t * Gia_Not(Gia_Obj_t *p)
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static char Vec_StrEntry(Vec_Str_t *p, int i)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static void Bar_ProgressUpdate(Bar_Progress_t *p, int nItemsCur, char *pString)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Vec_StrFree(Vec_Str_t *p)
int Cec_ManSatCheckNodeTwo(Cec_ManSat_t *p, Gia_Obj_t *pObj1, Gia_Obj_t *pObj2)
void Cec_ManPatSavePattern(Cec_ManPat_t *pPat, Cec_ManSat_t *p, Gia_Obj_t *pObj)
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 void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
void Cec_ObjAddToFrontier(Cec_ManSat_t *p, Gia_Obj_t *pObj, Vec_Ptr_t *vFrontier)
typedefABC_NAMESPACE_HEADER_START struct Cec_ManPat_t_ Cec_ManPat_t
INCLUDES ///.
void Cec_ManSatSolveCSat(Cec_ManPat_t *pPat, Gia_Man_t *pAig, Cec_ParSat_t *pPars)
#define ABC_NAMESPACE_IMPL_END
void Cec_SetActivityFactors_rec(Cec_ManSat_t *p, Gia_Obj_t *pObj, int LevelMin, int LevelMax)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
int Cec_ManSatCheckNode(Cec_ManSat_t *p, Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
void Cec_AddClausesSuper(Cec_ManSat_t *p, Gia_Obj_t *pNode, Vec_Ptr_t *vSuper)
void Cec_ManSatAddToStore(Vec_Int_t *vCexStore, Vec_Int_t *vCex, int Out)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
void Cec_ManSatStop(Cec_ManSat_t *p)
int Gia_ObjIsMuxType(Gia_Obj_t *pNode)
static int Vec_StrSize(Vec_Str_t *p)
static int Vec_PtrReadWordsSimInfo(Vec_Ptr_t *p)
int sat_solver_simplify(sat_solver *s)
sat_solver * sat_solver_new(void)
static int Vec_IntSize(Vec_Int_t *p)
void Cec_CnfNodeAddToSolver(Cec_ManSat_t *p, Gia_Obj_t *pObj)
static int Gia_IsComplement(Gia_Obj_t *p)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Gia_Obj_t * Gia_ObjRecognizeMux(Gia_Obj_t *pNode, Gia_Obj_t **ppNodeT, Gia_Obj_t **ppNodeE)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
#define ABC_CALLOC(type, num)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
static void Vec_PtrReallocSimInfo(Vec_Ptr_t *vInfo)
typedefABC_NAMESPACE_HEADER_START struct Cec_ParSat_t_ Cec_ParSat_t
INCLUDES ///.
static void Vec_PtrClear(Vec_Ptr_t *p)
void Gia_ManSetPhase(Gia_Man_t *p)
int Gia_ManLevelNum(Gia_Man_t *p)
void Cec_AddClausesMux(Cec_ManSat_t *p, Gia_Obj_t *pNode)
void Gia_ManIncrementTravId(Gia_Man_t *p)
int Cec_ObjSatVarValue(Cec_ManSat_t *p, Gia_Obj_t *pObj)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
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)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
void Bar_ProgressStop(Bar_Progress_t *p)
int Cec_SetActivityFactors(Cec_ManSat_t *p, Gia_Obj_t *pObj)
Cec_ManSat_t * Cec_ManSatCreate(Gia_Man_t *pAig, Cec_ParSat_t *pPars)
DECLARATIONS ///.
Bar_Progress_t * Bar_ProgressStart(FILE *pFile, int nItemsTotal)
FUNCTION DEFINITIONS ///.
static int Gia_ObjCioId(Gia_Obj_t *pObj)
void Cec_ManSatSolveMiter_rec(Cec_ManSat_t *pSat, Gia_Man_t *p, Gia_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Gia_ManCoNum(Gia_Man_t *p)
Vec_Str_t * Cec_ManSatSolveSeq(Vec_Ptr_t *vPatts, Gia_Man_t *pAig, Cec_ParSat_t *pPars, int nRegs, int *pnPats)