diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-02-17 13:19:09 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-02-17 13:19:09 -0800 |
commit | ee9f66e2c4dba55e5ab4c7ce16223054b291d5fb (patch) | |
tree | 4bbd0d53e29589963f061a0cb5a965dd8efe57e7 /src/base/abci | |
parent | f2a413029ca91c8fadf8b23d8eb5b4ab2dc8aea4 (diff) | |
download | abc-ee9f66e2c4dba55e5ab4c7ce16223054b291d5fb.tar.gz abc-ee9f66e2c4dba55e5ab4c7ce16223054b291d5fb.tar.bz2 abc-ee9f66e2c4dba55e5ab4c7ce16223054b291d5fb.zip |
Isomorphism checking code.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 16c9ffe7..c77a4f2b 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -422,6 +422,26 @@ void Abc_FrameReplaceCexVec( Abc_Frame_t * pAbc, Vec_Ptr_t ** pvCexVec ) SeeAlso [] ***********************************************************************/ +void Abc_FrameReplacePoEquivs( Abc_Frame_t * pAbc, Vec_Ptr_t ** pvPoEquivs ) +{ + // update the array vector + if ( pAbc->vPoEquivs ) + Vec_VecFree( (Vec_Vec_t *)pAbc->vPoEquivs ); + pAbc->vPoEquivs = *pvPoEquivs; + *pvPoEquivs = NULL; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ void Abc_FrameClearDesign() { } @@ -21335,6 +21355,7 @@ int Abc_CommandIso( Abc_Frame_t * pAbc, int argc, char ** argv ) extern Abc_Ntk_t * Abc_NtkFromAigPhase( Aig_Man_t * pMan ); Abc_Ntk_t * pNtk, * pNtkNew = NULL; Aig_Man_t * pAig, * pTemp; + Vec_Ptr_t * vPosEquivs = NULL; int c, fVerbose = 0; Extra_UtilGetoptReset(); while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF ) @@ -21372,11 +21393,14 @@ int Abc_CommandIso( Abc_Frame_t * pAbc, int argc, char ** argv ) // transform pAig = Abc_NtkToDar( pNtk, 0, 1 ); - pTemp = Saig_ManIsoReduce( pAig, fVerbose ); + pTemp = Saig_ManIsoReduce( pAig, &vPosEquivs, fVerbose ); pNtkNew = Abc_NtkFromAigPhase( pTemp ); Aig_ManStop( pTemp ); Aig_ManStop( pAig ); + // update the internal storage of PO equivalences + Abc_FrameReplacePoEquivs( pAbc, &vPosEquivs ); + // replace the current network Abc_FrameReplaceCurrentNetwork( pAbc, pNtkNew ); return 0; |