summaryrefslogtreecommitdiffstats
path: root/src/aig/kit
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2009-02-15 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2009-02-15 08:01:00 -0800
commit0871bffae307e0553e0c5186336189e8b55cf6a6 (patch)
tree4571d1563fe33a53a57fea1c35fb668b9d33265f /src/aig/kit
parentf936cc0680c98ffe51b3a1716c996072d5dbf76c (diff)
downloadabc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz
abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2
abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip
Version abc90215
Diffstat (limited to 'src/aig/kit')
-rw-r--r--src/aig/kit/cloud.c34
-rw-r--r--src/aig/kit/cloud.h39
-rw-r--r--src/aig/kit/kit.h33
-rw-r--r--src/aig/kit/kitDsd.c42
-rw-r--r--src/aig/kit/kitFactor.c2
-rw-r--r--src/aig/kit/kitGraph.c14
-rw-r--r--src/aig/kit/kitSop.c6
7 files changed, 64 insertions, 106 deletions
diff --git a/src/aig/kit/cloud.c b/src/aig/kit/cloud.c
index f5c91fe7..dc57e2b7 100644
--- a/src/aig/kit/cloud.c
+++ b/src/aig/kit/cloud.c
@@ -77,7 +77,7 @@ CloudManager * Cloud_Init( int nVars, int nBits )
nBits = CLOUD_NODE_BITS;
// start the manager
- dd = CALLOC( CloudManager, 1 );
+ dd = ABC_CALLOC( CloudManager, 1 );
dd->nMemUsed += sizeof(CloudManager);
// variables
@@ -96,10 +96,10 @@ CloudManager * Cloud_Init( int nVars, int nBits )
// unique table
clk1 = clock();
- dd->tUnique = CALLOC( CloudNode, dd->nNodesAlloc );
+ dd->tUnique = ABC_CALLOC( CloudNode, dd->nNodesAlloc );
dd->nMemUsed += sizeof(CloudNode) * dd->nNodesAlloc;
clk2 = clock();
-//PRT( "calloc() time", clk2 - clk1 );
+//ABC_PRT( "calloc() time", clk2 - clk1 );
// set up the constant node (the only node that is not in the hash table)
dd->nSignCur = 1;
@@ -116,7 +116,7 @@ clk2 = clock();
dd->pNodeEnd = dd->tUnique + dd->nNodesAlloc;
// set up the elementary variables
- dd->vars = ALLOC( CloudNode *, dd->nVars );
+ dd->vars = ABC_ALLOC( CloudNode *, dd->nVars );
dd->nMemUsed += sizeof(CloudNode *) * dd->nVars;
for ( i = 0; i < dd->nVars; i++ )
dd->vars[i] = cloudMakeNode( dd, i, dd->one, dd->zero );
@@ -140,12 +140,12 @@ clk2 = clock();
void Cloud_Quit( CloudManager * dd )
{
int i;
- FREE( dd->ppNodes );
- free( dd->tUnique );
- free( dd->vars );
+ ABC_FREE( dd->ppNodes );
+ ABC_FREE( dd->tUnique );
+ ABC_FREE( dd->vars );
for ( i = 0; i < 4; i++ )
- FREE( dd->tCaches[i] );
- free( dd );
+ ABC_FREE( dd->tCaches[i] );
+ ABC_FREE( dd );
}
/**Function********************************************************************
@@ -218,17 +218,17 @@ void cloudCacheAllocate( CloudManager * dd, CloudOper oper )
if ( CacheSize[oper] == 1 )
{
- dd->tCaches[oper] = (CloudCacheEntry2 *)CALLOC( CloudCacheEntry1, nCacheEntries );
+ dd->tCaches[oper] = (CloudCacheEntry2 *)ABC_CALLOC( CloudCacheEntry1, nCacheEntries );
dd->nMemUsed += sizeof(CloudCacheEntry1) * nCacheEntries;
}
else if ( CacheSize[oper] == 2 )
{
- dd->tCaches[oper] = (CloudCacheEntry2 *)CALLOC( CloudCacheEntry2, nCacheEntries );
+ dd->tCaches[oper] = (CloudCacheEntry2 *)ABC_CALLOC( CloudCacheEntry2, nCacheEntries );
dd->nMemUsed += sizeof(CloudCacheEntry2) * nCacheEntries;
}
else if ( CacheSize[oper] == 3 )
{
- dd->tCaches[oper] = (CloudCacheEntry2 *)CALLOC( CloudCacheEntry3, nCacheEntries );
+ dd->tCaches[oper] = (CloudCacheEntry2 *)ABC_CALLOC( CloudCacheEntry3, nCacheEntries );
dd->nMemUsed += sizeof(CloudCacheEntry3) * nCacheEntries;
}
}
@@ -619,7 +619,7 @@ CloudNode * Cloud_Support( CloudManager * dd, CloudNode * n )
CLOUD_ASSERT(n);
// allocate and initialize support array for cloudSupport
- support = CALLOC( int, dd->nVars );
+ support = ABC_CALLOC( int, dd->nVars );
// compute support and clean up markers
cloudSupport( dd, Cloud_Regular(n), support );
@@ -634,7 +634,7 @@ CloudNode * Cloud_Support( CloudManager * dd, CloudNode * n )
if ( res == NULL )
break;
}
- FREE( support );
+ ABC_FREE( support );
return res;
}
@@ -658,7 +658,7 @@ int Cloud_SupportSize( CloudManager * dd, CloudNode * n )
CLOUD_ASSERT(n);
// allocate and initialize support array for cloudSupport
- support = CALLOC( int, dd->nVars );
+ support = ABC_CALLOC( int, dd->nVars );
// compute support and clean up markers
cloudSupport( dd, Cloud_Regular(n), support );
@@ -672,7 +672,7 @@ int Cloud_SupportSize( CloudManager * dd, CloudNode * n )
count++;
}
- FREE( support );
+ ABC_FREE( support );
return count;
}
@@ -769,7 +769,7 @@ int Cloud_DagCollect( CloudManager * dd, CloudNode * n )
{
int res, Counter = 0;
if ( dd->ppNodes == NULL )
- dd->ppNodes = ALLOC( CloudNode *, dd->nNodesLimit );
+ dd->ppNodes = ABC_ALLOC( CloudNode *, dd->nNodesLimit );
res = Cloud_DagCollect_rec( dd, Cloud_Regular( n ), &Counter );
cloudClearMark( dd, Cloud_Regular( n ) );
assert( res == Counter );
diff --git a/src/aig/kit/cloud.h b/src/aig/kit/cloud.h
index ec8e9059..6f6a1eae 100644
--- a/src/aig/kit/cloud.h
+++ b/src/aig/kit/cloud.h
@@ -19,15 +19,15 @@
#ifndef __CLOUD_H__
#define __CLOUD_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
-#include "port_type.h"
+#include "abc_global.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifdef _WIN32
#define inline __inline // compatible with MS VS 6.0
@@ -176,14 +176,14 @@ struct cloudCacheEntry3 // the three-argument cache
#define DD_P2 4256249
#define DD_P3 741457
#define DD_P4 1618033999
-#define cloudHashCudd2(f,g,s) ((((unsigned)(PORT_PTRUINT_T)(f) * DD_P1 + (unsigned)(PORT_PTRUINT_T)(g)) * DD_P2) >> (s))
-#define cloudHashCudd3(f,g,h,s) (((((unsigned)(PORT_PTRUINT_T)(f) * DD_P1 + (unsigned)(PORT_PTRUINT_T)(g)) * DD_P2 + (unsigned)(PORT_PTRUINT_T)(h)) * DD_P3) >> (s))
+#define cloudHashCudd2(f,g,s) ((((unsigned)(ABC_PTRUINT_T)(f) * DD_P1 + (unsigned)(ABC_PTRUINT_T)(g)) * DD_P2) >> (s))
+#define cloudHashCudd3(f,g,h,s) (((((unsigned)(ABC_PTRUINT_T)(f) * DD_P1 + (unsigned)(ABC_PTRUINT_T)(g)) * DD_P2 + (unsigned)(ABC_PTRUINT_T)(h)) * DD_P3) >> (s))
// node complementation (using node)
-#define Cloud_Regular(p) ((CloudNode*)(((PORT_PTRUINT_T)(p)) & ~01)) // get the regular node (w/o bubble)
-#define Cloud_Not(p) ((CloudNode*)(((PORT_PTRUINT_T)(p)) ^ 01)) // complement the node
-#define Cloud_NotCond(p,c) ((CloudNode*)(((PORT_PTRUINT_T)(p)) ^ (c))) // complement the node conditionally
-#define Cloud_IsComplement(p) ((int)(((PORT_PTRUINT_T)(p)) & 01)) // check if complemented
+#define Cloud_Regular(p) ((CloudNode*)(((ABC_PTRUINT_T)(p)) & ~01)) // get the regular node (w/o bubble)
+#define Cloud_Not(p) ((CloudNode*)(((ABC_PTRUINT_T)(p)) ^ 01)) // complement the node
+#define Cloud_NotCond(p,c) ((CloudNode*)(((ABC_PTRUINT_T)(p)) ^ (c))) // complement the node conditionally
+#define Cloud_IsComplement(p) ((int)(((ABC_PTRUINT_T)(p)) & 01)) // check if complemented
// checking constants (using node)
#define Cloud_IsConstant(p) (((Cloud_Regular(p))->v & CLOUD_MARK_OFF) == CLOUD_CONST_INDEX)
#define cloudIsConstant(p) (((p)->v & CLOUD_MARK_OFF) == CLOUD_CONST_INDEX)
@@ -213,23 +213,6 @@ struct cloudCacheEntry3 // the three-argument cache
//#define CLOUD_ASSERT(p) (assert((p) >= (dd->pNodeStart-1) && (p) < dd->pNodeEnd))
#define CLOUD_ASSERT(p) assert((p) >= dd->tUnique && (p) < dd->tUnique+dd->nNodesAlloc)
-// utility macros
-#ifndef ALLOC
-#define ALLOC(type, num) ((type *) malloc(sizeof(type) * (num)))
-#endif
-
-#ifndef CALLOC
-#define CALLOC(type, num) ((type *) calloc((num), sizeof(type)))
-#endif
-
-#ifndef FREE
-#define FREE(obj) ((obj) ? (free((char *) (obj)), (obj) = 0) : 0)
-#endif
-
-#ifndef PRT
-#define PRT(a,t) fprintf( stdout, "%s = ", (a)); printf( "%.2f sec\n", (float)(t)/(float)(CLOCKS_PER_SEC) )
-#endif
-
////////////////////////////////////////////////////////////////////////
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
diff --git a/src/aig/kit/kit.h b/src/aig/kit/kit.h
index e8dea11a..3b564da5 100644
--- a/src/aig/kit/kit.h
+++ b/src/aig/kit/kit.h
@@ -21,10 +21,6 @@
#ifndef __KIT_H__
#define __KIT_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -42,6 +38,10 @@ extern "C" {
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
+#ifdef __cplusplus
+extern "C" {
+#endif
+
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
////////////////////////////////////////////////////////////////////////
@@ -140,17 +140,6 @@ struct Kit_DsdMan_t_
Vec_Int_t * vNodes; // temporary array for BDD nodes
};
-#ifdef WIN32
-#define ABC_DLLEXPORT __declspec(dllexport)
-#define ABC_DLLIMPORT __declspec(dllimport)
-#else /* defined(WIN32) */
-#define ABC_DLLIMPORT
-#endif /* defined(WIN32) */
-
-#ifndef ABC_DLL
-#define ABC_DLL ABC_DLLIMPORT
-#endif
-
static inline int Kit_DsdVar2Lit( int Var, int fCompl ) { return Var + Var + fCompl; }
static inline int Kit_DsdLit2Var( int Lit ) { return Lit >> 1; }
static inline int Kit_DsdLitIsCompl( int Lit ) { return Lit & 1; }
@@ -186,20 +175,6 @@ static inline unsigned Kit_DsdLitSupport( Kit_DsdNtk_t * pNtk, int Lit )
#define KIT_MAX(a,b) (((a) > (b))? (a) : (b))
#define KIT_INFINITY (100000000)
-#ifndef ALLOC
-#define ALLOC(type, num) ((type *) malloc(sizeof(type) * (num)))
-#endif
-
-#ifndef FREE
-#define FREE(obj) ((obj) ? (free((char *) (obj)), (obj) = 0) : 0)
-#endif
-
-#ifndef REALLOC
-#define REALLOC(type, obj, num) \
- ((obj) ? ((type *) realloc((char *)(obj), sizeof(type) * (num))) : \
- ((type *) malloc(sizeof(type) * (num))))
-#endif
-
static inline int Kit_CubeHasLit( unsigned uCube, int i ) { return(uCube & (unsigned)(1<<i)) > 0; }
static inline unsigned Kit_CubeSetLit( unsigned uCube, int i ) { return uCube | (unsigned)(1<<i); }
static inline unsigned Kit_CubeXorLit( unsigned uCube, int i ) { return uCube ^ (unsigned)(1<<i); }
diff --git a/src/aig/kit/kitDsd.c b/src/aig/kit/kitDsd.c
index 75358093..c4ed70e4 100644
--- a/src/aig/kit/kitDsd.c
+++ b/src/aig/kit/kitDsd.c
@@ -42,7 +42,7 @@
Kit_DsdMan_t * Kit_DsdManAlloc( int nVars, int nNodes )
{
Kit_DsdMan_t * p;
- p = ALLOC( Kit_DsdMan_t, 1 );
+ p = ABC_ALLOC( Kit_DsdMan_t, 1 );
memset( p, 0, sizeof(Kit_DsdMan_t) );
p->nVars = nVars;
p->nWords = Kit_TruthWordNum( p->nVars );
@@ -72,7 +72,7 @@ void Kit_DsdManFree( Kit_DsdMan_t * p )
Vec_PtrFree( p->vTtBdds );
Vec_PtrFree( p->vTtElems );
Vec_PtrFree( p->vTtNodes );
- free( p );
+ ABC_FREE( p );
}
/**Function*************************************************************
@@ -90,7 +90,7 @@ Kit_DsdObj_t * Kit_DsdObjAlloc( Kit_DsdNtk_t * pNtk, Kit_Dsd_t Type, int nFans )
{
Kit_DsdObj_t * pObj;
int nSize = sizeof(Kit_DsdObj_t) + sizeof(unsigned) * (Kit_DsdObjOffset(nFans) + (Type == KIT_DSD_PRIME) * Kit_TruthWordNum(nFans));
- pObj = (Kit_DsdObj_t *)ALLOC( char, nSize );
+ pObj = (Kit_DsdObj_t *)ABC_ALLOC( char, nSize );
memset( pObj, 0, nSize );
pObj->Id = pNtk->nVars + pNtk->nNodes;
pObj->Type = Type;
@@ -100,7 +100,7 @@ Kit_DsdObj_t * Kit_DsdObjAlloc( Kit_DsdNtk_t * pNtk, Kit_Dsd_t Type, int nFans )
if ( pNtk->nNodes == pNtk->nNodesAlloc )
{
pNtk->nNodesAlloc *= 2;
- pNtk->pNodes = REALLOC( Kit_DsdObj_t *, pNtk->pNodes, pNtk->nNodesAlloc );
+ pNtk->pNodes = ABC_REALLOC( Kit_DsdObj_t *, pNtk->pNodes, pNtk->nNodesAlloc );
}
assert( pNtk->nNodes < pNtk->nNodesAlloc );
pNtk->pNodes[pNtk->nNodes++] = pObj;
@@ -120,7 +120,7 @@ Kit_DsdObj_t * Kit_DsdObjAlloc( Kit_DsdNtk_t * pNtk, Kit_Dsd_t Type, int nFans )
***********************************************************************/
void Kit_DsdObjFree( Kit_DsdNtk_t * p, Kit_DsdObj_t * pObj )
{
- free( pObj );
+ ABC_FREE( pObj );
}
/**Function*************************************************************
@@ -137,12 +137,12 @@ void Kit_DsdObjFree( Kit_DsdNtk_t * p, Kit_DsdObj_t * pObj )
Kit_DsdNtk_t * Kit_DsdNtkAlloc( int nVars )
{
Kit_DsdNtk_t * pNtk;
- pNtk = ALLOC( Kit_DsdNtk_t, 1 );
+ pNtk = ABC_ALLOC( Kit_DsdNtk_t, 1 );
memset( pNtk, 0, sizeof(Kit_DsdNtk_t) );
- pNtk->pNodes = ALLOC( Kit_DsdObj_t *, nVars+1 );
+ pNtk->pNodes = ABC_ALLOC( Kit_DsdObj_t *, nVars+1 );
pNtk->nVars = nVars;
pNtk->nNodesAlloc = nVars+1;
- pNtk->pMem = ALLOC( unsigned, 6 * Kit_TruthWordNum(nVars) );
+ pNtk->pMem = ABC_ALLOC( unsigned, 6 * Kit_TruthWordNum(nVars) );
return pNtk;
}
@@ -162,11 +162,11 @@ void Kit_DsdNtkFree( Kit_DsdNtk_t * pNtk )
Kit_DsdObj_t * pObj;
unsigned i;
Kit_DsdNtkForEachObj( pNtk, pObj, i )
- free( pObj );
- FREE( pNtk->pSupps );
- free( pNtk->pNodes );
- free( pNtk->pMem );
- free( pNtk );
+ ABC_FREE( pObj );
+ ABC_FREE( pNtk->pSupps );
+ ABC_FREE( pNtk->pNodes );
+ ABC_FREE( pNtk->pMem );
+ ABC_FREE( pNtk );
}
/**Function*************************************************************
@@ -1032,7 +1032,7 @@ unsigned Kit_DsdNonDsdSupports( Kit_DsdNtk_t * pNtk )
{
Kit_DsdObj_t * pObj;
unsigned i, uSupport = 0;
-// FREE( pNtk->pSupps );
+// ABC_FREE( pNtk->pSupps );
Kit_DsdGetSupports( pNtk );
Kit_DsdNtkForEachObj( pNtk, pObj, i )
{
@@ -1531,7 +1531,7 @@ unsigned Kit_DsdGetSupports( Kit_DsdNtk_t * p )
Kit_DsdObj_t * pRoot;
unsigned uSupport;
assert( p->pSupps == NULL );
- p->pSupps = ALLOC( unsigned, p->nNodes );
+ p->pSupps = ABC_ALLOC( unsigned, p->nNodes );
// consider simple special cases
pRoot = Kit_DsdNtkRoot(p);
if ( pRoot->Type == KIT_DSD_CONST1 )
@@ -2377,7 +2377,7 @@ int Kit_DsdCofactoring( unsigned * pTruth, int nVars, int * pCofVars, int nLimit
// allocate storage for cofactors
nMemSize = Kit_TruthWordNum(nVars);
- ppCofs[0][0] = ALLOC( unsigned, 80 * nMemSize );
+ ppCofs[0][0] = ABC_ALLOC( unsigned, 80 * nMemSize );
nSize = 0;
for ( i = 0; i < 5; i++ )
for ( k = 0; k < 16; k++ )
@@ -2422,7 +2422,7 @@ int Kit_DsdCofactoring( unsigned * pTruth, int nVars, int * pCofVars, int nLimit
// compute the sum total of supports
nSuppSizeMax += Kit_TruthSupportSize( ppCofs[nStep+1][2*i+0], nVars );
nSuppSizeMax += Kit_TruthSupportSize( ppCofs[nStep+1][2*i+1], nVars );
- // free the networks
+ // ABC_FREE the networks
Kit_DsdNtkFree( ppNtks[nStep+1][2*i+0] );
Kit_DsdNtkFree( ppNtks[nStep+1][2*i+1] );
}
@@ -2460,12 +2460,12 @@ int Kit_DsdCofactoring( unsigned * pTruth, int nVars, int * pCofVars, int nLimit
}
}
- // free the networks
+ // ABC_FREE the networks
for ( i = 0; i < 5; i++ )
for ( k = 0; k < 16; k++ )
if ( ppNtks[i][k] )
Kit_DsdNtkFree( ppNtks[i][k] );
- free( ppCofs[0][0] );
+ ABC_FREE( ppCofs[0][0] );
assert( nStep <= nLimit );
return nStep;
@@ -2502,7 +2502,7 @@ void Kit_DsdPrintCofactors( unsigned * pTruth, int nVars, int nCofLevel, int fVe
// allocate storage for cofactors
nMemSize = Kit_TruthWordNum(nVars);
- ppCofs[0][0] = ALLOC( unsigned, 80 * nMemSize );
+ ppCofs[0][0] = ABC_ALLOC( unsigned, 80 * nMemSize );
nSize = 0;
for ( i = 0; i < 5; i++ )
for ( k = 0; k < 16; k++ )
@@ -2713,7 +2713,7 @@ void Kit_DsdPrintCofactors( unsigned * pTruth, int nVars, int nCofLevel, int fVe
}
- free( ppCofs[0][0] );
+ ABC_FREE( ppCofs[0][0] );
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/aig/kit/kitFactor.c b/src/aig/kit/kitFactor.c
index f596d9a8..273d4821 100644
--- a/src/aig/kit/kitFactor.c
+++ b/src/aig/kit/kitFactor.c
@@ -123,7 +123,7 @@ Kit_Edge_t Kit_SopFactor_rec( Kit_Graph_t * pFForm, Kit_Sop_t * cSop, int nLits,
if ( Kit_SopCubeNum(cQuo) == 1 )
return Kit_SopFactorLF_rec( pFForm, cSop, cQuo, nLits, vMemory );
- // make the quotient cube free
+ // make the quotient cube ABC_FREE
Kit_SopMakeCubeFree( cQuo );
// divide the cover by the quotient
diff --git a/src/aig/kit/kitGraph.c b/src/aig/kit/kitGraph.c
index 80dcbdc0..565c000b 100644
--- a/src/aig/kit/kitGraph.c
+++ b/src/aig/kit/kitGraph.c
@@ -42,12 +42,12 @@
Kit_Graph_t * Kit_GraphCreate( int nLeaves )
{
Kit_Graph_t * pGraph;
- pGraph = ALLOC( Kit_Graph_t, 1 );
+ pGraph = ABC_ALLOC( Kit_Graph_t, 1 );
memset( pGraph, 0, sizeof(Kit_Graph_t) );
pGraph->nLeaves = nLeaves;
pGraph->nSize = nLeaves;
pGraph->nCap = 2 * nLeaves + 50;
- pGraph->pNodes = ALLOC( Kit_Node_t, pGraph->nCap );
+ pGraph->pNodes = ABC_ALLOC( Kit_Node_t, pGraph->nCap );
memset( pGraph->pNodes, 0, sizeof(Kit_Node_t) * pGraph->nSize );
return pGraph;
}
@@ -66,7 +66,7 @@ Kit_Graph_t * Kit_GraphCreate( int nLeaves )
Kit_Graph_t * Kit_GraphCreateConst0()
{
Kit_Graph_t * pGraph;
- pGraph = ALLOC( Kit_Graph_t, 1 );
+ pGraph = ABC_ALLOC( Kit_Graph_t, 1 );
memset( pGraph, 0, sizeof(Kit_Graph_t) );
pGraph->fConst = 1;
pGraph->eRoot.fCompl = 1;
@@ -87,7 +87,7 @@ Kit_Graph_t * Kit_GraphCreateConst0()
Kit_Graph_t * Kit_GraphCreateConst1()
{
Kit_Graph_t * pGraph;
- pGraph = ALLOC( Kit_Graph_t, 1 );
+ pGraph = ABC_ALLOC( Kit_Graph_t, 1 );
memset( pGraph, 0, sizeof(Kit_Graph_t) );
pGraph->fConst = 1;
return pGraph;
@@ -127,8 +127,8 @@ Kit_Graph_t * Kit_GraphCreateLeaf( int iLeaf, int nLeaves, int fCompl )
***********************************************************************/
void Kit_GraphFree( Kit_Graph_t * pGraph )
{
- FREE( pGraph->pNodes );
- free( pGraph );
+ ABC_FREE( pGraph->pNodes );
+ ABC_FREE( pGraph );
}
/**Function*************************************************************
@@ -147,7 +147,7 @@ Kit_Node_t * Kit_GraphAppendNode( Kit_Graph_t * pGraph )
Kit_Node_t * pNode;
if ( pGraph->nSize == pGraph->nCap )
{
- pGraph->pNodes = REALLOC( Kit_Node_t, pGraph->pNodes, 2 * pGraph->nCap );
+ pGraph->pNodes = ABC_REALLOC( Kit_Node_t, pGraph->pNodes, 2 * pGraph->nCap );
pGraph->nCap = 2 * pGraph->nCap;
}
pNode = pGraph->pNodes + pGraph->nSize++;
diff --git a/src/aig/kit/kitSop.c b/src/aig/kit/kitSop.c
index 8e175dac..0d1b9e2c 100644
--- a/src/aig/kit/kitSop.c
+++ b/src/aig/kit/kitSop.c
@@ -296,7 +296,7 @@ static inline unsigned Kit_SopCommonCube( Kit_Sop_t * cSop )
/**Function*************************************************************
- Synopsis [Makes the cover cube-free.]
+ Synopsis [Makes the cover cube-ABC_FREE.]
Description []
@@ -319,7 +319,7 @@ void Kit_SopMakeCubeFree( Kit_Sop_t * cSop )
/**Function*************************************************************
- Synopsis [Checks if the cover is cube-free.]
+ Synopsis [Checks if the cover is cube-ABC_FREE.]
Description []
@@ -510,7 +510,7 @@ void Kit_SopDivisorZeroKernel_rec( Kit_Sop_t * cSop, int nLits )
iLit = Kit_SopWorstLiteral( cSop, nLits );
if ( iLit == -1 )
return;
- // derive the cube-free quotient
+ // derive the cube-ABC_FREE quotient
Kit_SopDivideByLiteralQuo( cSop, iLit ); // the same cover
Kit_SopMakeCubeFree( cSop ); // the same cover
// call recursively