54 assert( Gia_ObjIsAnd(pObj) );
55 Cec_ManCombSpecReduce_rec( pNew,
p, Gia_ObjFanin0(pObj) );
56 Cec_ManCombSpecReduce_rec( pNew,
p, Gia_ObjFanin1(pObj) );
57 return Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
76 if ( (pRepr = Gia_ObjReprObj(
p, Gia_ObjId(
p, pObj))) )
78 Cec_ManCombSpecReduce_rec( pNew,
p, pRepr );
79 pObj->
Value = Abc_LitNotCond( pRepr->
Value, Gia_ObjPhase(pRepr) ^ Gia_ObjPhase(pObj) );
82 pObj->
Value = Cec_ManCombSpecReal( pNew,
p, pObj );
101 int i, iPrev, iObj, iPrevNew, iObjNew;
106 pNew->
pName = Abc_UtilStrsav(
p->pName );
107 pNew->
pSpec = Abc_UtilStrsav(
p->pSpec );
109 Gia_ManConst0(
p)->Value = 0;
111 pObj->
Value = Gia_ManAppendCi(pNew);
112 *pvOutputs = Vec_IntAlloc( 1000 );
113 vXorLits = Vec_IntAlloc( 1000 );
118 if ( Gia_ObjIsConst(
p, i ) )
120 iObjNew = Cec_ManCombSpecReal( pNew,
p, pObj );
121 iObjNew = Abc_LitNotCond( iObjNew, Gia_ObjPhase(pObj) );
124 Vec_IntPush( *pvOutputs, 0 );
125 Vec_IntPush( *pvOutputs, i );
126 Vec_IntPush( vXorLits, iObjNew );
129 else if ( Gia_ObjIsHead(
p, i ) )
134 iPrevNew = Cec_ManCombSpecReal( pNew,
p, Gia_ManObj(
p, iPrev) );
135 iObjNew = Cec_ManCombSpecReal( pNew,
p, Gia_ManObj(
p, iObj) );
136 iPrevNew = Abc_LitNotCond( iPrevNew, Gia_ObjPhase(pObj) ^ Gia_ObjPhase(Gia_ManObj(
p, iPrev)) );
137 iObjNew = Abc_LitNotCond( iObjNew, Gia_ObjPhase(pObj) ^ Gia_ObjPhase(Gia_ManObj(
p, iObj)) );
138 if ( iPrevNew != iObjNew && iPrevNew != 0 && iObjNew != 1 )
140 Vec_IntPush( *pvOutputs, iPrev );
141 Vec_IntPush( *pvOutputs, iObj );
142 Vec_IntPush( vXorLits,
Gia_ManHashAnd(pNew, iPrevNew, Abc_LitNot(iObjNew)) );
147 iPrevNew = Cec_ManCombSpecReal( pNew,
p, Gia_ManObj(
p, iPrev) );
148 iObjNew = Cec_ManCombSpecReal( pNew,
p, Gia_ManObj(
p, iObj) );
149 iPrevNew = Abc_LitNotCond( iPrevNew, Gia_ObjPhase(pObj) ^ Gia_ObjPhase(Gia_ManObj(
p, iPrev)) );
150 iObjNew = Abc_LitNotCond( iObjNew, Gia_ObjPhase(pObj) ^ Gia_ObjPhase(Gia_ManObj(
p, iObj)) );
151 if ( iPrevNew != iObjNew && iPrevNew != 0 && iObjNew != 1 )
153 Vec_IntPush( *pvOutputs, iPrev );
154 Vec_IntPush( *pvOutputs, iObj );
155 Vec_IntPush( vXorLits,
Gia_ManHashAnd(pNew, iPrevNew, Abc_LitNot(iObjNew)) );
164 pRepr = Gia_ObjReprObj(
p, Gia_ObjId(
p,pObj) );
167 iPrevNew = Gia_ObjIsConst(
p, i)? 0 : Cec_ManCombSpecReal( pNew,
p, pRepr );
168 iObjNew = Cec_ManCombSpecReal( pNew,
p, pObj );
169 iObjNew = Abc_LitNotCond( iObjNew, Gia_ObjPhase(pRepr) ^ Gia_ObjPhase(pObj) );
170 if ( iPrevNew != iObjNew )
172 Vec_IntPush( *pvOutputs, Gia_ObjId(
p, pRepr) );
173 Vec_IntPush( *pvOutputs, Gia_ObjId(
p, pObj) );
179 Gia_ManAppendCo( pNew, iObjNew );
180 Vec_IntFree( vXorLits );
203 int nItersMax = 1000;
212 abctime clkSat = 0, clkSim = 0, clkSrm = 0, clkTotal = Abc_Clock();
213 abctime clk2, clk = Abc_Clock();
230 pParsSat->nBTLimit = pPars->
nBTLimit;
231 pParsSat->fVerbose = pPars->
fVerbose;
234 Abc_Print( 1,
"Obj = %7d. And = %7d. Conf = %5d. Ring = %d. CSat = %d.\n",
239 for ( r = 0; r < nItersMax; r++ )
245 assert( Gia_ManRegNum(pSrm) == 0 && Gia_ManCiNum(pSrm) == Gia_ManCiNum(pAig) );
246 clkSrm += Abc_Clock() - clk2;
247 if ( Gia_ManCoNum(pSrm) == 0 )
251 Vec_IntFree( vOutputs );
263 clkSat += Abc_Clock() - clk2;
264 if ( Vec_IntSize(vCexStore) == 0 )
268 Vec_IntFree( vCexStore );
269 Vec_StrFree( vStatus );
270 Vec_IntFree( vOutputs );
276 Vec_IntFree( vCexStore );
277 clkSim += Abc_Clock() - clk2;
281 Vec_StrFree( vStatus );
282 Vec_IntFree( vOutputs );
286 if ( r == nItersMax )
287 Abc_Print( 1,
"The refinement was not finished. The result may be incorrect.\n" );
289 clkTotal = Abc_Clock() - clkTotal;
293 Abc_PrintTimeP( 1,
"Srm ", clkSrm, clkTotal );
294 Abc_PrintTimeP( 1,
"Sat ", clkSat, clkTotal );
295 Abc_PrintTimeP( 1,
"Sim ", clkSim, clkTotal );
296 Abc_PrintTimeP( 1,
"Other", clkTotal-clkSat-clkSrm-clkSim, clkTotal );
297 Abc_PrintTime( 1,
"TOTAL", clkTotal );
363 pPars->nBTLimit = pParsChc->
nBTLimit;
364 pPars->fUseCSat = pParsChc->
fUseCSat;
365 pPars->fVerbose = pParsChc->
fVerbose;
389 if ( pPars->fVerbose )
390 Abc_PrintTime( 1,
"Synthesis time", pPars->timeSynth );
392 pParsChc->
nBTLimit = pPars->nBTLimit;
393 pParsChc->
fUseCSat = pPars->fUseCSat;
396 pParsChc->
fVerbose = pPars->fVerbose;
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Aig_ManStop(Aig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
struct Vec_Str_t_ Vec_Str_t
int Cec_ManResimulateCounterExamplesComb(Cec_ManSim_t *pSim, Vec_Int_t *vCexStore)
Gia_Man_t * Cec_ManCombSpecReduce(Gia_Man_t *p, Vec_Int_t **pvOutputs, int fRings)
int Cec_ManChoiceComputation_int(Gia_Man_t *pAig, Cec_ParChc_t *pPars)
Aig_Man_t * Cec_ComputeChoicesNew(Gia_Man_t *pGia, int nConfs, int fVerbose)
Gia_Man_t * Cec_ManChoiceComputation(Gia_Man_t *pAig, Cec_ParChc_t *pParsChc)
Aig_Man_t * Cec_ComputeChoices(Gia_Man_t *pGia, Dch_Pars_t *pPars)
Gia_Man_t * Cec_ManChoiceComputationVec(Gia_Man_t *pGia, int nGias, Cec_ParChc_t *pPars)
Aig_Man_t * Cec_ComputeChoicesNew2(Gia_Man_t *pGia, int nConfs, int fVerbose)
int Gia_ManCheckRefinements(Gia_Man_t *p, Vec_Str_t *vStatus, Vec_Int_t *vOutputs, Cec_ManSim_t *pSim, int fRings)
int Cec_ManSimClassesPrepare(Cec_ManSim_t *p, int LevelMax)
int Cec_ManSimClassesRefine(Cec_ManSim_t *p)
void Cec_ManRefinedClassPrintStats(Gia_Man_t *p, Vec_Str_t *vStatus, int iIter, abctime Time)
MACRO DEFINITIONS ///.
void Cec_ManSimStop(Cec_ManSim_t *p)
Cec_ManSim_t * Cec_ManSimStart(Gia_Man_t *pAig, Cec_ParSim_t *pPars)
struct Cec_ManSim_t_ Cec_ManSim_t
Vec_Int_t * Cec_ManSatSolveMiter(Gia_Man_t *pAig, Cec_ParSat_t *pPars, Vec_Str_t **pvStatus)
void Cec4_ManSimulateTest2(Gia_Man_t *p, int nConfs, int fVerbose)
Gia_Man_t * Cec5_ManSimulateTest3(Gia_Man_t *p, int nBTLimit, int fVerbose)
void Cec_ManSatSetDefaultParams(Cec_ParSat_t *p)
DECLARATIONS ///.
void Cec_ManSimSetDefaultParams(Cec_ParSim_t *p)
typedefABC_NAMESPACE_HEADER_START struct Cec_ParSat_t_ Cec_ParSat_t
INCLUDES ///.
struct Cec_ParChc_t_ Cec_ParChc_t
struct Cec_ParSim_t_ Cec_ParSim_t
void Cec_ManChcSetDefaultParams(Cec_ParChc_t *p)
Aig_Man_t * Dar_ManChoiceNew(Aig_Man_t *pAig, Dch_Pars_t *pPars)
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
void Dch_ManSetDefaultParams(Dch_Pars_t *p)
DECLARATIONS ///.
Gia_Man_t * Gia_ManFromAig(Aig_Man_t *p)
INCLUDES ///.
Aig_Man_t * Gia_ManToAig(Gia_Man_t *p, int fChoices)
void Gia_ManStop(Gia_Man_t *p)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
void Gia_ManHashAlloc(Gia_Man_t *p)
#define Gia_ClassForEachObj1(p, i, iObj)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
struct Gia_Obj_t_ Gia_Obj_t
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
void Gia_ManFillValue(Gia_Man_t *p)
struct Gia_Man_t_ Gia_Man_t
#define Gia_ManForEachObj1(p, pObj, i)
Vec_Int_t * Cbs_ManSolveMiterNc(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int f0Proved, int fVerbose)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
Gia_Man_t * Gia_ManEquivToChoices(Gia_Man_t *p, int nSnapshots)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
#define Gia_ManForEachCi(p, pObj, i)
void Gia_ManSetPhase(Gia_Man_t *p)
void Gia_ManHashStop(Gia_Man_t *p)
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.