summaryrefslogtreecommitdiffstats
path: root/src/proof/pdr
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-09-14 12:23:46 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-09-14 12:23:46 -0700
commitab5c1692dba713599e2dbe966c0d65996943bb99 (patch)
treef3f5ca75ec798698959f74d3bb4eea2780c3f740 /src/proof/pdr
parent60fae35d3635464ce7a727899b4b77bd405ca4e3 (diff)
downloadabc-ab5c1692dba713599e2dbe966c0d65996943bb99.tar.gz
abc-ab5c1692dba713599e2dbe966c0d65996943bb99.tar.bz2
abc-ab5c1692dba713599e2dbe966c0d65996943bb99.zip
Handling the case when all outputs are undecided in 'pdr -a' with per-output timeout.
Diffstat (limited to 'src/proof/pdr')
-rw-r--r--src/proof/pdr/pdrCore.c8
-rw-r--r--src/proof/pdr/pdrMan.c1
2 files changed, 3 insertions, 6 deletions
diff --git a/src/proof/pdr/pdrCore.c b/src/proof/pdr/pdrCore.c
index 5294e020..e671d00f 100644
--- a/src/proof/pdr/pdrCore.c
+++ b/src/proof/pdr/pdrCore.c
@@ -610,8 +610,6 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( p->pPars->vOutMap ) Vec_IntWriteEntry( p->pPars->vOutMap, p->iOutCur, 0 );
Abc_Print( 1, "Output %*d was trivially asserted in frame %2d (solved %*d out of %*d outputs).\n",
nOutDigits, p->iOutCur, k, nOutDigits, p->pPars->nFailOuts, nOutDigits, Saig_ManPoNum(p->pAig) );
- if ( p->vCexes == NULL )
- p->vCexes = Vec_PtrStart( Saig_ManPoNum(p->pAig) );
assert( Vec_PtrEntry(p->vCexes, p->iOutCur) == NULL );
Vec_PtrWriteEntry( p->vCexes, p->iOutCur, p->pPars->fStoreCex ? Pdr_ManDeriveCex(p) : (void *)(ABC_PTRINT_T)1 );
if ( p->pPars->pFuncOnFail && p->pPars->pFuncOnFail(p->iOutCur, p->pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, p->iOutCur) : NULL) )
@@ -712,8 +710,6 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
}
p->pPars->nFailOuts++;
if ( p->pPars->vOutMap ) Vec_IntWriteEntry( p->pPars->vOutMap, p->iOutCur, 0 );
- if ( p->vCexes == NULL )
- p->vCexes = Vec_PtrStart( Saig_ManPoNum(p->pAig) );
assert( Vec_PtrEntry(p->vCexes, p->iOutCur) == NULL );
Vec_PtrWriteEntry( p->vCexes, p->iOutCur, p->pPars->fStoreCex ? Pdr_ManDeriveCex(p) : (void *)(ABC_PTRINT_T)1 );
if ( p->pPars->pFuncOnFail && p->pPars->pFuncOnFail(p->iOutCur, p->pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, p->iOutCur) : NULL) )
@@ -743,7 +739,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
abctime timeSince = Abc_Clock() - clkOne;
assert( p->pTime4Outs[p->iOutCur] > 0 );
p->pTime4Outs[p->iOutCur] = (p->pTime4Outs[p->iOutCur] > timeSince) ? p->pTime4Outs[p->iOutCur] - timeSince : 0;
- if ( p->pTime4Outs[p->iOutCur] == 0 && (p->vCexes == NULL || Vec_PtrEntry(p->vCexes, p->iOutCur) == NULL) )
+ if ( p->pTime4Outs[p->iOutCur] == 0 && Vec_PtrEntry(p->vCexes, p->iOutCur) == NULL ) // undecided
{
p->pPars->nDropOuts++;
if ( p->pPars->vOutMap )
@@ -799,7 +795,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
for ( k = 0; k < Saig_ManPoNum(p->pAig); k++ )
if ( Vec_IntEntry(p->pPars->vOutMap, k) == -2 ) // unknown
Vec_IntWriteEntry( p->pPars->vOutMap, k, 1 ); // unsat
- return p->vCexes ? 0 : 1; // UNSAT
+ return (Vec_PtrCountZero(p->vCexes) == Vec_PtrSize(p->vCexes)) ? 1 : 0; // UNSAT
}
if ( p->pPars->fVerbose )
Pdr_ManPrintProgress( p, 0, Abc_Clock() - clkStart );
diff --git a/src/proof/pdr/pdrMan.c b/src/proof/pdr/pdrMan.c
index 9aa68aaa..af7c424a 100644
--- a/src/proof/pdr/pdrMan.c
+++ b/src/proof/pdr/pdrMan.c
@@ -85,6 +85,7 @@ Pdr_Man_t * Pdr_ManStart( Aig_Man_t * pAig, Pdr_Par_t * pPars, Vec_Int_t * vPrio
}
if ( pPars->fSolveAll )
{
+ p->vCexes = Vec_PtrStart( Saig_ManPoNum(p->pAig) );
p->pPars->vOutMap = Vec_IntAlloc( Saig_ManPoNum(pAig) );
Vec_IntFill( p->pPars->vOutMap, Saig_ManPoNum(pAig), -2 );
}