48 int fUseNoBoundary = 0;
66 if ( p->pPars->fPolarFlip )
90 assert( (nConstrPairs & 1) == 0 );
91 for ( i = 0; i < nConstrPairs; i += 2 )
101 Abc_Print( 1,
"Total constraints = %d. Added constraints = %d.\n", nConstrPairs/2, Counter );
119 memset( p->pPatWords, 0,
sizeof(
unsigned) * p->nPatWords );
140 memset( p->pPatWords, 0,
sizeof(
unsigned) * p->nPatWords );
189 Aig_Obj_t * pObjRepr, * pObjFraig, * pObjFraig2, * pObjReprFraig;
194 if ( pObjRepr == NULL )
201 assert( pObjFraig != NULL && pObjReprFraig != NULL );
207 if ( !fBmc && p->pPars->fDynamic )
230 if ( RetValue == -1 )
236 if ( !fBmc && p->pPars->fDynamic )
244 if ( !p->pPars->fConstrs )
251 Abc_Print( 1,
"Ssw_ManSweepNode(): Failed to refine representative.\n" );
270 Aig_Obj_t * pObj, * pObjNew, * pObjLi, * pObjLo;
282 if ( p->pPars->fVerbose )
284 for ( f = 0; f < p->pPars->nFramesK; f++ )
293 if ( p->pPars->fVerbose )
300 if ( f == p->pPars->nFramesK - 1 )
313 if ( p->pPars->fVerbose )
339 sprintf( pBuffer,
"equiv%03d.aig", Num );
340 pFile = fopen( pBuffer,
"w" );
343 Abc_Print( 1,
"Cannot open file %s for writing.\n", pBuffer );
350 Abc_Print( 1,
"AIG with %4d disproved equivs is dumped into file \"%s\".\n",
Vec_IntSize(vPairs)/2, pBuffer );
370 int nConstrPairs, i, f;
380 assert( (nConstrPairs & 1) == 0 );
381 for ( i = 0; i < nConstrPairs; i += 2 )
390 pObj =
Aig_ManCo( p->pFrames, nConstrPairs + i );
396 f = p->pPars->nFramesK;
405 if ( p->pPars->fVerbose )
407 vDisproved = p->pPars->fEquivDump?
Vec_IntAlloc(1000) : NULL;
410 if ( p->pPars->fVerbose )
421 if ( p->pPars->fVerbose )
426 if ( p->pPars->fEquivDump )
void Ssw_SmlSavePatternAig(Ssw_Man_t *p, int f)
static Aig_Obj_t * Aig_ObjRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
void Ssw_CnfNodeAddToSolver(Ssw_Sat_t *p, Aig_Obj_t *pObj)
int Ssw_ManSweep(Ssw_Man_t *p)
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
static Aig_Obj_t * Ssw_ObjChild0Fra(Ssw_Man_t *p, Aig_Obj_t *pObj, int i)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static Aig_Obj_t * Aig_ObjChild0(Aig_Obj_t *pObj)
void Ssw_ManResimulateWord(Ssw_Man_t *p, Aig_Obj_t *pCand, Aig_Obj_t *pRepr, int f)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
int Ssw_ManSweepBmc(Ssw_Man_t *p)
int Ssw_NodesAreConstrained(Ssw_Man_t *p, Aig_Obj_t *pOld, Aig_Obj_t *pNew)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
static int Aig_IsComplement(Aig_Obj_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
static Aig_Obj_t * Aig_ManConst0(Aig_Man_t *p)
#define Aig_ManForEachCo(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Ssw_Man_t_ Ssw_Man_t
INCLUDES ///.
Aig_Man_t * Saig_ManCreateEquivMiter(Aig_Man_t *pAig, Vec_Int_t *vPairs)
static abctime Abc_Clock()
ABC_NAMESPACE_IMPL_START int Ssw_ManGetSatVarValue(Ssw_Man_t *p, Aig_Obj_t *pObj, int f)
DECLARATIONS ///.
static int sat_solver_var_value(sat_solver *s, int v)
static Aig_Obj_t * Ssw_ObjChild1Fra(Ssw_Man_t *p, Aig_Obj_t *pObj, int i)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
void Ssw_ClassesRemoveNode(Ssw_Cla_t *p, Aig_Obj_t *pObj)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static int Aig_ManCoNum(Aig_Man_t *p)
void Ssw_ClassesClearRefined(Ssw_Cla_t *p)
static void Bar_ProgressUpdate(Bar_Progress_t *p, int nItemsCur, char *pString)
#define Aig_ManForEachNode(p, pObj, i)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Ssw_CheckConstraints(Ssw_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static int Aig_ObjPhaseReal(Aig_Obj_t *pObj)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define Saig_ManForEachLo(p, pObj, i)
static void Vec_IntFreeP(Vec_Int_t **p)
static void Abc_Print(int level, const char *format,...)
void Ssw_ManDumpEquivMiter(Aig_Man_t *p, Vec_Int_t *vPairs, int Num)
void Ioa_WriteAiger(Aig_Man_t *pMan, char *pFileName, int fWriteSymbols, int fCompact)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
void Ssw_ManLoadSolver(Ssw_Man_t *p, Aig_Obj_t *pRepr, Aig_Obj_t *pObj)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static void Abc_InfoSetBit(unsigned *p, int i)
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
static int Aig_ManRegNum(Aig_Man_t *p)
int sat_solver_simplify(sat_solver *s)
int Ssw_ManSweepNode(Ssw_Man_t *p, Aig_Obj_t *pObj, int f, int fBmc, Vec_Int_t *vPairs)
static int Vec_IntSize(Vec_Int_t *p)
#define Aig_ManForEachObj(p, pObj, i)
static void Ssw_ObjSetFrame(Ssw_Man_t *p, Aig_Obj_t *pObj, int i, Aig_Obj_t *pNode)
Aig_Man_t * Ssw_FramesWithClasses(Ssw_Man_t *p)
static int Ssw_ObjSatNum(Ssw_Sat_t *p, Aig_Obj_t *pObj)
MACRO DEFINITIONS ///.
void Ssw_SmlAddPatternDyn(Ssw_Man_t *p)
int Ssw_NodesAreEquiv(Ssw_Man_t *p, Aig_Obj_t *pOld, Aig_Obj_t *pNew)
DECLARATIONS ///.
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
int Ssw_CnfGetNodeValue(Ssw_Sat_t *p, Aig_Obj_t *pObj)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
void Bar_ProgressStop(Bar_Progress_t *p)
void Ssw_ManResimulateBit(Ssw_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pRepr)
DECLARATIONS ///.
Bar_Progress_t * Bar_ProgressStart(FILE *pFile, int nItemsTotal)
FUNCTION DEFINITIONS ///.
void Ssw_SmlSavePatternAigPhase(Ssw_Man_t *p, int f)
static int Aig_ObjCioId(Aig_Obj_t *pObj)
#define Saig_ManForEachPi(p, pObj, i)
static Aig_Obj_t * Ssw_ObjFrame(Ssw_Man_t *p, Aig_Obj_t *pObj, int i)