summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abc.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-05-01 00:10:53 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-05-01 00:10:53 -0700
commitb94766bce5e3199547f54de0a3b5b4e0c779a3c0 (patch)
tree8ed44e14a1c7ec522870b7cb2c5d71ebe888104e /src/base/abci/abc.c
parentc53eb0b9e11ba7c0394d5b3b4fb17ddc270ff8b4 (diff)
downloadabc-b94766bce5e3199547f54de0a3b5b4e0c779a3c0.tar.gz
abc-b94766bce5e3199547f54de0a3b5b4e0c779a3c0.tar.bz2
abc-b94766bce5e3199547f54de0a3b5b4e0c779a3c0.zip
Faster isomorphism detection (command &iso).
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r--src/base/abci/abc.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 32282dd7..8b791af4 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -29808,12 +29808,18 @@ int Abc_CommandAbc9Iso( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_Man_t * pAig;
Vec_Ptr_t * vPosEquivs;
// Vec_Ptr_t * vPiPerms;
- int c, fDualOut = 0, fVerbose = 0, fVeryVerbose = 0;
+ int c, fNewAlgo = 1, fEstimate = 0, fDualOut = 0, fVerbose = 0, fVeryVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "dvwh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "nedvwh" ) ) != EOF )
{
switch ( c )
{
+ case 'n':
+ fNewAlgo ^= 1;
+ break;
+ case 'e':
+ fEstimate ^= 1;
+ break;
case 'd':
fDualOut ^= 1;
break;
@@ -29839,8 +29845,11 @@ int Abc_CommandAbc9Iso( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Iso(): The AIG has only one PO. Isomorphism detection is not performed.\n" );
return 1;
}
- pAig = Gia_ManIsoReduce( pAbc->pGia, &vPosEquivs, NULL, fDualOut, fVerbose, fVeryVerbose );
-// pAig = Gia_ManIsoReduce( pAbc->pGia, &vPosEquivs, &vPiPerms, fDualOut, fVerbose, fVeryVerbose );
+ if ( fNewAlgo )
+ pAig = Gia_ManIsoReduce2( pAbc->pGia, &vPosEquivs, NULL, fEstimate, fDualOut, fVerbose, fVeryVerbose );
+ else
+ pAig = Gia_ManIsoReduce( pAbc->pGia, &vPosEquivs, NULL, fEstimate, fDualOut, fVerbose, fVeryVerbose );
+// pAig = Gia_ManIsoReduce( pAbc->pGia, &vPosEquivs, &vPiPerms, 0, fDualOut, fVerbose, fVeryVerbose );
// Vec_VecFree( (Vec_Vec_t *)vPiPerms );
if ( pAig == NULL )
{
@@ -29854,9 +29863,11 @@ int Abc_CommandAbc9Iso( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
usage:
- Abc_Print( -2, "usage: &iso [-dvwh]\n" );
+ Abc_Print( -2, "usage: &iso [-nedvwh]\n" );
Abc_Print( -2, "\t removes POs with isomorphic sequential COI\n" );
- Abc_Print( -2, "\t-d : treat the current AIG as a dual-output miter [default = %s]\n", fDualOut? "yes": "no" );
+ Abc_Print( -2, "\t-n : toggle using new fast algorithm [default = %s]\n", fNewAlgo? "yes": "no" );
+ Abc_Print( -2, "\t-e : toggle computing lower bound on equivalence classes [default = %s]\n", fEstimate? "yes": "no" );
+ Abc_Print( -2, "\t-d : toggle treating the current AIG as a dual-output miter [default = %s]\n", fDualOut? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-w : toggle printing very verbose information [default = %s]\n", fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
@@ -31556,7 +31567,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern void Mig_ManTest( Gia_Man_t * pGia );
// extern int Gia_ManVerify( Gia_Man_t * pGia );
// extern Gia_Man_t * Gia_SweeperFraigTest( Gia_Man_t * p, int nWords, int nConfs, int fVerbose );
- extern Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p );
+// extern Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p );
+// extern void Gia_ManCollectSeqTest( Gia_Man_t * p );
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "svh" ) ) != EOF )
@@ -31609,8 +31621,9 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Mig_ManTest( pAbc->pGia );
// Gia_ManVerifyWithBoxes( pAbc->pGia );
// pTemp = Gia_SweeperFraigTest( pAbc->pGia, 4, 1000, 0 );
- pTemp = Gia_ManOptimizeRing( pAbc->pGia );
- Abc_FrameUpdateGia( pAbc, pTemp );
+// pTemp = Gia_ManOptimizeRing( pAbc->pGia );
+// Abc_FrameUpdateGia( pAbc, pTemp );
+// Gia_ManCollectSeqTest( pAbc->pGia );
return 0;
usage:
Abc_Print( -2, "usage: &test [-svh]\n" );