ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cecChoice.c File Reference
#include "cecInt.h"
#include "aig/gia/giaAig.h"
#include "proof/dch/dch.h"
Include dependency graph for cecChoice.c:

Go to the source code of this file.

Functions

int Cec_ManResimulateCounterExamplesComb (Cec_ManSim_t *pSim, Vec_Int_t *vCexStore)
 
int Gia_ManCheckRefinements (Gia_Man_t *p, Vec_Str_t *vStatus, Vec_Int_t *vOutputs, Cec_ManSim_t *pSim, int fRings)
 
Gia_Man_tCec_ManCombSpecReduce (Gia_Man_t *p, Vec_Int_t **pvOutputs, int fRings)
 
int Cec_ManChoiceComputation_int (Gia_Man_t *pAig, Cec_ParChc_t *pPars)
 
Gia_Man_tCec_ManChoiceComputationVec (Gia_Man_t *pGia, int nGias, Cec_ParChc_t *pPars)
 
Gia_Man_tCec_ManChoiceComputation (Gia_Man_t *pAig, Cec_ParChc_t *pParsChc)
 
Aig_Man_tCec_ComputeChoices (Gia_Man_t *pGia, Dch_Pars_t *pPars)
 
Aig_Man_tCec_ComputeChoicesNew (Gia_Man_t *pGia, int nConfs, int fVerbose)
 
Aig_Man_tCec_ComputeChoicesNew2 (Gia_Man_t *pGia, int nConfs, int fVerbose)
 

Function Documentation

◆ Cec_ComputeChoices()

Aig_Man_t * Cec_ComputeChoices ( Gia_Man_t * pGia,
Dch_Pars_t * pPars )

Function*************************************************************

Synopsis [Performs computation of AIGs with choices.]

Description [Takes several AIGs and performs choicing.]

SideEffects []

SeeAlso []

Definition at line 385 of file cecChoice.c.

386{
387 Cec_ParChc_t ParsChc, * pParsChc = &ParsChc;
388 Aig_Man_t * pAig;
389 if ( pPars->fVerbose )
390 Abc_PrintTime( 1, "Synthesis time", pPars->timeSynth );
391 Cec_ManChcSetDefaultParams( pParsChc );
392 pParsChc->nBTLimit = pPars->nBTLimit;
393 pParsChc->fUseCSat = pPars->fUseCSat;
394 if ( pParsChc->fUseCSat && pParsChc->nBTLimit > 100 )
395 pParsChc->nBTLimit = 100;
396 pParsChc->fVerbose = pPars->fVerbose;
397 pGia = Cec_ManChoiceComputationVec( pGia, 3, pParsChc );
398 Gia_ManSetRegNum( pGia, Gia_ManRegNum(pGia) );
399 pAig = Gia_ManToAig( pGia, 1 );
400 Gia_ManStop( pGia );
401 return pAig;
402}
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
Gia_Man_t * Cec_ManChoiceComputationVec(Gia_Man_t *pGia, int nGias, Cec_ParChc_t *pPars)
Definition cecChoice.c:313
struct Cec_ParChc_t_ Cec_ParChc_t
Definition cec.h:175
void Cec_ManChcSetDefaultParams(Cec_ParChc_t *p)
Definition cecCore.c:213
Aig_Man_t * Gia_ManToAig(Gia_Man_t *p, int fChoices)
Definition giaAig.c:318
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition giaMan.c:764
int fVerbose
Definition cec.h:184
int nBTLimit
Definition cec.h:180
int fUseCSat
Definition cec.h:182
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cec_ComputeChoicesNew()

Aig_Man_t * Cec_ComputeChoicesNew ( Gia_Man_t * pGia,
int nConfs,
int fVerbose )

Function*************************************************************

Synopsis [Performs computation of AIGs with choices.]

Description [Takes several AIGs and performs choicing.]

SideEffects []

SeeAlso []

Definition at line 415 of file cecChoice.c.

416{
417 extern void Cec4_ManSimulateTest2( Gia_Man_t * p, int nConfs, int fVerbose );
418 Aig_Man_t * pAig;
419 Cec4_ManSimulateTest2( pGia, nConfs, fVerbose );
420 pGia = Gia_ManEquivToChoices( pGia, 3 );
421 pAig = Gia_ManToAig( pGia, 1 );
422 Gia_ManStop( pGia );
423 return pAig;
424}
void Cec4_ManSimulateTest2(Gia_Man_t *p, int nConfs, int fVerbose)
Definition cecSatG2.c:2066
Cube * p
Definition exorList.c:222
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
Gia_Man_t * Gia_ManEquivToChoices(Gia_Man_t *p, int nSnapshots)
Definition giaEquiv.c:2034
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cec_ComputeChoicesNew2()

Aig_Man_t * Cec_ComputeChoicesNew2 ( Gia_Man_t * pGia,
int nConfs,
int fVerbose )

Definition at line 425 of file cecChoice.c.

426{
427 extern Gia_Man_t * Cec5_ManSimulateTest3( Gia_Man_t * p, int nBTLimit, int fVerbose );
428 Aig_Man_t * pAig;
429 Gia_Man_t * pNew = Cec5_ManSimulateTest3( pGia, nConfs, fVerbose );
430 Gia_ManStop( pNew );
431 pGia = Gia_ManEquivToChoices( pGia, 3 );
432 pAig = Gia_ManToAig( pGia, 1 );
433 Gia_ManStop( pGia );
434 return pAig;
435}
Gia_Man_t * Cec5_ManSimulateTest3(Gia_Man_t *p, int nBTLimit, int fVerbose)
Definition cecSatG3.c:2326
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cec_ManChoiceComputation()

Gia_Man_t * Cec_ManChoiceComputation ( Gia_Man_t * pAig,
Cec_ParChc_t * pParsChc )

Function*************************************************************

Synopsis [Computes choices for one AIGs.]

Description []

SideEffects []

SeeAlso []

Definition at line 348 of file cecChoice.c.

349{
350// extern Aig_Man_t * Dar_ManChoiceNew( Aig_Man_t * pAig, Dch_Pars_t * pPars );
351 Dch_Pars_t Pars, * pPars = &Pars;
352 Aig_Man_t * pMan, * pManNew;
353 Gia_Man_t * pGia;
354 if ( 0 )
355 {
356 pGia = Cec_ManChoiceComputationVec( pAig, 3, pParsChc );
357 }
358 else
359 {
360 pMan = Gia_ManToAig( pAig, 0 );
362 pPars->fUseGia = 1;
363 pPars->nBTLimit = pParsChc->nBTLimit;
364 pPars->fUseCSat = pParsChc->fUseCSat;
365 pPars->fVerbose = pParsChc->fVerbose;
366 pManNew = Dar_ManChoiceNew( pMan, pPars );
367 pGia = Gia_ManFromAig( pManNew );
368 Aig_ManStop( pManNew );
369// Aig_ManStop( pMan );
370 }
371 return pGia;
372}
void Aig_ManStop(Aig_Man_t *p)
Definition aigMan.c:187
Aig_Man_t * Dar_ManChoiceNew(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition darScript.c:849
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
Definition dch.h:43
void Dch_ManSetDefaultParams(Dch_Pars_t *p)
DECLARATIONS ///.
Definition dchCore.c:45
Gia_Man_t * Gia_ManFromAig(Aig_Man_t *p)
INCLUDES ///.
Definition giaAig.c:76
Here is the call graph for this function:

◆ Cec_ManChoiceComputation_int()

int Cec_ManChoiceComputation_int ( Gia_Man_t * pAig,
Cec_ParChc_t * pPars )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 201 of file cecChoice.c.

202{
203 int nItersMax = 1000;
204 Vec_Str_t * vStatus;
205 Vec_Int_t * vOutputs;
206 Vec_Int_t * vCexStore;
207 Cec_ParSim_t ParsSim, * pParsSim = &ParsSim;
208 Cec_ParSat_t ParsSat, * pParsSat = &ParsSat;
209 Cec_ManSim_t * pSim;
210 Gia_Man_t * pSrm;
211 int r, RetValue;
212 abctime clkSat = 0, clkSim = 0, clkSrm = 0, clkTotal = Abc_Clock();
213 abctime clk2, clk = Abc_Clock();
214 ABC_FREE( pAig->pReprs );
215 ABC_FREE( pAig->pNexts );
216 Gia_ManRandom( 1 );
217 // prepare simulation manager
218 Cec_ManSimSetDefaultParams( pParsSim );
219 pParsSim->nWords = pPars->nWords;
220 pParsSim->nFrames = pPars->nRounds;
221 pParsSim->fVerbose = pPars->fVerbose;
222 pParsSim->fLatchCorr = 0;
223 pParsSim->fSeqSimulate = 0;
224 // create equivalence classes of registers
225 pSim = Cec_ManSimStart( pAig, pParsSim );
226 Cec_ManSimClassesPrepare( pSim, -1 );
228 // prepare SAT solving
229 Cec_ManSatSetDefaultParams( pParsSat );
230 pParsSat->nBTLimit = pPars->nBTLimit;
231 pParsSat->fVerbose = pPars->fVerbose;
232 if ( pPars->fVerbose )
233 {
234 Abc_Print( 1, "Obj = %7d. And = %7d. Conf = %5d. Ring = %d. CSat = %d.\n",
235 Gia_ManObjNum(pAig), Gia_ManAndNum(pAig), pPars->nBTLimit, pPars->fUseRings, pPars->fUseCSat );
236 Cec_ManRefinedClassPrintStats( pAig, NULL, 0, Abc_Clock() - clk );
237 }
238 // perform refinement of equivalence classes
239 for ( r = 0; r < nItersMax; r++ )
240 {
241 clk = Abc_Clock();
242 // perform speculative reduction
243 clk2 = Abc_Clock();
244 pSrm = Cec_ManCombSpecReduce( pAig, &vOutputs, pPars->fUseRings );
245 assert( Gia_ManRegNum(pSrm) == 0 && Gia_ManCiNum(pSrm) == Gia_ManCiNum(pAig) );
246 clkSrm += Abc_Clock() - clk2;
247 if ( Gia_ManCoNum(pSrm) == 0 )
248 {
249 if ( pPars->fVerbose )
250 Cec_ManRefinedClassPrintStats( pAig, NULL, r+1, Abc_Clock() - clk );
251 Vec_IntFree( vOutputs );
252 Gia_ManStop( pSrm );
253 break;
254 }
255//Gia_DumpAiger( pSrm, "choicesrm", r, 2 );
256 // found counter-examples to speculation
257 clk2 = Abc_Clock();
258 if ( pPars->fUseCSat )
259 vCexStore = Cbs_ManSolveMiterNc( pSrm, pPars->nBTLimit, &vStatus, 0, 0 );
260 else
261 vCexStore = Cec_ManSatSolveMiter( pSrm, pParsSat, &vStatus );
262 Gia_ManStop( pSrm );
263 clkSat += Abc_Clock() - clk2;
264 if ( Vec_IntSize(vCexStore) == 0 )
265 {
266 if ( pPars->fVerbose )
267 Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, Abc_Clock() - clk );
268 Vec_IntFree( vCexStore );
269 Vec_StrFree( vStatus );
270 Vec_IntFree( vOutputs );
271 break;
272 }
273 // refine classes with these counter-examples
274 clk2 = Abc_Clock();
275 RetValue = Cec_ManResimulateCounterExamplesComb( pSim, vCexStore );
276 Vec_IntFree( vCexStore );
277 clkSim += Abc_Clock() - clk2;
278 Gia_ManCheckRefinements( pAig, vStatus, vOutputs, pSim, pPars->fUseRings );
279 if ( pPars->fVerbose )
280 Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, Abc_Clock() - clk );
281 Vec_StrFree( vStatus );
282 Vec_IntFree( vOutputs );
283//Gia_ManEquivPrintClasses( pAig, 1, 0 );
284 }
285 // check the overflow
286 if ( r == nItersMax )
287 Abc_Print( 1, "The refinement was not finished. The result may be incorrect.\n" );
288 Cec_ManSimStop( pSim );
289 clkTotal = Abc_Clock() - clkTotal;
290 // report the results
291 if ( pPars->fVerbose )
292 {
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 );
298 }
299 return 0;
300}
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_FREE(obj)
Definition abc_global.h:267
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
struct Vec_Str_t_ Vec_Str_t
Definition bblif.c:46
int Cec_ManResimulateCounterExamplesComb(Cec_ManSim_t *pSim, Vec_Int_t *vCexStore)
Definition cecCorr.c:583
Gia_Man_t * Cec_ManCombSpecReduce(Gia_Man_t *p, Vec_Int_t **pvOutputs, int fRings)
Definition cecChoice.c:96
int Gia_ManCheckRefinements(Gia_Man_t *p, Vec_Str_t *vStatus, Vec_Int_t *vOutputs, Cec_ManSim_t *pSim, int fRings)
Definition cecCorr.c:612
int Cec_ManSimClassesPrepare(Cec_ManSim_t *p, int LevelMax)
Definition cecClass.c:867
int Cec_ManSimClassesRefine(Cec_ManSim_t *p)
Definition cecClass.c:939
void Cec_ManRefinedClassPrintStats(Gia_Man_t *p, Vec_Str_t *vStatus, int iIter, abctime Time)
MACRO DEFINITIONS ///.
Definition cecCorr.c:725
void Cec_ManSimStop(Cec_ManSim_t *p)
Definition cecMan.c:233
Cec_ManSim_t * Cec_ManSimStart(Gia_Man_t *pAig, Cec_ParSim_t *pPars)
Definition cecMan.c:199
struct Cec_ManSim_t_ Cec_ManSim_t
Definition cecInt.h:113
Vec_Int_t * Cec_ManSatSolveMiter(Gia_Man_t *pAig, Cec_ParSat_t *pPars, Vec_Str_t **pvStatus)
Definition cecSolve.c:1070
void Cec_ManSatSetDefaultParams(Cec_ParSat_t *p)
DECLARATIONS ///.
Definition cecCore.c:45
void Cec_ManSimSetDefaultParams(Cec_ParSim_t *p)
Definition cecCore.c:71
typedefABC_NAMESPACE_HEADER_START struct Cec_ParSat_t_ Cec_ParSat_t
INCLUDES ///.
Definition cec.h:43
struct Cec_ParSim_t_ Cec_ParSim_t
Definition cec.h:60
Vec_Int_t * Cbs_ManSolveMiterNc(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int f0Proved, int fVerbose)
Definition giaCSat.c:1037
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
Definition giaUtil.c:49
int fUseRings
Definition cec.h:181
int nWords
Definition cec.h:178
int nRounds
Definition cec.h:179
int fVerbose
Definition cec.h:75
int fLatchCorr
Definition cec.h:72
int fSeqSimulate
Definition cec.h:71
int nFrames
Definition cec.h:64
int nWords
Definition cec.h:63
Gia_Rpr_t * pReprs
Definition gia.h:126
int * pNexts
Definition gia.h:127
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cec_ManChoiceComputationVec()

Gia_Man_t * Cec_ManChoiceComputationVec ( Gia_Man_t * pGia,
int nGias,
Cec_ParChc_t * pPars )

Function*************************************************************

Synopsis [Computes choices for the vector of AIGs.]

Description []

SideEffects []

SeeAlso []

Definition at line 313 of file cecChoice.c.

314{
315 Gia_Man_t * pNew;
316 int RetValue;
317 // compute equivalences of the miter
318// pMiter = Gia_ManChoiceMiter( vGias );
319// Gia_ManSetRegNum( pMiter, 0 );
320 RetValue = Cec_ManChoiceComputation_int( pGia, pPars );
321 // derive AIG with choices
322 pNew = Gia_ManEquivToChoices( pGia, nGias );
323// Gia_ManHasChoices_very_old( pNew );
324// Gia_ManStop( pMiter );
325 // report the results
326 if ( pPars->fVerbose )
327 {
328// Abc_Print( 1, "NBeg = %d. NEnd = %d. (Gain = %6.2f %%). RBeg = %d. REnd = %d. (Gain = %6.2f %%).\n",
329// Gia_ManAndNum(pAig), Gia_ManAndNum(pNew),
330// 100.0*(Gia_ManAndNum(pAig)-Gia_ManAndNum(pNew))/(Gia_ManAndNum(pAig)?Gia_ManAndNum(pAig):1),
331// Gia_ManRegNum(pAig), Gia_ManRegNum(pNew),
332// 100.0*(Gia_ManRegNum(pAig)-Gia_ManRegNum(pNew))/(Gia_ManRegNum(pAig)?Gia_ManRegNum(pAig):1) );
333 }
334 return pNew;
335}
int Cec_ManChoiceComputation_int(Gia_Man_t *pAig, Cec_ParChc_t *pPars)
Definition cecChoice.c:201
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cec_ManCombSpecReduce()

Gia_Man_t * Cec_ManCombSpecReduce ( Gia_Man_t * p,
Vec_Int_t ** pvOutputs,
int fRings )

Function*************************************************************

Synopsis [Derives SRM for signal correspondence.]

Description []

SideEffects []

SeeAlso []

Definition at line 96 of file cecChoice.c.

97{
98 Gia_Man_t * pNew, * pTemp;
99 Gia_Obj_t * pObj, * pRepr;
100 Vec_Int_t * vXorLits;
101 int i, iPrev, iObj, iPrevNew, iObjNew;
102 assert( p->pReprs != NULL );
105 pNew = Gia_ManStart( Gia_ManObjNum(p) );
106 pNew->pName = Abc_UtilStrsav( p->pName );
107 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
108 Gia_ManHashAlloc( pNew );
109 Gia_ManConst0(p)->Value = 0;
110 Gia_ManForEachCi( p, pObj, i )
111 pObj->Value = Gia_ManAppendCi(pNew);
112 *pvOutputs = Vec_IntAlloc( 1000 );
113 vXorLits = Vec_IntAlloc( 1000 );
114 if ( fRings )
115 {
116 Gia_ManForEachObj1( p, pObj, i )
117 {
118 if ( Gia_ObjIsConst( p, i ) )
119 {
120 iObjNew = Cec_ManCombSpecReal( pNew, p, pObj );
121 iObjNew = Abc_LitNotCond( iObjNew, Gia_ObjPhase(pObj) );
122 if ( iObjNew != 0 )
123 {
124 Vec_IntPush( *pvOutputs, 0 );
125 Vec_IntPush( *pvOutputs, i );
126 Vec_IntPush( vXorLits, iObjNew );
127 }
128 }
129 else if ( Gia_ObjIsHead( p, i ) )
130 {
131 iPrev = i;
132 Gia_ClassForEachObj1( p, i, iObj )
133 {
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 )
139 {
140 Vec_IntPush( *pvOutputs, iPrev );
141 Vec_IntPush( *pvOutputs, iObj );
142 Vec_IntPush( vXorLits, Gia_ManHashAnd(pNew, iPrevNew, Abc_LitNot(iObjNew)) );
143 }
144 iPrev = iObj;
145 }
146 iObj = i;
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 )
152 {
153 Vec_IntPush( *pvOutputs, iPrev );
154 Vec_IntPush( *pvOutputs, iObj );
155 Vec_IntPush( vXorLits, Gia_ManHashAnd(pNew, iPrevNew, Abc_LitNot(iObjNew)) );
156 }
157 }
158 }
159 }
160 else
161 {
162 Gia_ManForEachObj1( p, pObj, i )
163 {
164 pRepr = Gia_ObjReprObj( p, Gia_ObjId(p,pObj) );
165 if ( pRepr == NULL )
166 continue;
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 )
171 {
172 Vec_IntPush( *pvOutputs, Gia_ObjId(p, pRepr) );
173 Vec_IntPush( *pvOutputs, Gia_ObjId(p, pObj) );
174 Vec_IntPush( vXorLits, Gia_ManHashXor(pNew, iPrevNew, iObjNew) );
175 }
176 }
177 }
178 Vec_IntForEachEntry( vXorLits, iObjNew, i )
179 Gia_ManAppendCo( pNew, iObjNew );
180 Vec_IntFree( vXorLits );
181 Gia_ManHashStop( pNew );
182//Abc_Print( 1, "Before sweeping = %d\n", Gia_ManAndNum(pNew) );
183 pNew = Gia_ManCleanup( pTemp = pNew );
184//Abc_Print( 1, "After sweeping = %d\n", Gia_ManAndNum(pNew) );
185 Gia_ManStop( pTemp );
186 return pNew;
187}
void Gia_ManHashAlloc(Gia_Man_t *p)
Definition giaHash.c:105
#define Gia_ClassForEachObj1(p, i, iObj)
Definition gia.h:1109
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
Definition giaMan.c:57
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
Definition giaHash.c:668
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
#define Gia_ManForEachObj1(p, pObj, i)
Definition gia.h:1192
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
Definition giaScl.c:84
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition giaHash.c:576
#define Gia_ManForEachCi(p, pObj, i)
Definition gia.h:1228
void Gia_ManSetPhase(Gia_Man_t *p)
Definition giaUtil.c:420
void Gia_ManHashStop(Gia_Man_t *p)
Definition giaHash.c:149
char * pSpec
Definition gia.h:100
char * pName
Definition gia.h:99
unsigned Value
Definition gia.h:89
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cec_ManResimulateCounterExamplesComb()

int Cec_ManResimulateCounterExamplesComb ( Cec_ManSim_t * pSim,
Vec_Int_t * vCexStore )
extern

Function*************************************************************

Synopsis [Resimulates counter-examples derived by the SAT solver.]

Description []

SideEffects []

SeeAlso []

Definition at line 583 of file cecCorr.c.

584{
585 Vec_Ptr_t * vSimInfo;
586 int RetValue = 0, iStart = 0;
588 pSim->pPars->nFrames = 1;
589 vSimInfo = Vec_PtrAllocSimInfo( Gia_ManCiNum(pSim->pAig), pSim->pPars->nWords );
590 while ( iStart < Vec_IntSize(vCexStore) )
591 {
592 Cec_ManStartSimInfo( vSimInfo, 0 );
593 iStart = Cec_ManLoadCounterExamples( vSimInfo, vCexStore, iStart );
594 RetValue |= Cec_ManSeqResimulate( pSim, vSimInfo );
595 }
596 assert( iStart == Vec_IntSize(vCexStore) );
597 Vec_PtrFree( vSimInfo );
598 return RetValue;
599}
void Cec_ManStartSimInfo(Vec_Ptr_t *vInfo, int nFlops)
Definition cecCorr.c:292
int Cec_ManLoadCounterExamples(Vec_Ptr_t *vInfo, Vec_Int_t *vCexStore, int iStart)
Definition cecCorr.c:458
int Cec_ManSeqResimulate(Cec_ManSim_t *p, Vec_Ptr_t *vInfo)
Definition cecSeq.c:137
void Gia_ManCreateValueRefs(Gia_Man_t *p)
Definition giaUtil.c:750
Cec_ParSim_t * pPars
Definition cecInt.h:118
Gia_Man_t * pAig
Definition cecInt.h:117
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManCheckRefinements()

int Gia_ManCheckRefinements ( Gia_Man_t * p,
Vec_Str_t * vStatus,
Vec_Int_t * vOutputs,
Cec_ManSim_t * pSim,
int fRings )
extern

Function*************************************************************

Synopsis [Updates equivalence classes by marking those that timed out.]

Description [Returns 1 if all ndoes are proved.]

SideEffects []

SeeAlso []

Definition at line 612 of file cecCorr.c.

613{
614 int i, status, iRepr, iObj;
615 int Counter = 0;
616 assert( 2 * Vec_StrSize(vStatus) == Vec_IntSize(vOutputs) );
617 Vec_StrForEachEntry( vStatus, status, i )
618 {
619 iRepr = Vec_IntEntry( vOutputs, 2*i );
620 iObj = Vec_IntEntry( vOutputs, 2*i+1 );
621 if ( status == 1 )
622 continue;
623 if ( status == 0 )
624 {
625 if ( Gia_ObjHasSameRepr(p, iRepr, iObj) )
626 Counter++;
627// if ( Gia_ObjHasSameRepr(p, iRepr, iObj) )
628// Abc_Print( 1, "Gia_ManCheckRefinements(): Disproved equivalence (%d,%d) is not refined!\n", iRepr, iObj );
629// if ( Gia_ObjHasSameRepr(p, iRepr, iObj) )
630// Cec_ManSimClassRemoveOne( pSim, iObj );
631 continue;
632 }
633 if ( status == -1 )
634 {
635// if ( !Gia_ObjFailed( p, iObj ) )
636// Abc_Print( 1, "Gia_ManCheckRefinements(): Failed equivalence is not marked as failed!\n" );
637// Gia_ObjSetFailed( p, iRepr );
638// Gia_ObjSetFailed( p, iObj );
639// if ( fRings )
640// Cec_ManSimClassRemoveOne( pSim, iRepr );
641 Cec_ManSimClassRemoveOne( pSim, iObj );
642 continue;
643 }
644 }
645// if ( Counter )
646// Abc_Print( 1, "Gia_ManCheckRefinements(): Could not refine %d nodes.\n", Counter );
647 return 1;
648}
int Cec_ManSimClassRemoveOne(Cec_ManSim_t *p, int i)
Definition cecClass.c:324
#define Vec_StrForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecStr.h:54
Here is the call graph for this function:
Here is the caller graph for this function: