abc/src/bdd/cudd/cuddTable.c
/**Function********************************************************************

  Synopsis [Wrapper for cuddUniqueInterZdd that is independent of variable
  ordering.]

  Description [Wrapper for cuddUniqueInterZdd that is independent of
  variable ordering (IVO). This function does not require parameter
  index to precede the indices of the top nodes of g and h in the
  variable order.  Returns a pointer to the result node under normal
  conditions; NULL if reordering occurred or memory was exhausted.]

  SideEffects [None]

  SeeAlso     [cuddZddGetNode cuddZddIsop]

******************************************************************************/
Function
Synopsis [Wrapper for cuddUniqueInterZdd that is independent of variable
ordering.]

Description [Wrapper for cuddUniqueInterZdd that is independent of
variable ordering (IVO). This function does not require parameter
index to precede the indices of the top nodes of g and h in the
variable order.  Returns a pointer to the result node under normal
conditions; NULL if reordering occurred or memory was exhausted.]




Function Synopsis [ Wrapper for cuddUniqueInterZdd that is independent of variable ordering . ] Description [ Wrapper for cuddUniqueInterZdd that is independent of variable ordering ( IVO ) . This function does not require parameter index to precede the indices of the top nodes of g and h in the variable order . Returns a pointer to the result node under normal conditions ; NULL if reordering occurred or memory was exhausted . ]
DdNode *
cuddZddGetNodeIVO(
  DdManager * dd,
  int  index,
  DdNode * g,
  DdNode * h)
{
    DdNode      *f, *r, *t;
    DdNode      *zdd_one = DD_ONE(dd);
    DdNode      *zdd_zero = DD_ZERO(dd);
    f = cuddUniqueInterZdd(dd, index, zdd_one, zdd_zero);
    if (f == NULL) {
        return(NULL);
    }
    cuddRef(f);
    t = cuddZddProduct(dd, f, g);
    if (t == NULL) {
        Cudd_RecursiveDerefZdd(dd, f);
        return(NULL);
    }
    cuddRef(t);
    Cudd_RecursiveDerefZdd(dd, f);
    r = cuddZddUnion(dd, t, h);
    if (r == NULL) {
        Cudd_RecursiveDerefZdd(dd, t);
        return(NULL);
    }
    cuddRef(r);
    Cudd_RecursiveDerefZdd(dd, t);
    cuddDeref(r);
    return(r);
}
DdNode * cuddZddGetNodeIVO ( DdManager * dd , int index , DdNode * g , DdNode * h ) { DdNode * f , * r , * t ; DdNode * zdd_one = DD_ONE ( dd ) ; DdNode * zdd_zero = DD_ZERO ( dd ) ; f = cuddUniqueInterZdd ( dd , index , zdd_one , zdd_zero ) ; if ( f == NULL ) { return ( NULL ) ; } cuddRef ( f ) ; t = cuddZddProduct ( dd , f , g ) ; if ( t == NULL ) { Cudd_RecursiveDerefZdd ( dd , f ) ; return ( NULL ) ; } cuddRef ( t ) ; Cudd_RecursiveDerefZdd ( dd , f ) ; r = cuddZddUnion ( dd , t , h ) ; if ( r == NULL ) { Cudd_RecursiveDerefZdd ( dd , t ) ; return ( NULL ) ; } cuddRef ( r ) ; Cudd_RecursiveDerefZdd ( dd , t ) ; cuddDeref ( r ) ; return ( r ) ; }
Function
Synopsis [Wrapper for cuddUniqueInterZdd that is independent of variable
ordering.]
Function Synopsis [ Wrapper for cuddUniqueInterZdd that is independent of variable ordering . ]