abc/src/map/mapper/mapperUtils.c
/**Function*************************************************************

  Synopsis    [Verify one useful property.]

  Description [This procedure verifies one useful property. After 
  the FRAIG construction with choice nodes is over, each primary node 
  should have fanins that are primary nodes. The primary nodes is the 
  one that does not have pNode->pRepr set to point to another node.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Verify one useful property.]

Description [This procedure verifies one useful property. After
the FRAIG construction with choice nodes is over, each primary node
should have fanins that are primary nodes. The primary nodes is the
one that does not have pNode->pRepr set to point to another node.]




Function Synopsis [ Verify one useful property . ] Description [ This procedure verifies one useful property . After the FRAIG construction with choice nodes is over each primary node should have fanins that are primary nodes . The primary nodes is the one that does not have pNode - > pRepr set to point to another node . ]
int Map_ManCheckConsistency( Map_Man_t * p )
{
    Map_Node_t * pNode;
    Map_NodeVec_t * pVec;
    int i;
    pVec = Map_MappingDfs( p, 0 );
    for ( i = 0; i < pVec->nSize; i++ )
    {
        pNode = pVec->pArray[i];
        if ( Map_NodeIsVar(pNode) )
        {
            if ( pNode->pRepr )
                printf( "Primary input %d is a secondary node.\n", pNode->Num );
        }
        else if ( Map_NodeIsConst(pNode) )
        {
            if ( pNode->pRepr )
                printf( "Constant 1 %d is a secondary node.\n", pNode->Num );
        }
        else
        {
            if ( pNode->pRepr )
                printf( "Internal node %d is a secondary node.\n", pNode->Num );
            if ( Map_Regular(pNode->p1)->pRepr )
                printf( "Internal node %d has first fanin that is a secondary node.\n", pNode->Num );
            if ( Map_Regular(pNode->p2)->pRepr )
                printf( "Internal node %d has second fanin that is a secondary node.\n", pNode->Num );
        }
    }
    Map_NodeVecFree( pVec );
    return 1;
}
int Map_ManCheckConsistency ( Map_Man_t * p ) { Map_Node_t * pNode ; Map_NodeVec_t * pVec ; int i ; pVec = Map_MappingDfs ( p , 0 ) ; for ( i = 0 ; i < pVec -> nSize ; i ++ ) { pNode = pVec -> pArray [ i ] ; if ( Map_NodeIsVar ( pNode ) ) { if ( pNode -> pRepr ) printf ( " \n " , pNode -> Num ) ; } else if ( Map_NodeIsConst ( pNode ) ) { if ( pNode -> pRepr ) printf ( " \n " , pNode -> Num ) ; } else { if ( pNode -> pRepr ) printf ( " \n " , pNode -> Num ) ; if ( Map_Regular ( pNode -> p1 ) -> pRepr ) printf ( " \n " , pNode -> Num ) ; if ( Map_Regular ( pNode -> p2 ) -> pRepr ) printf ( " \n " , pNode -> Num ) ; } } Map_NodeVecFree ( pVec ) ; return 1 ; }
Function
Synopsis    [Verify one useful property.]
Function Synopsis [ Verify one useful property . ]