85 int s, i, RetValue, Status;
86 abctime clk, clk2, clkTotal = Abc_Clock(), timeTemp = 0;
87 abctime nTimeNewOut = pPars->nSecLimit ? pPars->nSecLimit * CLOCKS_PER_SEC + Abc_Clock() : 0;
90 if ( pPars->nFramesK > 1 )
91 pPars->fTransLoop = 1;
94 assert( Saig_ManRegNum(pAig) > 0 );
95 assert( Saig_ManPiNum(pAig) > 0 );
96 assert( Saig_ManPoNum(pAig)-Saig_ManConstrNum(pAig) == 1 );
97 if ( pPars->fVerbose && Saig_ManConstrNum(pAig) )
98 printf(
"Performing interpolation with %d constraints...\n", Saig_ManConstrNum(pAig) );
103 printf(
"Property trivially fails in the initial state.\n" );
116 if ( pPars->fTransLoop )
122 p->pCnfAig =
Cnf_Derive(
p->pAigTrans, Aig_ManRegNum(
p->pAigTrans) );
123p->timeCnf += Abc_Clock() - clk;
124 if ( pPars->fVerbose )
126 printf(
"AIG: PI/PO/Reg = %d/%d/%d. And = %d. Lev = %d. CNF: Var/Cla = %d/%d.\n",
127 Saig_ManPiNum(pAig), Saig_ManPoNum(pAig), Saig_ManRegNum(pAig),
129 p->pCnfAig->nVars,
p->pCnfAig->nClauses );
141 if ( pPars->fUseBackward )
145 assert( Aig_ManCoNum(
p->pInter) == 1 );
148p->timeCnf += Abc_Clock() - clk;
152 if ( pPars->fRewrite )
159p->timeRwr += Abc_Clock() - clk;
162 if ( pPars->fUseBackward )
163 p->pCnfFrames =
Cnf_Derive(
p->pFrames, Aig_ManCoNum(
p->pFrames) );
167p->timeCnf += Abc_Clock() - clk;
169 if ( pPars->fVerbose )
171 printf(
"Step = %2d. Frames = 1 + %d. And = %5d. Lev = %5d. ",
173 ABC_PRT(
"Time", Abc_Clock() - clk2 );
179 if ( !(pPars->fTransLoop || pPars->fUseBackward || pPars->nFramesK > 1) )
185p->timeCnf += Abc_Clock() - clk;
188p->timeEqu += Abc_Clock() - clk;
199 if ( pPars->nFramesMax &&
p->nFrames + i >= pPars->nFramesMax )
201 if ( pPars->fVerbose )
202 printf(
"Reached limit (%d) on the number of timeframes.\n", pPars->nFramesMax );
203 p->timeTotal = Abc_Clock() - clkTotal;
211#ifdef ABC_USE_LIBRARIES
212 if ( pPars->fUseMiniSat )
214 assert( !pPars->fUseBackward );
215 RetValue = Inter_ManPerformOneStepM114p(
p, pPars->fUsePudlak, pPars->fUseOther );
221 if ( pPars->fVerbose )
223 printf(
" I = %2d. Bmc =%3d. IntAnd =%6d. IntLev =%5d. Conf =%6d. ",
224 i+1, i + 1 +
p->nFrames, Aig_ManNodeNum(
p->pInter),
Aig_ManLevelNum(
p->pInter),
p->nConfCur );
225 ABC_PRT(
"Time", Abc_Clock() - clk );
228 pPars->iFrameMax = i - 1 +
p->nFrames;
233 if ( pPars->fVerbose )
234 printf(
"Found a real counterexample in frame %d.\n",
p->nFrames );
235 p->timeTotal = Abc_Clock() - clkTotal;
236 *piFrame =
p->nFrames;
244 pParsBmc->
fVerbose = pPars->fVerbose;
247 printf(
"Error: The problem should be SAT but it is UNSAT.\n" );
248 else if ( RetValue == -1 )
249 printf(
"Error: The problem timed out.\n" );
260 else if ( RetValue == -1 )
262 if ( pPars->nSecLimit && Abc_Clock() > nTimeNewOut )
264 if ( pPars->fVerbose )
265 printf(
"Reached timeout (%d seconds).\n", pPars->nSecLimit );
269 assert(
p->nConfCur >=
p->nConfLimit );
270 if ( pPars->fVerbose )
271 printf(
"Reached limit (%d) on the number of conflicts.\n",
p->nConfLimit );
273 p->timeTotal = Abc_Clock() - clkTotal;
284 p->pInterNew->Time2Quit = nTimeNewOut;
289 if (
p->pInterNew == NULL )
291 printf(
"Reached timeout (%d seconds) during rewriting.\n", pPars->nSecLimit );
292 p->timeTotal = Abc_Clock() - clkTotal;
298p->timeRwr += Abc_Clock() - clk;
301 if (
p->pInterNew == NULL || Aig_ObjChild0(Aig_ManCo(
p->pInterNew,0)) == Aig_ManConst0(
p->pInterNew) )
304 if ( pPars->fVerbose )
305 printf(
"The problem is trivially true for all states.\n" );
306 p->timeTotal = Abc_Clock() - clkTotal;
314 if ( pPars->fCheckKstep )
316 if ( Aig_ManCiNum(
p->pInterNew) == Aig_ManCiNum(
p->pInter) )
318 if ( pPars->fTransLoop || pPars->fUseBackward || pPars->nFramesK > 1 )
322timeTemp = Abc_Clock() - clk2;
328p->timeCnf += Abc_Clock() - clk2;
329timeTemp = Abc_Clock() - clk2;
342 if ( Aig_ManCiNum(
p->pInterNew) == Aig_ManCiNum(
p->pInter) )
347p->timeEqu += Abc_Clock() - clk - timeTemp;
350 if ( pPars->fVerbose )
351 printf(
"Proved containment of interpolants.\n" );
352 p->timeTotal = Abc_Clock() - clkTotal;
357 if ( pPars->nSecLimit && Abc_Clock() > nTimeNewOut )
359 printf(
"Reached timeout (%d seconds).\n", pPars->nSecLimit );
360 p->timeTotal = Abc_Clock() - clkTotal;
366 if ( pPars->fTransLoop )
369 p->pInter =
p->pInterNew;
373 if ( pPars->fUseBackward )
382p->timeRwr += Abc_Clock() - clk;
387 p->pInter =
p->pInterNew;
394p->timeCnf += Abc_Clock() - clk;