summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaJf.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-06-23 13:11:59 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-06-23 13:11:59 -0700
commit44d9c7e54307f64cbcdc7c8cd17ff6e219e13b55 (patch)
tree2ae1aa5fef6ca8198f0c2fb6123c3d1494dbe2b4 /src/aig/gia/giaJf.c
parentf93e5244219b75224df0c75b424654bd2424852b (diff)
downloadabc-44d9c7e54307f64cbcdc7c8cd17ff6e219e13b55.tar.gz
abc-44d9c7e54307f64cbcdc7c8cd17ff6e219e13b55.tar.bz2
abc-44d9c7e54307f64cbcdc7c8cd17ff6e219e13b55.zip
Improvements to CNF generation.
Diffstat (limited to 'src/aig/gia/giaJf.c')
-rw-r--r--src/aig/gia/giaJf.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/aig/gia/giaJf.c b/src/aig/gia/giaJf.c
index b5aa7787..0a0e7d48 100644
--- a/src/aig/gia/giaJf.c
+++ b/src/aig/gia/giaJf.c
@@ -1750,23 +1750,30 @@ Gia_Man_t * Jf_ManDeriveCnf( Gia_Man_t * p, int fCnfObjIds )
pPars->fCnfObjIds = fCnfObjIds;
return Jf_ManPerformMapping( p, pPars );
}
-Gia_Man_t * Jf_ManDeriveCnfMiter( Gia_Man_t * p )
+Gia_Man_t * Jf_ManDeriveCnfMiter( Gia_Man_t * p, int fVerbose )
{
Jf_Par_t Pars, * pPars = &Pars;
Jf_ManSetDefaultPars( pPars );
pPars->fGenCnf = 1;
pPars->fCnfObjIds = 0;
pPars->fAddOrCla = 1;
+ pPars->fVerbose = fVerbose;
return Jf_ManPerformMapping( p, pPars );
}
-void Jf_ManDumpCnf( Gia_Man_t * p, char * pFileName )
+void Jf_ManDumpCnf( Gia_Man_t * p, char * pFileName, int fVerbose )
{
+ abctime clk = Abc_Clock();
Gia_Man_t * pNew;
Cnf_Dat_t * pCnf;
- pNew = Jf_ManDeriveCnfMiter( p );
+ pNew = Jf_ManDeriveCnfMiter( p, fVerbose );
pCnf = (Cnf_Dat_t *)pNew->pData; pNew->pData = NULL;
Cnf_DataWriteIntoFile( pCnf, pFileName, 0, NULL, NULL );
Gia_ManStop( pNew );
+// if ( fVerbose )
+ {
+ printf( "CNF stats: Vars = %6d. Clauses = %7d. Literals = %8d. ", pCnf->nVars, pCnf->nClauses, pCnf->nLiterals );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
+ }
Cnf_DataFree(pCnf);
}