Commit 19ce8396 by Alan Mishchenko

New abstraction code.

parent 397bebf8
...@@ -377,9 +377,9 @@ int Gia_ManPbaPerform( Gia_Man_t * pGia, int nStart, int nFrames, int nConfLimit ...@@ -377,9 +377,9 @@ int Gia_ManPbaPerform( Gia_Man_t * pGia, int nStart, int nFrames, int nConfLimit
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
int Gia_ManGlaCbaPerform( Gia_Man_t * pGia, void * pPars, int fUseCnf ) int Gia_ManGlaCbaPerform( Gia_Man_t * pGia, void * pPars, int fNaiveCnf )
{ {
extern Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, int TimeLimit, int fUseCnf, int fVerbose ); extern Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, int TimeLimit, int fNaiveCnf, int fVerbose );
Saig_ParBmc_t * p = (Saig_ParBmc_t *)pPars; Saig_ParBmc_t * p = (Saig_ParBmc_t *)pPars;
Vec_Int_t * vGateClasses; Vec_Int_t * vGateClasses;
Aig_Man_t * pAig; Aig_Man_t * pAig;
...@@ -393,7 +393,7 @@ int Gia_ManGlaCbaPerform( Gia_Man_t * pGia, void * pPars, int fUseCnf ) ...@@ -393,7 +393,7 @@ int Gia_ManGlaCbaPerform( Gia_Man_t * pGia, void * pPars, int fUseCnf )
*/ */
// perform abstraction // perform abstraction
pAig = Gia_ManToAigSimple( pGia ); pAig = Gia_ManToAigSimple( pGia );
vGateClasses = Aig_GlaManTest( pAig, p->nFramesMax, p->nConfLimit, p->nTimeOut, fUseCnf, p->fVerbose ); vGateClasses = Aig_GlaManTest( pAig, p->nFramesMax, p->nConfLimit, p->nTimeOut, fNaiveCnf, p->fVerbose );
Aig_ManStop( pAig ); Aig_ManStop( pAig );
// update the map // update the map
......
...@@ -454,7 +454,7 @@ int Aig_GlaObjAddToSolver( Aig_GlaMan_t * p, Aig_Obj_t * pObj, int k ) ...@@ -454,7 +454,7 @@ int Aig_GlaObjAddToSolver( Aig_GlaMan_t * p, Aig_Obj_t * pObj, int k )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
Aig_GlaMan_t * Aig_GlaManStart( Aig_Man_t * pAig, int fUseCnf ) Aig_GlaMan_t * Aig_GlaManStart( Aig_Man_t * pAig, int fNaiveCnf )
{ {
Aig_GlaMan_t * p; Aig_GlaMan_t * p;
int i; int i;
...@@ -482,7 +482,7 @@ Aig_GlaMan_t * Aig_GlaManStart( Aig_Man_t * pAig, int fUseCnf ) ...@@ -482,7 +482,7 @@ Aig_GlaMan_t * Aig_GlaManStart( Aig_Man_t * pAig, int fUseCnf )
Vec_IntPush( p->vVar2Inf, -1 ); Vec_IntPush( p->vVar2Inf, -1 );
// CNF computation // CNF computation
if ( fUseCnf ) if ( !fNaiveCnf )
{ {
p->vLeaves = Vec_PtrAlloc( 100 ); p->vLeaves = Vec_PtrAlloc( 100 );
p->vVolume = Vec_PtrAlloc( 100 ); p->vVolume = Vec_PtrAlloc( 100 );
...@@ -650,7 +650,7 @@ void Aig_GlaExtendIncluded( Aig_GlaMan_t * p ) ...@@ -650,7 +650,7 @@ void Aig_GlaExtendIncluded( Aig_GlaMan_t * p )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, int TimeLimit, int fUseCnf, int fVerbose ) Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, int TimeLimit, int fNaiveCnf, int fVerbose )
{ {
int nStart = 0; int nStart = 0;
Vec_Int_t * vResult = NULL; Vec_Int_t * vResult = NULL;
...@@ -672,7 +672,7 @@ Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, in ...@@ -672,7 +672,7 @@ Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, in
} }
// start the solver // start the solver
p = Aig_GlaManStart( pAig, fUseCnf ); p = Aig_GlaManStart( pAig, fNaiveCnf );
p->nFramesMax = nFramesMax; p->nFramesMax = nFramesMax;
p->nConfLimit = nConfLimit; p->nConfLimit = nConfLimit;
p->fVerbose = fVerbose; p->fVerbose = fVerbose;
...@@ -774,6 +774,7 @@ Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, in ...@@ -774,6 +774,7 @@ Vec_Int_t * Aig_GlaManTest( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, in
ABC_PRTP( "Total ", p->timeTotal, p->timeTotal ); ABC_PRTP( "Total ", p->timeTotal, p->timeTotal );
} }
// prepare return value // prepare return value
if ( !fNaiveCnf )
Aig_GlaExtendIncluded( p ); Aig_GlaExtendIncluded( p );
vResult = p->vIncluded; p->vIncluded = NULL; vResult = p->vIncluded; p->vIncluded = NULL;
Aig_GlaManStop( p ); Aig_GlaManStop( p );
......
...@@ -28888,7 +28888,7 @@ usage: ...@@ -28888,7 +28888,7 @@ usage:
int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv ) int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Saig_ParBmc_t Pars, * pPars = &Pars; Saig_ParBmc_t Pars, * pPars = &Pars;
int c, fUseCnf = 1; int c, fNaiveCnf = 0;
Saig_ParBmcSetDefaultParams( pPars ); Saig_ParBmcSetDefaultParams( pPars );
pPars->nStart = 0; //(pAbc->nFrames >= 0) ? pAbc->nFrames : 0; pPars->nStart = 0; //(pAbc->nFrames >= 0) ? pAbc->nFrames : 0;
pPars->nFramesMax = 50; //pPars->nStart + 10; pPars->nFramesMax = 50; //pPars->nStart + 10;
...@@ -28954,7 +28954,7 @@ int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28954,7 +28954,7 @@ int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage; goto usage;
break; break;
case 'c': case 'c':
fUseCnf ^= 1; fNaiveCnf ^= 1;
break; break;
case 'v': case 'v':
pPars->fVerbose ^= 1; pPars->fVerbose ^= 1;
...@@ -28975,7 +28975,7 @@ int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -28975,7 +28975,7 @@ int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
return 0; return 0;
} }
pAbc->Status = Gia_ManGlaCbaPerform( pAbc->pGia, pPars, fUseCnf ); pAbc->Status = Gia_ManGlaCbaPerform( pAbc->pGia, pPars, fNaiveCnf );
if ( pPars->nStart == 0 ) if ( pPars->nStart == 0 )
pAbc->nFrames = pPars->iFrame; pAbc->nFrames = pPars->iFrame;
Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexSeq ); Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexSeq );
...@@ -28990,7 +28990,7 @@ usage: ...@@ -28990,7 +28990,7 @@ usage:
Abc_Print( -2, "\t-C num : the max number of SAT solver conflicts [default = %d]\n", pPars->nConfLimit ); Abc_Print( -2, "\t-C num : the max number of SAT solver conflicts [default = %d]\n", pPars->nConfLimit );
Abc_Print( -2, "\t-M num : the max number of flops to add (0 = not used) [default = %d]\n", pPars->nFfToAddMax ); Abc_Print( -2, "\t-M num : the max number of flops to add (0 = not used) [default = %d]\n", pPars->nFfToAddMax );
Abc_Print( -2, "\t-T num : an approximate timeout, in seconds [default = %d]\n", pPars->nTimeOut ); Abc_Print( -2, "\t-T num : an approximate timeout, in seconds [default = %d]\n", pPars->nTimeOut );
Abc_Print( -2, "\t-c : toggle using smarter CNF computation [default = %s]\n", fUseCnf? "yes": "no" ); Abc_Print( -2, "\t-c : toggle using naive CNF computation [default = %s]\n", fNaiveCnf? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "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"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 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