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

  Synopsis    [Returns a new ADD variable.]

  Description [Creates a new ADD variable.  The new variable has an
  index equal to the largest previous index plus 1.  Returns a
  pointer to the new variable if successful; NULL otherwise.
  An ADD variable differs from a BDD variable because it points to the
  arithmetic zero, instead of having a complement pointer to 1. ]

  SideEffects [None]

  SeeAlso     [Cudd_bddNewVar Cudd_addIthVar Cudd_addConst
  Cudd_addNewVarAtLevel]

******************************************************************************/
Function
Synopsis    [Returns a new ADD variable.]

Description [Creates a new ADD variable.  The new variable has an
index equal to the largest previous index plus 1.  Returns a
pointer to the new variable if successful; NULL otherwise.
An ADD variable differs from a BDD variable because it points to the
arithmetic zero, instead of having a complement pointer to 1.




Function Synopsis [ Returns a new ADD variable . ] Description [ Creates a new ADD variable . The new variable has an index equal to the largest previous index plus 1 . Returns a pointer to the new variable if successful ; NULL otherwise . An ADD variable differs from a BDD variable because it points to the arithmetic zero instead of having a complement pointer to 1 .
DdNode *
Cudd_addNewVar(
  DdManager * dd)
{
    DdNode *res;
    if ((unsigned int) dd->size >= CUDD_MAXINDEX - 1) return(NULL);
    do {
        dd->reordered = 0;
        res = cuddUniqueInter(dd,dd->size,DD_ONE(dd),DD_ZERO(dd));
    } while (dd->reordered == 1);
    return(res);
}
DdNode * Cudd_addNewVar ( DdManager * dd ) { DdNode * res ; if ( ( unsigned int ) dd -> size >= CUDD_MAXINDEX - 1 ) return ( NULL ) ; do { dd -> reordered = 0 ; res = cuddUniqueInter ( dd , dd -> size , DD_ONE ( dd ) , DD_ZERO ( dd ) ) ; } while ( dd -> reordered == 1 ) ; return ( res ) ; }
Function
Synopsis    [Returns a new ADD variable.]
Function Synopsis [ Returns a new ADD variable . ]