Commit 30ddf14c by Alan Mishchenko

Improvements to command 'twoexact'.

parent 21cccea0
...@@ -88,10 +88,6 @@ LINK32=link.exe ...@@ -88,10 +88,6 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File # Begin Source File
SOURCE=.\src\aig\gia\giaSif.c
# End Source File
# Begin Source File
SOURCE=.\src\base\main\main.c SOURCE=.\src\base\main\main.c
# End Source File # End Source File
# End Group # End Group
......
...@@ -8766,11 +8766,13 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -8766,11 +8766,13 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
extern void Exa_ManExactSynthesis( Bmc_EsPar_t * pPars ); extern void Exa_ManExactSynthesis( Bmc_EsPar_t * pPars );
extern void Exa_ManExactSynthesis2( Bmc_EsPar_t * pPars ); extern void Exa_ManExactSynthesis2( Bmc_EsPar_t * pPars );
int c; extern void Exa_ManExactSynthesis4( Bmc_EsPar_t * pPars );
extern void Exa_ManExactSynthesis5( Bmc_EsPar_t * pPars );
int c, fKissat = 0, fKissat2 = 0;
Bmc_EsPar_t Pars, * pPars = &Pars; Bmc_EsPar_t Pars, * pPars = &Pars;
Bmc_EsParSetDefault( pPars ); Bmc_EsParSetDefault( pPars );
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "INTadcogvh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "INTadconugklvh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -8819,9 +8821,21 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -8819,9 +8821,21 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'o': case 'o':
pPars->fFewerVars ^= 1; pPars->fFewerVars ^= 1;
break; break;
case 'n':
pPars->fOrderNodes ^= 1;
break;
case 'u':
pPars->fUniqFans ^= 1;
break;
case 'g': case 'g':
pPars->fGlucose ^= 1; pPars->fGlucose ^= 1;
break; break;
case 'k':
fKissat ^= 1;
break;
case 'l':
fKissat2 ^= 1;
break;
case 'v': case 'v':
pPars->fVerbose ^= 1; pPars->fVerbose ^= 1;
break; break;
...@@ -8853,14 +8867,18 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -8853,14 +8867,18 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Function should not have more than 10 inputs.\n" ); Abc_Print( -1, "Function should not have more than 10 inputs.\n" );
return 1; return 1;
} }
if ( pPars->fGlucose ) if ( fKissat )
Exa_ManExactSynthesis4( pPars );
else if ( fKissat2 )
Exa_ManExactSynthesis5( pPars );
else if ( pPars->fGlucose )
Exa_ManExactSynthesis( pPars ); Exa_ManExactSynthesis( pPars );
else else
Exa_ManExactSynthesis2( pPars ); Exa_ManExactSynthesis2( pPars );
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: twoexact [-INT <num>] [-adcogvh] <hex>\n" ); Abc_Print( -2, "usage: twoexact [-INT <num>] [-adconugklvh] <hex>\n" );
Abc_Print( -2, "\t exact synthesis of multi-input function using two-input gates\n" ); Abc_Print( -2, "\t exact synthesis of multi-input function using two-input gates\n" );
Abc_Print( -2, "\t-I <num> : the number of input variables [default = %d]\n", pPars->nVars ); Abc_Print( -2, "\t-I <num> : the number of input variables [default = %d]\n", pPars->nVars );
Abc_Print( -2, "\t-N <num> : the number of two-input nodes [default = %d]\n", pPars->nNodes ); Abc_Print( -2, "\t-N <num> : the number of two-input nodes [default = %d]\n", pPars->nNodes );
...@@ -8869,7 +8887,11 @@ usage: ...@@ -8869,7 +8887,11 @@ usage:
Abc_Print( -2, "\t-d : toggle using dynamic constraint addition [default = %s]\n", pPars->fDynConstr ? "yes" : "no" ); Abc_Print( -2, "\t-d : toggle using dynamic constraint addition [default = %s]\n", pPars->fDynConstr ? "yes" : "no" );
Abc_Print( -2, "\t-c : toggle dumping CNF into a file [default = %s]\n", pPars->fDumpCnf ? "yes" : "no" ); Abc_Print( -2, "\t-c : toggle dumping CNF into a file [default = %s]\n", pPars->fDumpCnf ? "yes" : "no" );
Abc_Print( -2, "\t-o : toggle using additional optimizations [default = %s]\n", pPars->fFewerVars ? "yes" : "no" ); Abc_Print( -2, "\t-o : toggle using additional optimizations [default = %s]\n", pPars->fFewerVars ? "yes" : "no" );
Abc_Print( -2, "\t-n : toggle ordering internal nodes [default = %s]\n", pPars->fOrderNodes ? "yes" : "no" );
Abc_Print( -2, "\t-u : toggle using unique fanouts [default = %s]\n", pPars->fUniqFans ? "yes" : "no" );
Abc_Print( -2, "\t-g : toggle using Glucose 3.0 by Gilles Audemard and Laurent Simon [default = %s]\n", pPars->fGlucose ? "yes" : "no" ); Abc_Print( -2, "\t-g : toggle using Glucose 3.0 by Gilles Audemard and Laurent Simon [default = %s]\n", pPars->fGlucose ? "yes" : "no" );
Abc_Print( -2, "\t-k : toggle using Kissat by Armin Biere [default = %s]\n", fKissat ? "yes" : "no" );
Abc_Print( -2, "\t-l : toggle using Kissat by Armin Biere [default = %s]\n", fKissat2 ? "yes" : "no" );
Abc_Print( -2, "\t-v : toggle verbose printout [default = %s]\n", pPars->fVerbose ? "yes" : "no" ); Abc_Print( -2, "\t-v : toggle verbose printout [default = %s]\n", pPars->fVerbose ? "yes" : "no" );
Abc_Print( -2, "\t-h : print the command usage\n" ); Abc_Print( -2, "\t-h : print the command usage\n" );
Abc_Print( -2, "\t<hex> : truth table in hex notation\n" ); Abc_Print( -2, "\t<hex> : truth table in hex notation\n" );
...@@ -60,6 +60,8 @@ struct Bmc_EsPar_t_ ...@@ -60,6 +60,8 @@ struct Bmc_EsPar_t_
int fOrderNodes; int fOrderNodes;
int fEnumSols; int fEnumSols;
int fFewerVars; int fFewerVars;
int fQuadrEnc;
int fUniqFans;
int RuntimeLim; int RuntimeLim;
int fVerbose; int fVerbose;
char * pTtStr; char * pTtStr;
...@@ -81,6 +83,8 @@ static inline void Bmc_EsParSetDefault( Bmc_EsPar_t * pPars ) ...@@ -81,6 +83,8 @@ static inline void Bmc_EsParSetDefault( Bmc_EsPar_t * pPars )
pPars->fOrderNodes = 0; pPars->fOrderNodes = 0;
pPars->fEnumSols = 0; pPars->fEnumSols = 0;
pPars->fFewerVars = 0; pPars->fFewerVars = 0;
pPars->fQuadrEnc = 0;
pPars->fUniqFans = 0;
pPars->RuntimeLim = 0; pPars->RuntimeLim = 0;
pPars->fVerbose = 1; pPars->fVerbose = 1;
} }
......
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