Skip to content

Commit 1f3cf0a

Browse files
committed
Experiment with "scorr".
1 parent 3aff0af commit 1f3cf0a

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

src/base/abci/abc.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23148,7 +23148,7 @@ int Abc_CommandSeqSweep2( Abc_Frame_t * pAbc, int argc, char ** argv )
2314823148
// set defaults
2314923149
Ssw_ManSetDefaultParams( pPars );
2315023150
Extra_UtilGetoptReset();
23151-
while ( ( c = Extra_UtilGetopt( argc, argv, "PQFCLSIVMNXcmplkodsefqvwh" ) ) != EOF )
23151+
while ( ( c = Extra_UtilGetopt( argc, argv, "PQFCLSIVMNXRcmplkodsefqvwh" ) ) != EOF )
2315223152
{
2315323153
switch ( c )
2315423154
{
@@ -23273,6 +23273,18 @@ int Abc_CommandSeqSweep2( Abc_Frame_t * pAbc, int argc, char ** argv )
2327323273
if ( pPars->nLimitMax < 0 )
2327423274
goto usage;
2327523275
break;
23276+
case 'R':
23277+
if ( globalUtilOptind >= argc )
23278+
{
23279+
Abc_Print( -1, "Command line switch \"-R\" should be followed by an integer.\n" );
23280+
goto usage;
23281+
}
23282+
pPars->nSkip = atoi(argv[globalUtilOptind]);
23283+
globalUtilOptind++;
23284+
if ( pPars->nSkip < 0 )
23285+
goto usage;
23286+
break;
23287+
2327623288
case 'c':
2327723289
pPars->fConstrs ^= 1;
2327823290
break;
@@ -23394,7 +23406,7 @@ int Abc_CommandSeqSweep2( Abc_Frame_t * pAbc, int argc, char ** argv )
2339423406
return 0;
2339523407

2339623408
usage:
23397-
Abc_Print( -2, "usage: scorr [-PQFCLSIVMNX <num>] [-cmplkodsefqvwh]\n" );
23409+
Abc_Print( -2, "usage: scorr [-PQFCLSIVMNXR <num>] [-cmplkodsefqvwh]\n" );
2339823410
Abc_Print( -2, "\t performs sequential sweep using K-step induction\n" );
2339923411
Abc_Print( -2, "\t-P num : max partition size (0 = no partitioning) [default = %d]\n", pPars->nPartSize );
2340023412
Abc_Print( -2, "\t-Q num : partition overlap (0 = no overlap) [default = %d]\n", pPars->nOverSize );
@@ -23408,6 +23420,7 @@ int Abc_CommandSeqSweep2( Abc_Frame_t * pAbc, int argc, char ** argv )
2340823420
Abc_Print( -2, "\t-M num : min call num needed to recycle the SAT solver [default = %d]\n", pPars->nRecycleCalls2 );
2340923421
Abc_Print( -2, "\t-N num : set last <num> POs to be constraints (use with -c) [default = %d]\n", nConstrs );
2341023422
Abc_Print( -2, "\t-X num : the number of iterations of little or no improvement [default = %d]\n", pPars->nLimitMax );
23423+
Abc_Print( -2, "\t-R num : the number used to skip some constraints [default = %d]\n", pPars->nSkip );
2341123424
Abc_Print( -2, "\t-c : toggle using explicit constraints [default = %s]\n", pPars->fConstrs? "yes": "no" );
2341223425
Abc_Print( -2, "\t-m : toggle full merge if constraints are present [default = %s]\n", pPars->fMergeFull? "yes": "no" );
2341323426
Abc_Print( -2, "\t-p : toggle aligning polarity of SAT variables [default = %s]\n", pPars->fPolarFlip? "yes": "no" );

src/proof/ssw/ssw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ struct Ssw_Pars_t_
7474
int fEquivDump; // enables dumping equivalences
7575
int fEquivDump2; // enables dumping equivalences
7676
int fStopWhenGone; // stop when PO output is not a candidate constant
77+
int nSkip;
7778
// optimized latch correspondence
7879
int fLatchCorrOpt; // perform register correspondence (optimized)
7980
int nSatVarMax; // max number of SAT vars before recycling SAT solver (optimized latch corr only)

src/proof/ssw/sswAig.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ static inline void Ssw_FramesConstrainNode( Ssw_Man_t * p, Aig_Man_t * pFrames,
120120
// add the constraint
121121
if ( fTwoPos )
122122
{
123-
Aig_ObjCreateCo( pFrames, pObjNew2 );
124-
Aig_ObjCreateCo( pFrames, pObjNew );
123+
if ( p->pPars->nSkip == 0 ||rand() % p->pPars->nSkip == 0 ) {
124+
Aig_ObjCreateCo( pFrames, pObjNew2 );
125+
Aig_ObjCreateCo( pFrames, pObjNew );
126+
}
125127
}
126128
else
127129
{
@@ -158,6 +160,8 @@ Aig_Man_t * Ssw_FramesWithClasses( Ssw_Man_t * p )
158160
Ssw_ObjSetFrame( p, pObj, 0, Aig_ObjCreateCi(pFrames) );
159161
// add timeframes
160162
iLits = 0;
163+
if ( p->pPars->nSkip )
164+
srand(1);
161165
for ( f = 0; f < p->pPars->nFramesK; f++ )
162166
{
163167
// map constants and PIs

0 commit comments

Comments
 (0)