summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaSweeper.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-10-31 11:20:37 -0400
committerAlan Mishchenko <alanmi@berkeley.edu>2013-10-31 11:20:37 -0400
commita457bfe1e580f646f1e02a1a1a00cde1e157353d (patch)
treebb9816995c203844d7c9dd77d537f1d0bfc112b7 /src/aig/gia/giaSweeper.c
parent05c987b6cf63ef8960cef8079d73ccd554190245 (diff)
downloadabc-a457bfe1e580f646f1e02a1a1a00cde1e157353d.tar.gz
abc-a457bfe1e580f646f1e02a1a1a00cde1e157353d.tar.bz2
abc-a457bfe1e580f646f1e02a1a1a00cde1e157353d.zip
GIA sweeper interface update.
Diffstat (limited to 'src/aig/gia/giaSweeper.c')
-rw-r--r--src/aig/gia/giaSweeper.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c
index 8b6569b6..1794d051 100644
--- a/src/aig/gia/giaSweeper.c
+++ b/src/aig/gia/giaSweeper.c
@@ -222,7 +222,6 @@ void Gia_SweeperSetConflictLimit( Gia_Man_t * p, int nConfMax )
Swp_Man_t * pSwp = (Swp_Man_t *)p->pData;
pSwp->nConfMax = nConfMax;
}
-
void Gia_SweeperSetRuntimeLimit( Gia_Man_t * p, int nSeconds )
{
Swp_Man_t * pSwp = (Swp_Man_t *)p->pData;
@@ -251,6 +250,7 @@ int Gia_SweeperProbeCreate( Gia_Man_t * p, int iLit )
{
Swp_Man_t * pSwp = (Swp_Man_t *)p->pData;
int ProbeId = Vec_IntSize(pSwp->vProbes);
+ assert( iLit >= 0 );
Vec_IntPush( pSwp->vProbes, iLit );
return ProbeId;
}
@@ -276,7 +276,9 @@ int Gia_SweeperProbeUpdate( Gia_Man_t * p, int ProbeId, int iLitNew )
int Gia_SweeperProbeLit( Gia_Man_t * p, int ProbeId )
{
Swp_Man_t * pSwp = (Swp_Man_t *)p->pData;
- return Vec_IntEntry( pSwp->vProbes, ProbeId );
+ int iLit = Vec_IntEntry(pSwp->vProbes, ProbeId);
+ assert( iLit >= 0 );
+ return iLit;
}
/**Function*************************************************************
@@ -374,7 +376,7 @@ Gia_Man_t * Gia_SweeperExtractUserLogic( Gia_Man_t * p, Vec_Int_t * vProbeIds, V
pObj->Value = Vec_IntEntry( vValues, i );
Vec_IntFree( vObjIds );
Vec_IntFree( vValues );
- // duplicated if needed
+ // duplicate if needed
if ( Gia_ManHasDangling(pNew) )
{
pNew = Gia_ManCleanup( pTemp = pNew );
@@ -440,7 +442,7 @@ Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime )
Vec_IntWriteEntry( pSwp->vProbes, ProbeId, iLit );
}
Vec_IntFree( vObjIds );
- // duplicated if needed
+ // duplicate if needed
if ( Gia_ManHasDangling(pNew) )
{
pNew = Gia_ManCleanup( pTemp = pNew );