49 int f, i, RetValue1, RetValue2;
55 for ( f = 0; f < nFrames; f++ )
105 for ( f = 0; f < nFrames; f++ )
147 for ( f = 0; f <= pCex->iFrame; f++ )
163 assert( iBit == pCex->nBits );
187 Aig_Obj_t * pObjRepr, * pObjFraig, * pObjFraig2, * pObjReprFraig;
191 if ( pObjRepr == NULL )
198 assert( pObjFraig != NULL && pObjReprFraig != NULL );
214 if ( RetValue == -1 )
225 Abc_Print( 1,
"Ssw_ManSweepNodeFilter(): Failed to refine representative.\n" );
263 assert( pObjNew != NULL );
280 Aig_Obj_t * pObj, * pObjNew, * pObjLi, * pObjLo;
301 for ( f = 0; f < p->pPars->nFramesK; f++ )
304 if ( f == p->nFrames-1 )
308 for ( f1 = 0; f1 < p->nFrames; f1++ )
311 pNodeToFrames[2*p->nFrames*pObj->
Id + f1] =
Ssw_ObjFrame( p, pObj, f1 );
314 p->pNodeToFrames = pNodeToFrames;
333 if ( p->pPars->fVerbose )
340 if ( p->pPars->fVerbose )
341 Abc_Print( 1,
"Exceeded the resource limits (%d conflicts). Quitting...\n", p->pPars->nBTLimit );
345 if ( f == p->pPars->nFramesK - 1 )
347 if ( p->pPars->fVerbose )
348 Abc_Print( 1,
"Exceeded the time frame limit (%d time frames). Quitting...\n", p->pPars->nFramesK );
352 if ( TimeLimit && ((
float)TimeLimit <= (
float)(
Abc_Clock()-clkTotal)/(
float)(CLOCKS_PER_SEC)) )
386 int r, TimeLimitPart;
387 abctime nTimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC +
Abc_Clock(): 0;
398 pPars->nBTLimit = nConfMax;
399 pPars->TimeLimit = TimeLimit;
400 pPars->fVerbose = fVerbose;
403 pPars->nFramesK = nFramesMax;
405 if ( pAig->pReprs == NULL )
410 assert( p->vInits == NULL );
415 for ( r = 0; r < nRounds; r++ )
417 if ( p->pPars->fVerbose )
423 Abc_Print( 1,
"All equivalences are refined away.\n" );
427 if ( p->pPars->fVerbose )
433 TimeLimitPart = TimeLimit ? (nTimeToStop -
Abc_Clock()) / CLOCKS_PER_SEC : 0;
437 TimeLimitPart =
Abc_MinInt( TimeLimitPart, TimeLimit2 );
439 TimeLimitPart = TimeLimit2;
448 if ( TimeLimit &&
Abc_Clock() > nTimeToStop )
450 Abc_Print( 1,
"Reached timeout (%d seconds).\n", TimeLimit );
483 Ssw_SignalFilter( pAig, nFramesMax, nConfMax, nRounds, TimeLimit, TimeLimit2, pCex, fLatchOnly, fVerbose );
void Ssw_ManStop(Ssw_Man_t *p)
int Ssw_ClassesClassNum(Ssw_Cla_t *p)
static Aig_Obj_t * Aig_ObjRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
static int Aig_ManConstrNum(Aig_Man_t *p)
void Ssw_ManCleanup(Ssw_Man_t *p)
void Gia_ManReprFromAigRepr(Aig_Man_t *pAig, Gia_Man_t *pGia)
void Ssw_CnfNodeAddToSolver(Ssw_Sat_t *p, Aig_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START Ssw_Sat_t * Ssw_SatStart(int fPolarFlip)
DECLARATIONS ///.
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 ///.
void Ssw_SignalFilterGia(Gia_Man_t *p, int nFramesMax, int nConfMax, int nRounds, int TimeLimit, int TimeLimit2, Abc_Cex_t *pCex, int fLatchOnly, int fVerbose)
void Aig_ManStop(Aig_Man_t *p)
static int Abc_InfoHasBit(unsigned *p, int i)
int Ssw_ClassesCand1Num(Ssw_Cla_t *p)
int Ssw_ManSweepBmcFilter(Ssw_Man_t *p, int TimeLimit)
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
static Aig_Obj_t * Saig_ObjLoToLi(Aig_Man_t *p, Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Ssw_Pars_t_ Ssw_Pars_t
INCLUDES ///.
static void Abc_InfoXorBit(unsigned *p, int i)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
void Aig_ManCleanMarkB(Aig_Man_t *p)
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)
unsigned Aig_ManRandom(int fReset)
typedefABC_NAMESPACE_HEADER_START struct Ssw_Man_t_ Ssw_Man_t
INCLUDES ///.
void Ssw_ManFindStartingState(Ssw_Man_t *p, Abc_Cex_t *pCex)
int Ssw_ClassesRefine(Ssw_Cla_t *p, int fRecursive)
static abctime Abc_Clock()
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
ABC_NAMESPACE_IMPL_START void Ssw_ManRefineByFilterSim(Ssw_Man_t *p, int nFrames)
DECLARATIONS ///.
static int Aig_ManNodeNum(Aig_Man_t *p)
int Ssw_ManSweepNodeFilter(Ssw_Man_t *p, Aig_Obj_t *pObj, int f)
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)
Aig_Obj_t * Ssw_ManSweepBmcFilter_rec(Ssw_Man_t *p, Aig_Obj_t *pObj, int f)
void Aig_ManSetPhase(Aig_Man_t *pAig)
int Ssw_SmlObjsAreEqualBit(void *p, Aig_Obj_t *pObj0, Aig_Obj_t *pObj1)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static int Abc_MinInt(int a, int b)
Ssw_Man_t * Ssw_ManCreate(Aig_Man_t *pAig, Ssw_Pars_t *pPars)
DECLARATIONS ///.
#define Aig_ManForEachNode(p, pObj, i)
void Gia_ManReprToAigRepr2(Aig_Man_t *pAig, Gia_Man_t *pGia)
#define Saig_ManForEachLi(p, pObj, i)
void Ssw_ClassesSetData(Ssw_Cla_t *p, void *pManData, unsigned(*pFuncNodeHash)(void *, Aig_Obj_t *), int(*pFuncNodeIsConst)(void *, Aig_Obj_t *), int(*pFuncNodesAreEqual)(void *, Aig_Obj_t *, Aig_Obj_t *))
void Ssw_ClassesPrint(Ssw_Cla_t *p, int fVeryVerbose)
void Ssw_ManSetDefaultParams(Ssw_Pars_t *p)
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
static int Aig_ObjPhaseReal(Aig_Obj_t *pObj)
#define Saig_ManForEachLo(p, pObj, i)
void Ssw_ManRollForward(Ssw_Man_t *p, int nFrames)
static void Abc_Print(int level, const char *format,...)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Ssw_Cla_t * Ssw_ClassesPrepareFromReprs(Aig_Man_t *pAig)
#define ABC_NAMESPACE_IMPL_START
Ssw_Cla_t * Ssw_ClassesPrepareSimple(Aig_Man_t *pAig, int fLatchCorr, int nMaxLevs)
static int Aig_ManRegNum(Aig_Man_t *p)
int Ssw_SmlObjIsConstBit(void *p, Aig_Obj_t *pObj)
#define Aig_ManForEachObj(p, pObj, i)
static void Ssw_ObjSetFrame(Ssw_Man_t *p, Aig_Obj_t *pObj, int i, Aig_Obj_t *pNode)
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
void Ssw_SignalFilter(Aig_Man_t *pAig, int nFramesMax, int nConfMax, int nRounds, int TimeLimit, int TimeLimit2, Abc_Cex_t *pCex, int fLatchOnly, int fVerbose)
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
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)
void Ssw_SatStop(Ssw_Sat_t *p)
void Ssw_ManResimulateBit(Ssw_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pRepr)
DECLARATIONS ///.
static int Saig_ObjIsPi(Aig_Man_t *p, Aig_Obj_t *pObj)
int Ssw_ClassesRefineConst1(Ssw_Cla_t *p, int fRecursive)
#define Saig_ManForEachPi(p, pObj, i)
void Ssw_SmlSavePatternAig(Ssw_Man_t *p, int f)
static Aig_Obj_t * Ssw_ObjFrame(Ssw_Man_t *p, Aig_Obj_t *pObj, int i)