cudd/cuddBridge.c File Reference

Translation from BDD to ADD and vice versa and transfer between different managers. More...

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

Functions

DdNodeCudd_addBddThreshold (DdManager *dd, DdNode *f, CUDD_VALUE_TYPE value)
 Converts an ADD to a BDD.
DdNodeCudd_addBddStrictThreshold (DdManager *dd, DdNode *f, CUDD_VALUE_TYPE value)
 Converts an ADD to a BDD.
DdNodeCudd_addBddInterval (DdManager *dd, DdNode *f, CUDD_VALUE_TYPE lower, CUDD_VALUE_TYPE upper)
 Converts an ADD to a BDD.
DdNodeCudd_addBddIthBit (DdManager *dd, DdNode *f, int bit)
 Converts an ADD to a BDD by extracting the i-th bit from the leaves.
DdNodeCudd_BddToAdd (DdManager *dd, DdNode *B)
 Converts a BDD to a 0-1 ADD.
DdNodeCudd_addBddPattern (DdManager *dd, DdNode *f)
 Converts an ADD to a BDD.
DdNodeCudd_bddTransfer (DdManager *ddSource, DdManager *ddDestination, DdNode *f)
 Convert a BDD from a manager to another one.
DdNodecuddBddTransfer (DdManager *ddS, DdManager *ddD, DdNode *f)
 Convert a BDD from a manager to another one.
DdNodecuddAddBddDoPattern (DdManager *dd, DdNode *f)
 Performs the recursive step for Cudd_addBddPattern.
static DdNodeaddBddDoThreshold (DdManager *dd, DdNode *f, DdNode *val)
 Performs the recursive step for Cudd_addBddThreshold.
static DdNodeaddBddDoStrictThreshold (DdManager *dd, DdNode *f, DdNode *val)
 Performs the recursive step for Cudd_addBddStrictThreshold.
static DdNodeaddBddDoInterval (DdManager *dd, DdNode *f, DdNode *l, DdNode *u)
 Performs the recursive step for Cudd_addBddInterval.
static DdNodeaddBddDoIthBit (DdManager *dd, DdNode *f, DdNode *index)
 Performs the recursive step for Cudd_addBddIthBit.
static DdNodeddBddToAddRecur (DdManager *dd, DdNode *B)
 Performs the recursive step for Cudd_BddToAdd.
static DdNodecuddBddTransferRecur (DdManager *ddS, DdManager *ddD, DdNode *f, st_table *table)
 Performs the recursive step of Cudd_bddTransfer.

Detailed Description

Translation from BDD to ADD and vice versa and transfer between different managers.

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 DdNode* addBddDoInterval ( DdManager dd,
DdNode f,
DdNode l,
DdNode u 
) [static]

Performs the recursive step for Cudd_addBddInterval.

Returns:
a pointer to the BDD if successful; NULL otherwise.
Side effects
None
See also:
addBddDoThreshold addBddDoStrictThreshold
static DdNode* addBddDoIthBit ( DdManager dd,
DdNode f,
DdNode index 
) [static]

Performs the recursive step for Cudd_addBddIthBit.

Returns:
a pointer to the BDD if successful; NULL otherwise.
Side effects
None
static DdNode* addBddDoStrictThreshold ( DdManager dd,
DdNode f,
DdNode val 
) [static]

Performs the recursive step for Cudd_addBddStrictThreshold.

Returns:
a pointer to the BDD if successful; NULL otherwise.
Side effects
None
See also:
addBddDoThreshold
static DdNode* addBddDoThreshold ( DdManager dd,
DdNode f,
DdNode val 
) [static]

Performs the recursive step for Cudd_addBddThreshold.

Returns:
a pointer to the BDD if successful; NULL otherwise.
Side effects
None
See also:
addBddDoStrictThreshold
DdNode* Cudd_addBddInterval ( DdManager dd,
DdNode f,
CUDD_VALUE_TYPE  lower,
CUDD_VALUE_TYPE  upper 
)

Converts an ADD to a BDD.

Replaces all discriminants greater than or equal to lower and less than or equal to upper with 1, and all other discriminants with 0.

Returns:
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addBddThreshold Cudd_addBddStrictThreshold Cudd_addBddPattern Cudd_BddToAdd
DdNode* Cudd_addBddIthBit ( DdManager dd,
DdNode f,
int  bit 
)

Converts an ADD to a BDD by extracting the i-th bit from the leaves.

Converts an ADD to a BDD by replacing all discriminants whose i-th bit is equal to 1 with 1, and all other discriminants with 0. The i-th bit refers to the integer representation of the leaf value. If the value has a fractional part, it is ignored. Repeated calls to this procedure allow one to transform an integer-valued ADD into an array of BDDs, one for each bit of the leaf values.

Returns:
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addBddInterval Cudd_addBddPattern Cudd_BddToAdd
DdNode* Cudd_addBddPattern ( DdManager dd,
DdNode f 
)

Converts an ADD to a BDD.

Replaces all discriminants different from 0 with 1.

Returns:
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_BddToAdd Cudd_addBddThreshold Cudd_addBddInterval Cudd_addBddStrictThreshold
DdNode* Cudd_addBddStrictThreshold ( DdManager dd,
DdNode f,
CUDD_VALUE_TYPE  value 
)

Converts an ADD to a BDD.

Replaces all discriminants STRICTLY greater than value with 1, and all other discriminants with 0.

Returns:
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addBddInterval Cudd_addBddPattern Cudd_BddToAdd Cudd_addBddThreshold
DdNode* Cudd_addBddThreshold ( DdManager dd,
DdNode f,
CUDD_VALUE_TYPE  value 
)

Converts an ADD to a BDD.

Replaces all discriminants greater than or equal to value with 1, and all other discriminants with 0.

Returns:
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addBddInterval Cudd_addBddPattern Cudd_BddToAdd Cudd_addBddStrictThreshold
DdNode* Cudd_BddToAdd ( DdManager dd,
DdNode B 
)

Converts a BDD to a 0-1 ADD.

Returns:
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addBddPattern Cudd_addBddThreshold Cudd_addBddInterval Cudd_addBddStrictThreshold
DdNode* Cudd_bddTransfer ( DdManager ddSource,
DdManager ddDestination,
DdNode f 
)

Convert a BDD from a manager to another one.

The orders of the variables in the two managers may be different.

Returns:
a pointer to the BDD in the destination manager if successful; NULL otherwise.
Side effects
None
DdNode* cuddAddBddDoPattern ( DdManager dd,
DdNode f 
)

Performs the recursive step for Cudd_addBddPattern.

Returns:
a pointer to the resulting BDD if successful; NULL otherwise.
Side effects
None
DdNode* cuddBddTransfer ( DdManager ddS,
DdManager ddD,
DdNode f 
)

Convert a BDD from a manager to another one.

Returns:
a pointer to the BDD in the destination manager if successful; NULL otherwise.
Side effects
None
See also:
Cudd_bddTransfer
static DdNode* cuddBddTransferRecur ( DdManager ddS,
DdManager ddD,
DdNode f,
st_table table 
) [static]

Performs the recursive step of Cudd_bddTransfer.

Returns:
a pointer to the result if successful; NULL otherwise.
Side effects
None
See also:
cuddBddTransfer
static DdNode* ddBddToAddRecur ( DdManager dd,
DdNode B 
) [static]

Performs the recursive step for Cudd_BddToAdd.

Returns:
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects
None
 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated on 31 Dec 2015 for cudd by  doxygen 1.6.1