summaryrefslogtreecommitdiffstats
path: root/src/misc/util/utilCex.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-11-11 20:56:05 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2011-11-11 20:56:05 -0800
commit3beb36778ec35702690833e6a5d01498d1113b28 (patch)
treebf9a89c9505ee2badb4eae7983cd2f2f03f90136 /src/misc/util/utilCex.c
parent9fe4c74952691c3a6cc87dc85edb43da11dd8c8e (diff)
downloadabc-3beb36778ec35702690833e6a5d01498d1113b28.tar.gz
abc-3beb36778ec35702690833e6a5d01498d1113b28.tar.bz2
abc-3beb36778ec35702690833e6a5d01498d1113b28.zip
Enabled counter-example minimization in 'write_counter'.
Diffstat (limited to 'src/misc/util/utilCex.c')
-rw-r--r--src/misc/util/utilCex.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/misc/util/utilCex.c b/src/misc/util/utilCex.c
index 72989535..37205543 100644
--- a/src/misc/util/utilCex.c
+++ b/src/misc/util/utilCex.c
@@ -196,7 +196,7 @@ void Abc_CexPrintStats( Abc_Cex_t * p )
for ( k = 0; k < p->nBits; k++ )
Counter += Abc_InfoHasBit(p->pData, k);
printf( "CEX: iPo = %d iFrame = %d nRegs = %d nPis = %d nBits = %d nOnes = %5d (%5.2f %%)\n",
- p->iPo, p->iFrame, p->nRegs, p->nPis, p->nBits, Counter, 100.0 * Counter / p->nBits );
+ p->iPo, p->iFrame, p->nRegs, p->nPis, p->nBits, Counter, 100.0 * Counter / (p->nBits - p->nRegs) );
}
/**Function*************************************************************
@@ -244,6 +244,24 @@ void Abc_CexPrint( Abc_Cex_t * p )
SeeAlso []
***********************************************************************/
+void Abc_CexFreeP( Abc_Cex_t ** p )
+{
+ if ( *p == NULL )
+ return;
+ ABC_FREE( *p );
+}
+
+/**Function*************************************************************
+
+ Synopsis [Frees the counter-example.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
void Abc_CexFree( Abc_Cex_t * p )
{
ABC_FREE( p );