diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-02-03 21:34:46 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-02-03 21:34:46 -0800 |
commit | e6f874477709536c246417583c60d386658dcc49 (patch) | |
tree | 7a1924587d09b15829f5ed7f1f235006052f6856 /src/sat/pdr | |
parent | 59d7455cf16cc2be722b5f224801bcd1b600134e (diff) | |
download | abc-e6f874477709536c246417583c60d386658dcc49.tar.gz abc-e6f874477709536c246417583c60d386658dcc49.tar.bz2 abc-e6f874477709536c246417583c60d386658dcc49.zip |
Make PDR return the number of completed frames.
Diffstat (limited to 'src/sat/pdr')
-rw-r--r-- | src/sat/pdr/pdr.h | 1 | ||||
-rw-r--r-- | src/sat/pdr/pdrCore.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/sat/pdr/pdr.h b/src/sat/pdr/pdr.h index 1099c621..27e76b6e 100644 --- a/src/sat/pdr/pdr.h +++ b/src/sat/pdr/pdr.h @@ -51,6 +51,7 @@ struct Pdr_Par_t_ int fShortest; // forces bug traces to be shortest int fVerbose; // verbose output int fVeryVerbose; // very verbose output + int iFrame; // explored up to this frame }; //////////////////////////////////////////////////////////////////////// diff --git a/src/sat/pdr/pdrCore.c b/src/sat/pdr/pdrCore.c index f1c10443..8b58bde1 100644 --- a/src/sat/pdr/pdrCore.c +++ b/src/sat/pdr/pdrCore.c @@ -56,6 +56,7 @@ void Pdr_ManSetDefaultParams( Pdr_Par_t * pPars ) pPars->fShortest = 0; // forces bug traces to be shortest pPars->fVerbose = 0; // verbose output pPars->fVeryVerbose = 0; // very verbose output + pPars->iFrame = -1; // explored up to this frame } /**Function************************************************************* @@ -544,6 +545,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p ) if ( p->pPars->fVerbose ) Pdr_ManPrintProgress( p, 1, clock() - clkStart ); printf( "Reached conflict limit (%d).\n", p->pPars->nConfLimit ); + p->pPars->iFrame = k; return -1; } if ( RetValue == 0 ) @@ -554,6 +556,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p ) if ( p->pPars->fVerbose ) Pdr_ManPrintProgress( p, 1, clock() - clkStart ); printf( "Reached conflict limit (%d).\n", p->pPars->nConfLimit ); + p->pPars->iFrame = k; return -1; } if ( RetValue == 0 ) @@ -565,6 +568,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p ) } if ( p->pPars->fVerbose ) Pdr_ManPrintProgress( p, 1, clock() - clkStart ); + p->pPars->iFrame = k; return 0; // SAT } } @@ -590,6 +594,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p ) Pdr_ManVerifyInvariant( p ); if ( p->pPars->fDumpInv ) Pdr_ManDumpClauses( p, (char *)"inv.pla" ); + p->pPars->iFrame = k; return 1; // UNSAT } if ( p->pPars->fVerbose ) @@ -608,6 +613,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p ) if ( p->pPars->fVerbose ) Pdr_ManPrintProgress( p, 1, clock() - clkStart ); printf( "Reached timeout (%d seconds).\n", p->pPars->nTimeOut ); + p->pPars->iFrame = k; return -1; } if ( p->pPars->nFrameMax && k >= p->pPars->nFrameMax ) @@ -615,6 +621,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p ) if ( p->pPars->fVerbose ) Pdr_ManPrintProgress( p, 1, clock() - clkStart ); printf( "Reached limit on the number of timeframes (%d).\n", p->pPars->nFrameMax ); + p->pPars->iFrame = k; return -1; } } |