51 p->nCallsRecycle = 200;
241 if ( pPars->SolverType == -1 )
268 abctime clkTotal = Abc_Clock();
272 Abc_Print( 1,
"The number of failed outputs of the miter = %6d. (Words = %4d. Frames = %4d.)\n",
275 Abc_PrintTime( 1,
"Time", Abc_Clock() - clkTotal );
293 int r, nLitsOld, nLitsNew, nCountNoRef = 0, fStop = 0;
296 Abc_Print( 1,
"Performing rounds of random simulation of %d frames with %d words.\n",
299 for ( r = 0; r < pPars->
nRounds; r++ )
308 if ( nLitsOld == 0 || nLitsOld > nLitsNew )
318 assert( nLitsOld == nLitsNew );
321 if ( r == pPars->
nRounds || fStop )
322 Abc_Print( 1,
"Random simulation is stopped after %d rounds.\n", r );
324 Abc_Print( 1,
"Random simulation saturated after %d rounds.\n", r );
329 Abc_Print( 1,
"The number of POs that are not const-0 candidates = %d.\n", nNonConsts );
346 int fOutputResult = 0;
353 int i, fTimeOut = 0, nMatches = 0;
354 abctime clk, clk2, clkTotal = Abc_Clock();
356 printf(
"Simulating %d words for %d rounds. SAT solving with %d conflicts.\n", pPars->
nWords, pPars->
nRounds, pPars->
nBTLimit );
390 pParsSat->nBTLimit = pPars->
nBTLimit;
398 if (
p->pAig->pReprs == NULL )
407p->timeSim += Abc_Clock() - clk;
409 for ( i = 1; i <= pPars->
nItersMax; i++ )
425 if ( Gia_ManCoNum(pSrm) == 0 )
428 if (
p->pPars->fVerbose )
429 Abc_Print( 1,
"Considered all available candidate equivalences.\n" );
430 if ( pPars->
fDualOut && Gia_ManAndNum(
p->pAig) > 0 )
434 if (
p->pPars->fVerbose )
435 Abc_Print( 1,
"Switching into reduced mode.\n" );
440 if (
p->pPars->fVerbose )
441 Abc_Print( 1,
"Switching into normal mode.\n" );
453p->timeSat += Abc_Clock() - clk;
465 if (
p->pAig == NULL )
471 if (
p->pPars->fVerbose )
473 Abc_Print( 1,
"%3d : P =%7d. D =%7d. F =%6d. M = %7d. And =%8d. ",
474 i,
p->nAllProved,
p->nAllDisproved,
p->nAllFailed, nMatches, Gia_ManAndNum(
p->pAig) );
475 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk2 );
477 if ( Gia_ManAndNum(
p->pAig) == 0 )
479 if (
p->pPars->fVerbose )
480 Abc_Print( 1,
"Network after reduction is empty.\n" );
484 if (
p->pPars->TimeLimit && (Abc_Clock() - clkTotal)/CLOCKS_PER_SEC >=
p->pPars->TimeLimit )
490 if (
p->nAllFailed >
p->nAllProved +
p->nAllDisproved )
492 if ( pParsSat->nBTLimit >= 10001 )
496 if (
p->pPars->fVerbose )
497 Abc_Print( 1,
"Exceeded the limit on the number of conflicts (%d).\n", pParsSat->nBTLimit );
500 pParsSat->nBTLimit *= 10;
501 if (
p->pPars->fVerbose )
503 if (
p->pPars->fVerbose )
504 Abc_Print( 1,
"Increasing conflict limit to %d.\n", pParsSat->nBTLimit );
508 Abc_Print( 1,
"The result is written into file \"%s\".\n",
"gia_cec_temp.aig" );
512 if ( pPars->
fDualOut && pPars->
fColorDiff && (Gia_ManAndNum(
p->pAig) < 100000 ||
p->nAllProved +
p->nAllDisproved < 10) )
514 if (
p->pPars->fVerbose )
515 Abc_Print( 1,
"Switching into reduced mode.\n" );
519 else if ( pPars->
fDualOut && (Gia_ManAndNum(
p->pAig) < 20000 ||
p->nAllProved +
p->nAllDisproved < 10) )
521 if (
p->pPars->fVerbose )
522 Abc_Print( 1,
"Switching into normal mode.\n" );
529 printf(
"Performed %d SAT calls: P = %d D = %d F = %d\n",
530 p->nAllProvedS +
p->nAllDisprovedS +
p->nAllFailedS,
p->nAllProvedS,
p->nAllDisprovedS,
p->nAllFailedS );
531 if (
p->pPars->fVerbose &&
p->pAig )
533 Abc_Print( 1,
"NBeg = %d. NEnd = %d. (Gain = %6.2f %%). RBeg = %d. REnd = %d. (Gain = %6.2f %%).\n",
534 Gia_ManAndNum(pAig), Gia_ManAndNum(
p->pAig),
535 100.0*(Gia_ManAndNum(pAig)-Gia_ManAndNum(
p->pAig))/(Gia_ManAndNum(pAig)?Gia_ManAndNum(pAig):1),
536 Gia_ManRegNum(pAig), Gia_ManRegNum(
p->pAig),
537 100.0*(Gia_ManRegNum(pAig)-Gia_ManRegNum(
p->pAig))/(Gia_ManRegNum(pAig)?Gia_ManRegNum(pAig):1) );
538 Abc_PrintTimeP( 1,
"Sim ",
p->timeSim, Abc_Clock() - (
int)clkTotal );
539 Abc_PrintTimeP( 1,
"Sat ",
p->timeSat-pPat->timeTotalSave, Abc_Clock() - (
int)clkTotal );
540 Abc_PrintTimeP( 1,
"Pat ",
p->timePat+pPat->timeTotalSave, Abc_Clock() - (
int)clkTotal );
541 Abc_PrintTime( 1,
"Time", (
int)(Abc_Clock() - clkTotal) );
544 pTemp =
p->pAig;
p->pAig = NULL;
545 if ( pTemp == NULL && pSim->
iOut >= 0 )
548 Abc_Print( 1,
"Disproved at least one output of the miter (zero-based number %d).\n", pSim->
iOut );
551 else if ( pSim->
pCexes && !fSilent )
552 Abc_Print( 1,
"Disproved %d outputs of the miter.\n", pSim->
nOuts );
553 if ( fTimeOut && !fSilent )
554 Abc_Print( 1,
"Timed out after %d seconds.\n", (
int)((
double)Abc_Clock() - clkTotal)/CLOCKS_PER_SEC );
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
int Cec_ManSimClassesPrepare(Cec_ManSim_t *p, int LevelMax)
int Cec_ManSimClassesRefine(Cec_ManSim_t *p)
void Cec_ManSimulation(Gia_Man_t *pAig, Cec_ParSim_t *pPars)
void Cec_ManCorSetDefaultParams(Cec_ParCor_t *p)
void Cec_ManFraSetDefaultParams(Cec_ParFra_t *p)
void Cec_ManCecSetDefaultParams(Cec_ParCec_t *p)
void Cec_ManSmfSetDefaultParams(Cec_ParSmf_t *p)
ABC_NAMESPACE_IMPL_START void Cec_ManSatSetDefaultParams(Cec_ParSat_t *p)
DECLARATIONS ///.
Gia_Man_t * Cec_ManSatSweeping(Gia_Man_t *pAig, Cec_ParFra_t *pPars, int fSilent)
void Cec_ManSimSetDefaultParams(Cec_ParSim_t *p)
Gia_Man_t * Cec_ManSatSolving(Gia_Man_t *pAig, Cec_ParSat_t *pPars, int f0Proved)
int Cec_ManSimulationOne(Gia_Man_t *pAig, Cec_ParSim_t *pPars)
void Cec_ManChcSetDefaultParams(Cec_ParChc_t *p)
void Cec_ManSatSolveCSat(Cec_ManPat_t *pPat, Gia_Man_t *pAig, Cec_ParSat_t *pPars)
Gia_Man_t * Cec_ManFraSpecReduction(Cec_ManFra_t *p)
DECLARATIONS ///.
void Cec_ManSimStop(Cec_ManSim_t *p)
Cec_ManSim_t * Cec_ManSimStart(Gia_Man_t *pAig, Cec_ParSim_t *pPars)
int Cec_ManCountNonConstOutputs(Gia_Man_t *pAig)
Cec_ManPat_t * Cec_ManPatStart()
struct Cec_ManFra_t_ Cec_ManFra_t
struct Cec_ManSim_t_ Cec_ManSim_t
void Cec_ManFraStop(Cec_ManFra_t *p)
void Cec_ManPatStop(Cec_ManPat_t *p)
void CecG_ManSatSolve(Cec_ManPat_t *pPat, Gia_Man_t *pAig, Cec_ParSat_t *pPars, int f0Proved)
typedefABC_NAMESPACE_HEADER_START struct Cec_ManPat_t_ Cec_ManPat_t
INCLUDES ///.
void Cec_ManSatSolve(Cec_ManPat_t *pPat, Gia_Man_t *pAig, Cec_ParSat_t *pPars, Vec_Int_t *vIdsOrig, Vec_Int_t *vMiterPairs, Vec_Int_t *vEquivPairs, int f0Proved)
int Cec_ManFraClassesUpdate(Cec_ManFra_t *p, Cec_ManSim_t *pSim, Cec_ManPat_t *pPat, Gia_Man_t *pNew)
Cec_ManFra_t * Cec_ManFraStart(Gia_Man_t *pAig, Cec_ParFra_t *pPars)
struct Cec_ParFra_t_ Cec_ParFra_t
struct Cec_ParCec_t_ Cec_ParCec_t
typedefABC_NAMESPACE_HEADER_START struct Cec_ParSat_t_ Cec_ParSat_t
INCLUDES ///.
struct Cec_ParSmf_t_ Cec_ParSmf_t
struct Cec_ParChc_t_ Cec_ParChc_t
struct Cec_ParSim_t_ Cec_ParSim_t
struct Cec_ParCor_t_ Cec_ParCor_t
void Gia_ManStop(Gia_Man_t *p)
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
int Gia_ManEquivCountLits(Gia_Man_t *p)
int Gia_ManEquivSetColors(Gia_Man_t *p, int fVerbose)
struct Gia_Man_t_ Gia_Man_t
void Gia_ManOrigIdsInit(Gia_Man_t *p)
DECLARATIONS ///.
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact, int fWriteNewLine)
Gia_Man_t * Gia_ManEquivReduceAndRemap(Gia_Man_t *p, int fSeq, int fMiterPairs)