From de984d7f904af9cd90ea03986fe1312e8df2709f Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 28 Feb 2011 21:55:40 -0800 Subject: Fixing corner-case bugs in &srm -s. --- src/aig/gia/giaEquiv.c | 3 ++- src/base/abci/abc.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/aig/gia/giaEquiv.c b/src/aig/gia/giaEquiv.c index ba34fc6b..383d4e8d 100644 --- a/src/aig/gia/giaEquiv.c +++ b/src/aig/gia/giaEquiv.c @@ -954,7 +954,8 @@ Gia_Man_t * Gia_ManSpecReduce( Gia_Man_t * p, int fDualOut, int fSynthesis, int Vec_IntForEachEntry( vGuide, iLit, i ) if ( iLit ) nAddPos++; - assert( Gia_ManPoNum(pNew) == Gia_ManPoNum(p) + nAddPos ); + if ( nAddPos ) + assert( Gia_ManPoNum(pNew) == Gia_ManPoNum(p) + nAddPos ); } Vec_IntFreeP( &vTrace ); Vec_IntFreeP( &vGuide ); diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index c055c3ad..6c470062 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -24658,6 +24658,11 @@ int Abc_CommandAbc9Equiv2( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Abc_CommandAbc9Equiv2(): There is no AIG.\n" ); return 1; } + if ( Gia_ManRegNum(pAbc->pGia) == 0 ) + { + Abc_Print( 0, "Abc_CommandAbc9Equiv2(): There is no flops. Nothing is done.\n" ); + return 0; + } if ( fUseCex ) { if ( pAbc->pCex->nPis != Gia_ManPiNum(pAbc->pGia) ) -- cgit v1.2.3