cudd/cuddCof.c File Reference

Cofactoring functions. More...

#include "util.h"
#include "cuddInt.h"
Include dependency graph for cuddCof.c:

Functions

DdNodeCudd_Cofactor (DdManager *dd, DdNode *f, DdNode *g)
 Computes the cofactor of f with respect to g.
int Cudd_CheckCube (DdManager *dd, DdNode *g)
 Checks whether g is the BDD of a cube.
int Cudd_VarsAreSymmetric (DdManager *dd, DdNode *f, int index1, int index2)
 Checks whether two variables are symmetric in a BDD.
void cuddGetBranches (DdNode *g, DdNode **g1, DdNode **g0)
 Computes the children of g.
DdNodecuddCofactorRecur (DdManager *dd, DdNode *f, DdNode *g)
 Performs the recursive step of Cudd_Cofactor.
static int ddVarsAreSymmetricBefore (DdManager *dd, DdNode *f, DdNode *var1, DdNode *var2)
 Implements the upper recursive step of Cudd_VarsAreSymmetric().
static int ddVarsAreSymmetricBetween (DdManager *dd, DdNode *f1, DdNode *f0, DdNode *var2)
 Implements the lower recursive step of Cudd_VarsAreSymmetric().

Detailed Description

Cofactoring functions.

Author:
Fabio Somenzi

Copyright (c) 1995-2015, Regents of the University of Colorado

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Function Documentation

int Cudd_CheckCube ( DdManager dd,
DdNode g 
)

Checks whether g is the BDD of a cube.

The constant 1 is a valid cube, but all other constant functions cause cuddCheckCube to return 0.

Returns:
1 in case of success; 0 otherwise.
Side effects
None
DdNode* Cudd_Cofactor ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the cofactor of f with respect to g.

g must be the BDD or the ADD of a cube.

Returns:
a pointer to the cofactor if successful; NULL otherwise.
Side effects
None
See also:
Cudd_bddConstrain Cudd_bddRestrict
int Cudd_VarsAreSymmetric ( DdManager dd,
DdNode f,
int  index1,
int  index2 
)

Checks whether two variables are symmetric in a BDD.

Returns:
1 if the variables are symmetric; 0 if they are not.

No nodes are built during the check.

Side effects
None
Parameters:
dd manager
f BDD whose variables are tested
index1 index of first variable
index2 index of second variable
DdNode* cuddCofactorRecur ( DdManager dd,
DdNode f,
DdNode g 
)

Performs the recursive step of Cudd_Cofactor.

Returns:
a pointer to the cofactor if successful; NULL otherwise.
Side effects
None
See also:
Cudd_Cofactor
void cuddGetBranches ( DdNode g,
DdNode **  g1,
DdNode **  g0 
)

Computes the children of g.

Side effects
None
static int ddVarsAreSymmetricBefore ( DdManager dd,
DdNode f,
DdNode var1,
DdNode var2 
) [static]

Implements the upper recursive step of Cudd_VarsAreSymmetric().

The assumption is made that the level of index1 is less than the level of index2.

Returns:
1 if the variables are symmetric for the given function; 0 if they are not.
See also:
Cudd_VarsAreSymmetric ddVarsAreSymmetricBetween
static int ddVarsAreSymmetricBetween ( DdManager dd,
DdNode f1,
DdNode f0,
DdNode var2 
) [static]

Implements the lower recursive step of Cudd_VarsAreSymmetric().

Returns:
1 if the negative cofactor of the first argument w.r.t. the variable currently at level2 is the same as the positive cofactor of the second argument; 0 if the two cofactors are not the same.
See also:
Cudd_VarsAreSymmetric ddVarsAreSymmetricBefore
 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated on 31 Dec 2015 for cudd by  doxygen 1.6.1