summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abc.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-02-20 16:09:20 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-02-20 16:09:20 -0800
commit9f71a9f67bac0e949c9335a2cbf39788b986389c (patch)
treedf8e3d71ff947bc6f6bcfda4a78154943985cf28 /src/base/abci/abc.c
parente43ca9f850cc0b36fe3c97782f153d1ed27f0fa4 (diff)
downloadabc-9f71a9f67bac0e949c9335a2cbf39788b986389c.tar.gz
abc-9f71a9f67bac0e949c9335a2cbf39788b986389c.tar.bz2
abc-9f71a9f67bac0e949c9335a2cbf39788b986389c.zip
Isomorphism checking code.
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r--src/base/abci/abc.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index c9640db0..69d46075 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -21982,11 +21982,19 @@ int Abc_CommandAbc9Write( Abc_Frame_t * pAbc, int argc, char ** argv )
char * pFileName;
char ** pArgvNew;
int c, nArgcNew;
+ int fUnique = 0;
+ int fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "uvh" ) ) != EOF )
{
switch ( c )
{
+ case 'u':
+ fUnique ^= 1;
+ break;
+ case 'v':
+ fVerbose ^= 1;
+ break;
case 'h':
goto usage;
default:
@@ -22004,16 +22012,24 @@ int Abc_CommandAbc9Write( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Print( -1, "Abc_CommandAbc9Write(): There is no AIG to write.\n" );
return 1;
- }
- // create the design to write
+ }
pFileName = argv[globalUtilOptind];
- Gia_WriteAiger( pAbc->pGia, pFileName, 0, 0 );
+ if ( fUnique )
+ {
+ Gia_Man_t * pGia = Gia_ManIsoCanonicize( pAbc->pGia, fVerbose );
+ Gia_WriteAigerSimple( pGia, pFileName );
+ Gia_ManStop( pGia );
+ }
+ else
+ Gia_WriteAiger( pAbc->pGia, pFileName, 0, 0 );
return 0;
usage:
- Abc_Print( -2, "usage: &w [-h] <file>\n" );
- Abc_Print( -2, "\t writes the current AIG into the AIGER file\n" );
- Abc_Print( -2, "\t-h : print the command usage\n");
+ Abc_Print( -2, "usage: &w [-uvh] <file>\n" );
+ Abc_Print( -2, "\t writes the current AIG into the AIGER file\n" );
+ Abc_Print( -2, "\t-u : toggle writing canonical AIG structure [default = %s]\n", fUnique? "yes" : "no" );
+ Abc_Print( -2, "\t-v : toggle verbose output [default = %s]\n", fVerbose? "yes": "no" );
+ Abc_Print( -2, "\t-h : print the command usage\n");
Abc_Print( -2, "\t<file> : the file name\n");
return 1;
}
@@ -27839,8 +27855,6 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Iso( Abc_Frame_t * pAbc, int argc, char ** argv )
{
- extern Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pGia, Vec_Ptr_t ** pvPosEquivs, int fVerbose );
-
Gia_Man_t * pAig;
Vec_Ptr_t * vPosEquivs;
int c, fVerbose = 0;