Returns a subset of minterms from a boolean function. More...
#include "util.h"
#include "cuddInt.h"
Functions | |
DdNode * | Cudd_SplitSet (DdManager *manager, DdNode *S, DdNode **xVars, int n, double m) |
Returns m minterms from a BDD. | |
DdNode * | cuddSplitSetRecur (DdManager *manager, st_table *mtable, int *varSeen, DdNode *p, double n, double max, int index) |
Implements the recursive step of Cudd_SplitSet. | |
static DdNode * | selectMintermsFromUniverse (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. | |
static DdNode * | mintermsFromUniverse (DdManager *manager, DdNode **vars, int numVars, double n, int index) |
Recursive procedure to extract n mintems from constant 1. | |
static double | bddAnnotateMintermCount (DdManager *manager, DdNode *node, double max, st_table *table) |
Annotates every node in the BDD node with its minterm count. |
Returns a subset of minterms from a boolean function.
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.
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.
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
.
m
minterms of the on-set of S if successful; NULL otherwise.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.
static DdNode* mintermsFromUniverse | ( | DdManager * | manager, | |
DdNode ** | vars, | |||
int | numVars, | |||
double | n, | |||
int | index | |||
) | [static] |
Recursive procedure to extract n mintems from constant 1.
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).