mirror of https://github.com/YosysHQ/abc.git
Experiments with SAT solving.
This commit is contained in:
parent
1afd156dbd
commit
d514029e34
|
|
@ -4903,6 +4903,10 @@ SOURCE=.\src\aig\gia\giaCSat2.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\aig\gia\giaCSat3.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\aig\gia\giaCSatOld.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -14,6 +14,7 @@ SRC += src/aig/gia/giaAig.c \
|
|||
src/aig/gia/giaCSatOld.c \
|
||||
src/aig/gia/giaCSat.c \
|
||||
src/aig/gia/giaCSat2.c \
|
||||
src/aig/gia/giaCSat3.c \
|
||||
src/aig/gia/giaCTas.c \
|
||||
src/aig/gia/giaCut.c \
|
||||
src/aig/gia/giaDecs.c \
|
||||
|
|
|
|||
|
|
@ -36673,13 +36673,14 @@ usage:
|
|||
int Abc_CommandAbc9Sat( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||
{
|
||||
extern Vec_Int_t * Cbs2_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStatus, int fVerbose );
|
||||
extern Vec_Int_t * Cbs3_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, int nRestarts, Vec_Str_t ** pvStatus, int fVerbose );
|
||||
Cec_ParSat_t ParsSat, * pPars = &ParsSat;
|
||||
Gia_Man_t * pTemp;
|
||||
int c;
|
||||
int fNewSolver = 0, fCSat = 0, f0Proved = 0;
|
||||
int fNewSolver = 0, fNewSolver2 = 0, fCSat = 0, f0Proved = 0, nRestarts = 1;
|
||||
Cec_ManSatSetDefaultParams( pPars );
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "JCSNanmtcxzvh" ) ) != EOF )
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "JCRSNanmtcxyzvh" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
|
|
@ -36705,6 +36706,17 @@ int Abc_CommandAbc9Sat( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
if ( pPars->nBTLimit < 0 )
|
||||
goto usage;
|
||||
break;
|
||||
case 'R':
|
||||
if ( globalUtilOptind >= argc )
|
||||
{
|
||||
Abc_Print( -1, "Command line switch \"-R\" should be followed by an integer.\n" );
|
||||
goto usage;
|
||||
}
|
||||
nRestarts = atoi(argv[globalUtilOptind]);
|
||||
globalUtilOptind++;
|
||||
if ( nRestarts < 0 )
|
||||
goto usage;
|
||||
break;
|
||||
case 'S':
|
||||
if ( globalUtilOptind >= argc )
|
||||
{
|
||||
|
|
@ -36745,6 +36757,9 @@ int Abc_CommandAbc9Sat( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
case 'x':
|
||||
fNewSolver ^= 1;
|
||||
break;
|
||||
case 'y':
|
||||
fNewSolver2 ^= 1;
|
||||
break;
|
||||
case 'z':
|
||||
f0Proved ^= 1;
|
||||
break;
|
||||
|
|
@ -36766,6 +36781,8 @@ int Abc_CommandAbc9Sat( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
Vec_Str_t * vStatus;
|
||||
if ( fNewSolver )
|
||||
vCounters = Cbs2_ManSolveMiterNc( pAbc->pGia, pPars->nBTLimit, &vStatus, pPars->fVerbose );
|
||||
else if ( fNewSolver2 )
|
||||
vCounters = Cbs3_ManSolveMiterNc( pAbc->pGia, pPars->nBTLimit, nRestarts, &vStatus, pPars->fVerbose );
|
||||
else if ( pPars->fLearnCls )
|
||||
vCounters = Tas_ManSolveMiterNc( pAbc->pGia, pPars->nBTLimit, &vStatus, pPars->fVerbose );
|
||||
else if ( pPars->fNonChrono )
|
||||
|
|
@ -36789,10 +36806,11 @@ int Abc_CommandAbc9Sat( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
return 0;
|
||||
|
||||
usage:
|
||||
Abc_Print( -2, "usage: &sat [-JCSN <num>] [-anmctxzvh]\n" );
|
||||
Abc_Print( -2, "usage: &sat [-JCRSN <num>] [-anmctxzvh]\n" );
|
||||
Abc_Print( -2, "\t performs SAT solving for the combinational outputs\n" );
|
||||
Abc_Print( -2, "\t-J num : the SAT solver type [default = %d]\n", pPars->SolverType );
|
||||
Abc_Print( -2, "\t-C num : the max number of conflicts at a node [default = %d]\n", pPars->nBTLimit );
|
||||
Abc_Print( -2, "\t-R num : the max number of restarts at a node [default = %d]\n", nRestarts );
|
||||
Abc_Print( -2, "\t-S num : the min number of variables to recycle the solver [default = %d]\n", pPars->nSatVarMax );
|
||||
Abc_Print( -2, "\t-N num : the min number of calls to recycle the solver [default = %d]\n", pPars->nCallsRecycle );
|
||||
Abc_Print( -2, "\t-a : toggle solving all outputs and saving counter-examples [default = %s]\n", pPars->fSaveCexes? "yes": "no" );
|
||||
|
|
@ -36801,6 +36819,7 @@ usage:
|
|||
Abc_Print( -2, "\t-c : toggle using circuit-based SAT solver [default = %s]\n", fCSat? "yes": "no" );
|
||||
Abc_Print( -2, "\t-t : toggle using learning in curcuit-based solver [default = %s]\n", pPars->fLearnCls? "yes": "no" );
|
||||
Abc_Print( -2, "\t-x : toggle using new solver [default = %s]\n", fNewSolver? "yes": "no" );
|
||||
Abc_Print( -2, "\t-y : toggle using new solver [default = %s]\n", fNewSolver2? "yes": "no" );
|
||||
Abc_Print( -2, "\t-z : toggle replacing proved cones by const0 [default = %s]\n", f0Proved? "yes": "no" );
|
||||
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "yes": "no" );
|
||||
Abc_Print( -2, "\t-h : print the command usage\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue