cudd  3.0.0
The University of Colorado Decision Diagram Package
Functions
cuddSplit.c File Reference

Returns a subset of minterms from a boolean function. More...

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

Functions

DdNodeCudd_SplitSet (DdManager *manager, DdNode *S, DdNode **xVars, int n, double m)
 Returns m minterms from a BDD. More...
 
DdNodecuddSplitSetRecur (DdManager *manager, st_table *mtable, int *varSeen, DdNode *p, double n, double max, int index)
 Implements the recursive step of Cudd_SplitSet. More...
 
static DdNodeselectMintermsFromUniverse (DdManager *manager, int *varSeen, double n)
 This function prepares an array of variables which have not been encountered so far when traversing the procedure cuddSplitSetRecur. More...
 
static DdNodemintermsFromUniverse (DdManager *manager, DdNode **vars, int numVars, double n, int index)
 Recursive procedure to extract n mintems from constant 1. More...
 
static double bddAnnotateMintermCount (DdManager *manager, DdNode *node, double max, st_table *table)
 Annotates every node in the BDD node with its minterm count. More...
 

Detailed Description

Returns a subset of minterms from a boolean function.

Author
Balakrishna Kumthekar

Function Documentation

◆ bddAnnotateMintermCount()

static double bddAnnotateMintermCount ( DdManager manager,
DdNode node,
double  max,
st_table table 
)
static

Annotates every node in the BDD node with its minterm count.

In this function, every node and the minterm count represented by it are stored in a hash table.

Side effects Fills up 'table' with the pair <node,minterm_count>.

◆ Cudd_SplitSet()

DdNode* Cudd_SplitSet ( DdManager manager,
DdNode S,
DdNode **  xVars,
int  n,
double  m 
)

Returns m minterms from a BDD.

Returns m minterms from a BDD whose support has n variables at most. The procedure tries to create as few extra nodes as possible. The function represented by S depends on at most n of the variables in xVars.

Returns
a BDD with m minterms of the on-set of S if successful; NULL otherwise.
Side effects None

◆ cuddSplitSetRecur()

DdNode* cuddSplitSetRecur ( DdManager manager,
st_table mtable,
int *  varSeen,
DdNode p,
double  n,
double  max,
int  index 
)

Implements the recursive step of Cudd_SplitSet.

The procedure recursively traverses the BDD and checks to see if any node satisfies the minterm requirements as specified by 'n'. At any node X, n is compared to the number of minterms in the onset of X's children. If either of the child nodes have exactly n minterms, then that node is returned; else, if n is greater than the onset of one of the child nodes, that node is retained and the difference in the number of minterms is extracted from the other child. In case n minterms can be extracted from constant 1, the algorithm returns the result with at most log(n) nodes.

Side effects The array 'varSeen' is updated at every recursive call
to set the variables traversed by the procedure.

◆ mintermsFromUniverse()

static DdNode* mintermsFromUniverse ( DdManager manager,
DdNode **  vars,
int  numVars,
double  n,
int  index 
)
static

Recursive procedure to extract n mintems from constant 1.

Side effects None

◆ selectMintermsFromUniverse()

static DdNode* selectMintermsFromUniverse ( DdManager manager,
int *  varSeen,
double  n 
)
static

This function prepares an array of variables which have not been encountered so far when traversing the procedure cuddSplitSetRecur.

This array is then used to extract the required number of minterms from a constant 1. The algorithm guarantees that the size of BDD will be at most log(n).

Side effects None