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

  Synopsis    [Computes an ISOP in ZDD form from BDDs.]

  Description [Computes an irredundant sum of products (ISOP) in ZDD
  form from BDDs. The two BDDs L and U represent the lower bound and
  the upper bound, respectively, of the function. The ISOP uses two
  ZDD variables for each BDD variable: One for the positive literal,
  and one for the negative literal. These two variables should be
  adjacent in the ZDD order. The two ZDD variables corresponding to
  BDD variable <code>i</code> should have indices <code>2i</code> and
  <code>2i+1</code>.  The result of this procedure depends on the
  variable order. If successful, Cudd_zddIsop returns the BDD for
  the function chosen from the interval. The ZDD representing the
  irredundant cover is returned as a side effect in zdd_I. In case of
  failure, NULL is returned.]

  SideEffects [zdd_I holds the pointer to the ZDD for the ISOP on
  successful return.]

  SeeAlso     [Cudd_bddIsop Cudd_zddVarsFromBddVars]

******************************************************************************/
Function
Synopsis    [Computes an ISOP in ZDD form from BDDs.]

Description [Computes an irredundant sum of products (ISOP) in ZDD
form from BDDs. The two BDDs L and U represent the lower bound and
the upper bound, respectively, of the function. The ISOP uses two
ZDD variables for each BDD variable: One for the positive literal,
and one for the negative literal. These two variables should be
adjacent in the ZDD order. The two ZDD variables corresponding to
BDD variable i should have indices 2i and
2i+1.  The result of this procedure depends on the
variable order. If successful, Cudd_zddIsop returns the BDD for
the function chosen from the interval. The ZDD representing the
irredundant cover is returned as a side effect in zdd_I. In case of
failure, NULL is returned.]

SideEffects [zdd_I holds the pointer to the ZDD for the ISOP on
successful return.]


Function Synopsis [ Computes an ISOP in ZDD form from BDDs . ] Description [ Computes an irredundant sum of products ( ISOP ) in ZDD form from BDDs . The two BDDs L and U represent the lower bound and the upper bound respectively of the function . The ISOP uses two ZDD variables for each BDD variable : One for the positive literal and one for the negative literal . These two variables should be adjacent in the ZDD order . The two ZDD variables corresponding to BDD variable i should have indices 2i and 2i + 1 . The result of this procedure depends on the variable order . If successful Cudd_zddIsop returns the BDD for the function chosen from the interval . The ZDD representing the irredundant cover is returned as a side effect in zdd_I . In case of failure NULL is returned . ] SideEffects [ zdd_I holds the pointer to the ZDD for the ISOP on successful return . ]
DdNode  *
Cudd_zddIsop(
  DdManager * dd,
  DdNode * L,
  DdNode * U,
  DdNode ** zdd_I)
{
    DdNode      *res;
    int         autoDynZ;
    autoDynZ = dd->autoDynZ;
    dd->autoDynZ = 0;
    do {
        dd->reordered = 0;
        res = cuddZddIsop(dd, L, U, zdd_I);
    } while (dd->reordered == 1);
    dd->autoDynZ = autoDynZ;
    return(res);
}
DdNode * Cudd_zddIsop ( DdManager * dd , DdNode * L , DdNode * U , DdNode * * zdd_I ) { DdNode * res ; int autoDynZ ; autoDynZ = dd -> autoDynZ ; dd -> autoDynZ = 0 ; do { dd -> reordered = 0 ; res = cuddZddIsop ( dd , L , U , zdd_I ) ; } while ( dd -> reordered == 1 ) ; dd -> autoDynZ = autoDynZ ; return ( res ) ; }
Function
Synopsis    [Computes an ISOP in ZDD form from BDDs.]
Function Synopsis [ Computes an ISOP in ZDD form from BDDs . ]