diff options
Diffstat (limited to 'src/sat')
-rw-r--r-- | src/sat/bmc/bmcBmc3.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sat/bmc/bmcBmc3.c b/src/sat/bmc/bmcBmc3.c index 8e22a0d5..360b7c83 100644 --- a/src/sat/bmc/bmcBmc3.c +++ b/src/sat/bmc/bmcBmc3.c @@ -1300,6 +1300,7 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars ) { Gia_ManBmc_t * p; Aig_Obj_t * pObj; + Abc_Cex_t * pCexNew; unsigned * pInfo; int RetValue = -1, fFirst = 1, nJumpFrame = 0, fUnfinished = 0; int nOutDigits = Abc_Base10Log( Saig_ManPoNum(pAig) ); @@ -1426,12 +1427,10 @@ clkOther += Abc_Clock() - clk2; nOutDigits, i, f, nOutDigits, pPars->nFailOuts, nOutDigits, Saig_ManPoNum(pAig) ); if ( p->vCexes == NULL ) p->vCexes = Vec_PtrStart( Saig_ManPoNum(pAig) ); + pCexNew = (p->pPars->fUseBridge || pPars->fStoreCex) ? Abc_CexMakeTriv( Aig_ManRegNum(pAig), Saig_ManPiNum(pAig), Saig_ManPoNum(pAig), f*Saig_ManPoNum(pAig)+i ) : (void *)(ABC_PTRINT_T)1; if ( p->pPars->fUseBridge ) - { - Abc_Cex_t * pCexNew = Abc_CexMakeTriv( Aig_ManRegNum(pAig), Saig_ManPiNum(pAig), Saig_ManPoNum(pAig), f*Saig_ManPoNum(pAig)+i ); Gia_ManToBridgeResult( stdout, 0, pCexNew, pCexNew->iPo ); - } - Vec_PtrWriteEntry( p->vCexes, i, pPars->fStoreCex ? Abc_CexMakeTriv( Aig_ManRegNum(pAig), Saig_ManPiNum(pAig), Saig_ManPoNum(pAig), f*Saig_ManPoNum(pAig)+i ) : (void *)(ABC_PTRINT_T)1 ); + Vec_PtrWriteEntry( p->vCexes, i, pCexNew ); if ( pPars->pFuncOnFail && pPars->pFuncOnFail(i, pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, i) : NULL) ) { Abc_Print( 1, "Quitting due to callback on fail.\n" ); @@ -1521,12 +1520,10 @@ nTimeSat += Abc_Clock() - clk2; nOutDigits, i, f, nOutDigits, pPars->nFailOuts, nOutDigits, Saig_ManPoNum(pAig) ); if ( p->vCexes == NULL ) p->vCexes = Vec_PtrStart( Saig_ManPoNum(pAig) ); + pCexNew = (p->pPars->fUseBridge || pPars->fStoreCex) ? Saig_ManGenerateCex( p, f, i ) : (void *)(ABC_PTRINT_T)1; if ( p->pPars->fUseBridge ) - { - Abc_Cex_t * pCexNew = Saig_ManGenerateCex( p, f, i ); Gia_ManToBridgeResult( stdout, 0, pCexNew, pCexNew->iPo ); - } - Vec_PtrWriteEntry( p->vCexes, i, pPars->fStoreCex? Saig_ManGenerateCex( p, f, i ) : (void *)(ABC_PTRINT_T)1 ); + Vec_PtrWriteEntry( p->vCexes, i, pCexNew ); if ( pPars->pFuncOnFail && pPars->pFuncOnFail(i, pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, i) : NULL) ) { Abc_Print( 1, "Quitting due to callback on fail.\n" ); |