cudd/cuddBddIte.c File Reference

BDD ITE function and satellites. More...

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

Functions

DdNodeCudd_bddIte (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements ITE(f,g,h).
DdNodeCudd_bddIteLimit (DdManager *dd, DdNode *f, DdNode *g, DdNode *h, unsigned int limit)
 Implements ITE(f,g,h) unless too many nodes are required.
DdNodeCudd_bddIteConstant (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements ITEconstant(f,g,h).
DdNodeCudd_bddIntersect (DdManager *dd, DdNode *f, DdNode *g)
 Returns a function included in the intersection of f and g.
DdNodeCudd_bddAnd (DdManager *dd, DdNode *f, DdNode *g)
 Computes the conjunction of two BDDs f and g.
DdNodeCudd_bddAndLimit (DdManager *dd, DdNode *f, DdNode *g, unsigned int limit)
 Computes the conjunction of two BDDs f and g unless too many nodes are required.
DdNodeCudd_bddOr (DdManager *dd, DdNode *f, DdNode *g)
 Computes the disjunction of two BDDs f and g.
DdNodeCudd_bddOrLimit (DdManager *dd, DdNode *f, DdNode *g, unsigned int limit)
 Computes the disjunction of two BDDs f and g unless too many nodes are required.
DdNodeCudd_bddNand (DdManager *dd, DdNode *f, DdNode *g)
 Computes the NAND of two BDDs f and g.
DdNodeCudd_bddNor (DdManager *dd, DdNode *f, DdNode *g)
 Computes the NOR of two BDDs f and g.
DdNodeCudd_bddXor (DdManager *dd, DdNode *f, DdNode *g)
 Computes the exclusive OR of two BDDs f and g.
DdNodeCudd_bddXnor (DdManager *dd, DdNode *f, DdNode *g)
 Computes the exclusive NOR of two BDDs f and g.
DdNodeCudd_bddXnorLimit (DdManager *dd, DdNode *f, DdNode *g, unsigned int limit)
 Computes the exclusive NOR of two BDDs f and g unless too many nodes are required.
int Cudd_bddLeq (DdManager *dd, DdNode *f, DdNode *g)
 Checks whether f is less than or equal to g.
DdNodecuddBddIteRecur (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements the recursive step of Cudd_bddIte.
DdNodecuddBddIntersectRecur (DdManager *dd, DdNode *f, DdNode *g)
 Implements the recursive step of Cudd_bddIntersect.
DdNodecuddBddAndRecur (DdManager *manager, DdNode *f, DdNode *g)
 Implements the recursive step of Cudd_bddAnd.
DdNodecuddBddXorRecur (DdManager *manager, DdNode *f, DdNode *g)
 Implements the recursive step of Cudd_bddXor.
static void bddVarToConst (DdNode *f, DdNode **gp, DdNode **hp, DdNode *one)
 Replaces variables with constants if possible.
static int bddVarToCanonical (DdManager *dd, DdNode **fp, DdNode **gp, DdNode **hp, int *topfp, int *topgp, int *tophp)
 Picks unique member from equiv expressions.
static int bddVarToCanonicalSimple (DdManager *dd, DdNode **fp, DdNode **gp, DdNode **hp, int *topfp, int *topgp, int *tophp)
 Picks unique member from equiv expressions.

Detailed Description

BDD ITE function and satellites.

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

static int bddVarToCanonical ( DdManager dd,
DdNode **  fp,
DdNode **  gp,
DdNode **  hp,
int *  topfp,
int *  topgp,
int *  tophp 
) [static]

Picks unique member from equiv expressions.

Reduces 2 variable expressions to canonical form.

Side effects
None
See also:
bddVarToConst bddVarToCanonicalSimple
static int bddVarToCanonicalSimple ( DdManager dd,
DdNode **  fp,
DdNode **  gp,
DdNode **  hp,
int *  topfp,
int *  topgp,
int *  tophp 
) [static]

Picks unique member from equiv expressions.

Makes sure the first two pointers are regular. This mat require the complementation of the result, which is signaled by returning 1 instead of 0. This function is simpler than the general case because it assumes that no two arguments are the same or complementary, and no argument is constant.

Side effects
None
See also:
bddVarToConst bddVarToCanonical
static void bddVarToConst ( DdNode f,
DdNode **  gp,
DdNode **  hp,
DdNode one 
) [static]

Replaces variables with constants if possible.

This function performs part of the transformation to standard form by replacing variables with constants if possible.

Side effects
None
See also:
bddVarToCanonical bddVarToCanonicalSimple
DdNode* Cudd_bddAnd ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the conjunction of two BDDs f and g.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up.
Side effects
None
See also:
Cudd_bddIte Cudd_addApply Cudd_bddAndAbstract Cudd_bddIntersect Cudd_bddOr Cudd_bddNand Cudd_bddNor Cudd_bddXor Cudd_bddXnor
Parameters:
dd manager
f first operand
g second operand
DdNode* Cudd_bddAndLimit ( DdManager dd,
DdNode f,
DdNode g,
unsigned int  limit 
)

Computes the conjunction of two BDDs f and g unless too many nodes are required.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up or more new nodes than `limit` are required.
Side effects
None
See also:
Cudd_bddAnd
Parameters:
dd manager
f first operand
g second operand
limit maximum number of new nodes
DdNode* Cudd_bddIntersect ( DdManager dd,
DdNode f,
DdNode g 
)

Returns a function included in the intersection of f and g.

The function computed (if not zero) is a witness that the intersection is not empty. Cudd_bddIntersect tries to build as few new nodes as possible. If the only result of interest is whether f and g intersect, Cudd_bddLeq should be used instead.

Side effects
None
See also:
Cudd_bddLeq Cudd_bddIteConstant
Parameters:
dd manager
f first operand
g second operand
DdNode* Cudd_bddIte ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Implements ITE(f,g,h).

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up.
Side effects
None
See also:
Cudd_addIte Cudd_bddIteConstant Cudd_bddIntersect
Parameters:
dd manager
f first operand
g second operand
h third operand
DdNode* Cudd_bddIteConstant ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Implements ITEconstant(f,g,h).

Returns:
a pointer to the resulting BDD (which may or may not be constant) or DD_NON_CONSTANT.

No new nodes are created.

Side effects
None
See also:
Cudd_bddIte Cudd_bddIntersect Cudd_bddLeq Cudd_addIteConstant
Parameters:
dd manager
f first operand
g second operand
h thord operand
DdNode* Cudd_bddIteLimit ( DdManager dd,
DdNode f,
DdNode g,
DdNode h,
unsigned int  limit 
)

Implements ITE(f,g,h) unless too many nodes are required.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up or more new nodes than `limit` are required.
Side effects
None
See also:
Cudd_bddIte
Parameters:
dd manager
f first operand
g second operand
h third operand
limit maximum number of new nodes
int Cudd_bddLeq ( DdManager dd,
DdNode f,
DdNode g 
)

Checks whether f is less than or equal to g.

Returns:
1 if f is less than or equal to g; 0 otherwise.

No new nodes are created.

Side effects
None
See also:
Cudd_bddIteConstant Cudd_addEvalConst
Parameters:
dd manager
f first operand
g second operand
DdNode* Cudd_bddNand ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the NAND of two BDDs f and g.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up.
Side effects
None
See also:
Cudd_bddIte Cudd_addApply Cudd_bddAnd Cudd_bddOr Cudd_bddNor Cudd_bddXor Cudd_bddXnor
Parameters:
dd manager
f first operand
g second operand
DdNode* Cudd_bddNor ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the NOR of two BDDs f and g.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up.
Side effects
None
See also:
Cudd_bddIte Cudd_addApply Cudd_bddAnd Cudd_bddOr Cudd_bddNand Cudd_bddXor Cudd_bddXnor
Parameters:
dd manager
f first operand
g second operand
DdNode* Cudd_bddOr ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the disjunction of two BDDs f and g.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up.
Side effects
None
See also:
Cudd_bddIte Cudd_addApply Cudd_bddAnd Cudd_bddNand Cudd_bddNor Cudd_bddXor Cudd_bddXnor
Parameters:
dd manager
f first operand
g second operand
DdNode* Cudd_bddOrLimit ( DdManager dd,
DdNode f,
DdNode g,
unsigned int  limit 
)

Computes the disjunction of two BDDs f and g unless too many nodes are required.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up or more new nodes than `limit` are required.
Side effects
None
See also:
Cudd_bddOr
Parameters:
dd manager
f first operand
g second operand
limit maximum number of new nodes
DdNode* Cudd_bddXnor ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the exclusive NOR of two BDDs f and g.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up.
Side effects
None
See also:
Cudd_bddIte Cudd_addApply Cudd_bddAnd Cudd_bddOr Cudd_bddNand Cudd_bddNor Cudd_bddXor
Parameters:
dd manager
f first operand
g second operand
DdNode* Cudd_bddXnorLimit ( DdManager dd,
DdNode f,
DdNode g,
unsigned int  limit 
)

Computes the exclusive NOR of two BDDs f and g unless too many nodes are required.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up or more new nodes than `limit` are required.
Side effects
None
See also:
Cudd_bddXnor
Parameters:
dd manager
f first operand
g second operand
limit maximum number of new nodes
DdNode* Cudd_bddXor ( DdManager dd,
DdNode f,
DdNode g 
)

Computes the exclusive OR of two BDDs f and g.

Returns:
a pointer to the resulting BDD if successful; NULL if the intermediate result blows up.
Side effects
None
See also:
Cudd_bddIte Cudd_addApply Cudd_bddAnd Cudd_bddOr Cudd_bddNand Cudd_bddNor Cudd_bddXnor
Parameters:
dd manager
f first operand
g second operand
DdNode* cuddBddAndRecur ( DdManager manager,
DdNode f,
DdNode g 
)

Implements the recursive step of Cudd_bddAnd.

Takes the conjunction of two BDDs.

Returns:
a pointer to the result is successful; NULL otherwise.
Side effects
None
See also:
Cudd_bddAnd
DdNode* cuddBddIntersectRecur ( DdManager dd,
DdNode f,
DdNode g 
)

Implements the recursive step of Cudd_bddIntersect.

Side effects
None
See also:
Cudd_bddIntersect
DdNode* cuddBddIteRecur ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Implements the recursive step of Cudd_bddIte.

Returns:
a pointer to the resulting BDD. NULL if the intermediate result blows up or if reordering occurs.
Side effects
None
DdNode* cuddBddXorRecur ( DdManager manager,
DdNode f,
DdNode g 
)

Implements the recursive step of Cudd_bddXor.

Takes the exclusive OR of two BDDs.

Returns:
a pointer to the result is successful; NULL otherwise.
Side effects
None
See also:
Cudd_bddXor
 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated on 31 Dec 2015 for cudd by  doxygen 1.6.1