Commit 7ea40494 by Alan Mishchenko

Graph isomorphism checking code.

parent e511b872
...@@ -3043,6 +3043,10 @@ SOURCE=.\src\aig\aig\aigInter.c ...@@ -3043,6 +3043,10 @@ SOURCE=.\src\aig\aig\aigInter.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\aig\aig\aigIso.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\aig\aigJust.c SOURCE=.\src\aig\aig\aigJust.c
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -3195,6 +3199,10 @@ SOURCE=.\src\aig\saig\saigConstr2.c ...@@ -3195,6 +3199,10 @@ SOURCE=.\src\aig\saig\saigConstr2.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\aig\saig\saigDual.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\saig\saigDup.c SOURCE=.\src\aig\saig\saigDup.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -6,6 +6,7 @@ SRC += src/aig/aig/aigCheck.c \ ...@@ -6,6 +6,7 @@ SRC += src/aig/aig/aigCheck.c \
src/aig/aig/aigFanout.c \ src/aig/aig/aigFanout.c \
src/aig/aig/aigFrames.c \ src/aig/aig/aigFrames.c \
src/aig/aig/aigInter.c \ src/aig/aig/aigInter.c \
src/aig/aig/aigIso.c \
src/aig/aig/aigJust.c \ src/aig/aig/aigJust.c \
src/aig/aig/aigMan.c \ src/aig/aig/aigMan.c \
src/aig/aig/aigMem.c \ src/aig/aig/aigMem.c \
......
...@@ -342,7 +342,6 @@ int Vec_IntDoubleWidth( Vec_Int_t * p, int nWords ) ...@@ -342,7 +342,6 @@ int Vec_IntDoubleWidth( Vec_Int_t * p, int nWords )
/**Function************************************************************* /**Function*************************************************************
Synopsis [] Synopsis []
...@@ -377,14 +376,25 @@ static inline Vta_Obj_t * Vga_ManFind( Vta_Man_t * p, int iObj, int iFrame ) ...@@ -377,14 +376,25 @@ static inline Vta_Obj_t * Vga_ManFind( Vta_Man_t * p, int iObj, int iFrame )
static inline Vta_Obj_t * Vga_ManFindOrAdd( Vta_Man_t * p, int iObj, int iFrame ) static inline Vta_Obj_t * Vga_ManFindOrAdd( Vta_Man_t * p, int iObj, int iFrame )
{ {
Vta_Obj_t * pThis; Vta_Obj_t * pThis;
int * pPlace; int i, * pPlace;
assert( iObj >= 0 && iFrame >= -1 ); assert( iObj >= 0 && iFrame >= -1 );
if ( p->nObjs == p->nObjsAlloc ) if ( p->nObjs == p->nObjsAlloc )
{ {
// resize objects
p->pObjs = ABC_REALLOC( Vta_Obj_t, p->pObjs, 2 * p->nObjsAlloc ); p->pObjs = ABC_REALLOC( Vta_Obj_t, p->pObjs, 2 * p->nObjsAlloc );
memset( p->pObjs + p->nObjsAlloc, 0, p->nObjsAlloc * sizeof(Vta_Obj_t) ); memset( p->pObjs + p->nObjsAlloc, 0, p->nObjsAlloc * sizeof(Vta_Obj_t) );
p->nObjsAlloc *= 2; p->nObjsAlloc *= 2;
// rehash entries in the table // rehash entries in the table
ABC_FREE( p->pBins );
p->nBins = Abc_PrimeCudd( 2 * p->nBins );
p->pBins = ABC_CALLOC( int, p->nBins );
Vta_ManForEachObj( p, pThis, i )
{
pThis->iNext = 0;
pPlace = Vga_ManLookup( p, pThis->iObj, pThis->iFrame );
assert( *pPlace == 0 );
*pPlace = i;
}
} }
pPlace = Vga_ManLookup( p, iObj, iFrame ); pPlace = Vga_ManLookup( p, iObj, iFrame );
if ( *pPlace ) if ( *pPlace )
......
...@@ -8837,6 +8837,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -8837,6 +8837,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
extern void Aig_ManSupportsTest( Aig_Man_t * pMan ); extern void Aig_ManSupportsTest( Aig_Man_t * pMan );
extern int Aig_SupportSizeTest( Aig_Man_t * pMan ); extern int Aig_SupportSizeTest( Aig_Man_t * pMan );
extern int Abc_NtkSuppSizeTest( Abc_Ntk_t * p ); extern int Abc_NtkSuppSizeTest( Abc_Ntk_t * p );
extern void Iso_ManTest( Aig_Man_t * pAig, int fVerbose );
if ( pNtk ) if ( pNtk )
{ {
Aig_Man_t * pAig = Abc_NtkToDar( pNtk, 0, 1 ); Aig_Man_t * pAig = Abc_NtkToDar( pNtk, 0, 1 );
...@@ -8844,7 +8845,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -8844,7 +8845,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
// Aig_ManInterTest( pAig, 1 ); // Aig_ManInterTest( pAig, 1 );
// Aig_ManSupportsTest( pAig ); // Aig_ManSupportsTest( pAig );
// Aig_SupportSizeTest( pAig ); // Aig_SupportSizeTest( pAig );
Abc_NtkSuppSizeTest( pNtk ); Iso_ManTest( pAig, fVerbose );
Aig_ManStop( pAig ); Aig_ManStop( pAig );
} }
} }
......
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