Commit 60fae35d by Alan Mishchenko

Fixing several bugs, which led to unsound results produced by 'pdr -a' with per-output timeout.

parent a4087e45
...@@ -491,8 +491,16 @@ int Pdr_ManBlockCube( Pdr_Man_t * p, Pdr_Set_t * pCube ) ...@@ -491,8 +491,16 @@ int Pdr_ManBlockCube( Pdr_Man_t * p, Pdr_Set_t * pCube )
// check other frames // check other frames
assert( pPred == NULL ); assert( pPred == NULL );
for ( k = pThis->iFrame; k < kMax; k++ ) for ( k = pThis->iFrame; k < kMax; k++ )
if ( !Pdr_ManCheckCube( p, k, pCubeMin, NULL, 0 ) ) {
RetValue = Pdr_ManCheckCube( p, k, pCubeMin, NULL, 0 );
if ( RetValue == -1 )
{
Pdr_OblDeref( pThis );
return -1;
}
if ( !RetValue )
break; break;
}
// add new clause // add new clause
if ( p->pPars->fVeryVerbose ) if ( p->pPars->fVeryVerbose )
...@@ -740,8 +748,8 @@ int Pdr_ManSolveInt( Pdr_Man_t * p ) ...@@ -740,8 +748,8 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
p->pPars->nDropOuts++; p->pPars->nDropOuts++;
if ( p->pPars->vOutMap ) if ( p->pPars->vOutMap )
Vec_IntWriteEntry( p->pPars->vOutMap, p->iOutCur, -1 ); Vec_IntWriteEntry( p->pPars->vOutMap, p->iOutCur, -1 );
if ( p->pPars->fVerbose ) if ( !p->pPars->fNotVerbose )
printf( "Timing out on output %d.\n", p->iOutCur ); Abc_Print( 1, "Timing out on output %*d.\n", nOutDigits, p->iOutCur );
} }
p->timeToStopOne = 0; p->timeToStopOne = 0;
} }
......
...@@ -336,7 +336,7 @@ void Pdr_ManVerifyInvariant( Pdr_Man_t * p ) ...@@ -336,7 +336,7 @@ void Pdr_ManVerifyInvariant( Pdr_Man_t * p )
kThis = Vec_PtrSize(p->vSolvers); kThis = Vec_PtrSize(p->vSolvers);
pSat = Pdr_ManCreateSolver( p, kThis ); pSat = Pdr_ManCreateSolver( p, kThis );
// add the property output // add the property output
Pdr_ManSetPropertyOutput( p, kThis ); // Pdr_ManSetPropertyOutput( p, kThis );
// add the clauses // add the clauses
Vec_PtrForEachEntry( Pdr_Set_t *, vCubes, pCube, i ) Vec_PtrForEachEntry( Pdr_Set_t *, vCubes, pCube, i )
{ {
......
...@@ -185,6 +185,9 @@ void Pdr_ManSetPropertyOutput( Pdr_Man_t * p, int k ) ...@@ -185,6 +185,9 @@ void Pdr_ManSetPropertyOutput( Pdr_Man_t * p, int k )
// skip solved outputs // skip solved outputs
if ( p->vCexes && Vec_PtrEntry(p->vCexes, i) ) if ( p->vCexes && Vec_PtrEntry(p->vCexes, i) )
continue; continue;
// skip timedout outputs
if ( p->pPars->vOutMap && Vec_IntEntry(p->pPars->vOutMap, i) == -1 )
continue;
Lit = toLitCond( Pdr_ObjSatVar(p, k, 1, pObj), 1 ); // neg literal Lit = toLitCond( Pdr_ObjSatVar(p, k, 1, pObj), 1 ); // neg literal
RetValue = sat_solver_addclause( pSat, &Lit, &Lit + 1 ); RetValue = sat_solver_addclause( pSat, &Lit, &Lit + 1 );
assert( RetValue == 1 ); assert( RetValue == 1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment