Commit 4efc89d3 by Alan Mishchenko

Enabled detecting CEXes in multiple POs without stopping (sim3 -a).

parent dfd871c2
...@@ -549,23 +549,23 @@ int Ssw_RarManObjWhichOne( Ssw_RarMan_t * p, Aig_Obj_t * pObj ) ...@@ -549,23 +549,23 @@ int Ssw_RarManObjWhichOne( Ssw_RarMan_t * p, Aig_Obj_t * pObj )
int Ssw_RarManCheckNonConstOutputs( Ssw_RarMan_t * p, int * pnSolvedNow, int iFrame, int fNotVerbose, clock_t Time ) int Ssw_RarManCheckNonConstOutputs( Ssw_RarMan_t * p, int * pnSolvedNow, int iFrame, int fNotVerbose, clock_t Time )
{ {
Aig_Obj_t * pObj; Aig_Obj_t * pObj;
int i; int i, RetValue = 0;
p->iFailPo = -1; p->iFailPo = -1;
p->iFailPat = -1; p->iFailPat = -1;
Saig_ManForEachPo( p->pAig, pObj, i ) Saig_ManForEachPo( p->pAig, pObj, i )
{ {
if ( p->pAig->nConstrs && i >= Saig_ManPoNum(p->pAig) - p->pAig->nConstrs ) if ( p->pAig->nConstrs && i >= Saig_ManPoNum(p->pAig) - p->pAig->nConstrs )
return 0; break;
if ( p->vCexes && Vec_PtrEntry(p->vCexes, i) ) if ( p->vCexes && Vec_PtrEntry(p->vCexes, i) )
continue; continue;
if ( !Ssw_RarManObjIsConst(p, pObj) ) if ( Ssw_RarManObjIsConst(p, pObj) )
{ continue;
RetValue = 1;
p->iFailPo = i; p->iFailPo = i;
p->iFailPat = Ssw_RarManObjWhichOne( p, pObj ); p->iFailPat = Ssw_RarManObjWhichOne( p, pObj );
if ( pnSolvedNow == NULL )
break;
// remember the one solved // remember the one solved
if ( pnSolvedNow )
{
(*pnSolvedNow)++; (*pnSolvedNow)++;
if ( p->vCexes == NULL ) if ( p->vCexes == NULL )
p->vCexes = Vec_PtrStart( Saig_ManPoNum(p->pAig) ); p->vCexes = Vec_PtrStart( Saig_ManPoNum(p->pAig) );
...@@ -581,12 +581,8 @@ int Ssw_RarManCheckNonConstOutputs( Ssw_RarMan_t * p, int * pnSolvedNow, int iFr ...@@ -581,12 +581,8 @@ int Ssw_RarManCheckNonConstOutputs( Ssw_RarMan_t * p, int * pnSolvedNow, int iFr
nOutDigits, Saig_ManPoNum(p->pAig) ); nOutDigits, Saig_ManPoNum(p->pAig) );
Abc_PrintTime( 1, "Time", Time ); Abc_PrintTime( 1, "Time", Time );
} }
continue;
}
return 1;
} }
} return RetValue;
return 0;
} }
/**Function************************************************************* /**Function*************************************************************
......
...@@ -238,6 +238,8 @@ Abc_Cex_t* _cex_get_vec(int i) ...@@ -238,6 +238,8 @@ Abc_Cex_t* _cex_get_vec(int i)
return NULL; return NULL;
} }
if ( pCex == (Abc_Cex_t *)1 )
return pCex;
return Abc_CexDup( pCex, -1 ); return Abc_CexDup( pCex, -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