56 memset(
p->pMapInv, 0,
sizeof(
unsigned short) * 222 );
57 p->vClasses = Vec_VecStart( 222 );
58 for ( i = 0; i <
p->nFuncs; i++ )
60 if (
p->pTable[i] == NULL )
63 for ( pNode =
p->pTable[i]; pNode; pNode = pNode->
pNext )
67 Vec_VecPush(
p->vClasses,
p->pMap[pNode->
uTruth], pNode );
74 pGraph = Rwr_NodePreprocess(
p, pNode );
95 assert( !Rwr_IsComplement(pNode) );
98 return Dec_GraphCreateConst0();
100 if ( pNode->
uTruth == 0x00FF )
101 return Dec_GraphCreateLeaf( 3, 4, 1 );
103 pGraph = Dec_GraphCreate( 4 );
106 eRoot = Rwr_TravCollect_rec(
p, pNode, pGraph );
107 Dec_GraphSetRoot( pGraph, eRoot );
127 return Dec_EdgeCreate( pNode->
Id - 1, 0 );
129 if ( pNode->
TravId ==
p->nTravIds )
130 return Dec_IntToEdge( pNode->
Volume );
133 eNode0 = Rwr_TravCollect_rec(
p, Rwr_Regular(pNode->
p0), pGraph );
134 if ( Rwr_IsComplement(pNode->
p0) )
135 eNode0.fCompl = !eNode0.fCompl;
136 eNode1 = Rwr_TravCollect_rec(
p, Rwr_Regular(pNode->
p1), pGraph );
137 if ( Rwr_IsComplement(pNode->
p1) )
138 eNode1.fCompl = !eNode1.fCompl;
141 eNode = Dec_GraphAddNodeXor( pGraph, eNode0, eNode1, 0 );
143 eNode = Dec_GraphAddNodeAnd( pGraph, eNode0, eNode1 );
145 pNode->
Volume = Dec_EdgeToInt( eNode );
#define ABC_ALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
unsigned Dec_GraphDeriveTruth(Dec_Graph_t *pGraph)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Dec_Edge_t_ Dec_Edge_t
INCLUDES ///.
struct Dec_Graph_t_ Dec_Graph_t
void Rwr_ManPreprocess(Rwr_Man_t *p)
FUNCTION DEFINITIONS ///.
struct Rwr_Man_t_ Rwr_Man_t
struct Rwr_Node_t_ Rwr_Node_t
void Rwr_ManIncTravId(Rwr_Man_t *p)
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)