abc/src/base/abci/abcReconv.c
/**Function*************************************************************

  Synopsis    [Evaluate the cost of removing the node from the set of leaves.]

  Description [Returns the number of new leaves that will be brought in.
  Returns large number if the node cannot be removed from the set of leaves.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Evaluate the cost of removing the node from the set of leaves.]

Description [Returns the number of new leaves that will be brought in.
Returns large number if the node cannot be removed from the set of leaves.]




Function Synopsis [ Evaluate the cost of removing the node from the set of leaves . ] Description [ Returns the number of new leaves that will be brought in . Returns large number if the node cannot be removed from the set of leaves . ]
static inline int Abc_NodeGetLeafCostOne( Abc_Obj_t * pNode, int nFaninLimit )
{
    int Cost;
    assert( pNode->fMarkB == 1 );  
    if ( Abc_ObjIsCi(pNode) )
        return 999;
    Cost = (!Abc_ObjFanin0(pNode)->fMarkB) + (!Abc_ObjFanin1(pNode)->fMarkB);
    if ( Cost < 2 )
        return Cost;
    if ( Abc_ObjFanoutNum(pNode) > nFaninLimit )
        return 999;
    return Cost;
}
static inline int Abc_NodeGetLeafCostOne ( Abc_Obj_t * pNode , int nFaninLimit ) { int Cost ; assert ( pNode -> fMarkB == 1 ) ; if ( Abc_ObjIsCi ( pNode ) ) return 999 ; Cost = ( ! Abc_ObjFanin0 ( pNode ) -> fMarkB ) + ( ! Abc_ObjFanin1 ( pNode ) -> fMarkB ) ; if ( Cost < 2 ) return Cost ; if ( Abc_ObjFanoutNum ( pNode ) > nFaninLimit ) return 999 ; return Cost ; }
Function
Synopsis    [Evaluate the cost of removing the node from the set of leaves.]
Function Synopsis [ Evaluate the cost of removing the node from the set of leaves . ]
// make sure the node is in the construction zone // cannot expand over the PI node // get the cost of the cone // always accept if the number of leaves does not increase // skip nodes with many fanouts // return the number of nodes that will be on the leaves if this node is removed