abc-master
|
Go to the source code of this file.
Functions | |
static int | getMaxBinomial (int n) |
static DdHalfWord ** | getMatrix (int rows, int cols) |
static void | freeMatrix (DdHalfWord **matrix) |
static int | getLevelKeys (DdManager *table, int l) |
static int | ddShuffle (DdManager *table, DdHalfWord *permutation, int lower, int upper) |
static int | ddSiftUp (DdManager *table, int x, int xLow) |
static int | updateUB (DdManager *table, int oldBound, DdHalfWord *bestOrder, int lower, int upper) |
static int | ddCountRoots (DdManager *table, int lower, int upper) |
static void | ddClearGlobal (DdManager *table, int lower, int maxlevel) |
static int | computeLB (DdManager *table, DdHalfWord *order, int roots, int cost, int lower, int upper, int level) |
static int | updateEntry (DdManager *table, DdHalfWord *order, int level, int cost, DdHalfWord **orders, int *costs, int subsets, char *mask, int lower, int upper) |
static void | pushDown (DdHalfWord *order, int j, int level) |
static DdHalfWord * | initSymmInfo (DdManager *table, int lower, int upper) |
static int | checkSymmInfo (DdManager *table, DdHalfWord *symmInfo, int index, int level) |
int | cuddExact (DdManager *table, int lower, int upper) |
Variables | |
static ABC_NAMESPACE_IMPL_START char rcsid[] | DD_UNUSED = "$Id: cuddExact.c,v 1.28 2009/02/19 16:19:19 fabio Exp $" |
|
static |
Function********************************************************************
Synopsis [Check symmetry condition.]
Description [Returns 1 if a variable is the one with the highest index among those belonging to a symmetry group that are in the top part of the BDD. The top part is given by level.]
SideEffects [None]
SeeAlso [initSymmInfo]
Definition at line 1008 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Computes a lower bound on the size of a BDD.]
Description [Computes a lower bound on the size of a BDD from the following factors:
variable in the support of the roots in the upper part of the BDD subjected to reordering.
SideEffects [None]
SeeAlso []
Definition at line 813 of file cuddExact.c.
int cuddExact | ( | DdManager * | table, |
int | lower, | ||
int | upper | ||
) |
AutomaticEnd Function********************************************************************
Synopsis [Exact variable ordering algorithm.]
Description [Exact variable ordering algorithm. Finds an optimum order for the variables between lower and upper. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 153 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Scans the DD and clears the LSB of the next pointers.]
Description [Scans the DD and clears the LSB of the next pointers. The LSB of the next pointers are used as markers to tell whether a node was reached. Once the roots are counted, these flags are reset.]
SideEffects [None]
SeeAlso [ddCountRoots]
Definition at line 767 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Counts the number of roots.]
Description [Counts the number of roots at the levels between lower and upper. The computation is based on breadth-first search. A node is a root if it is not reachable from any previously visited node. (All the nodes at level lower are therefore considered roots.) The visited flag uses the LSB of the next pointer. Returns the root count. The roots that are constant nodes are always ignored.]
SideEffects [None]
SeeAlso [ddClearGlobal]
Definition at line 700 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Reorders variables according to a given permutation.]
Description [Reorders variables according to a given permutation. The i-th permutation array contains the index of the variable that should be brought to the i-th level. ddShuffle assumes that no dead nodes are present and that the interaction matrix is properly initialized. The reordering is achieved by a series of upward sifts. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 541 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Moves one variable up.]
Description [Takes a variable from position x and sifts it up to position xLow; xLow should be less than or equal to x. Returns 1 if successful; 0 otherwise]
SideEffects [None]
SeeAlso []
Definition at line 623 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Frees a two-dimensional matrix allocated by getMatrix.]
Description []
SideEffects [None]
SeeAlso [getMatrix]
Definition at line 486 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Returns the number of nodes at one level of a unique table.]
Description [Returns the number of nodes at one level of a unique table. The projection function, if isolated, is not counted.]
SideEffects [None]
SeeAlso []
Definition at line 509 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Allocates a two-dimensional matrix of ints.]
Description [Allocates a two-dimensional matrix of ints. Returns the pointer to the matrix if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [freeMatrix]
Definition at line 451 of file cuddExact.c.
|
static |
AutomaticStart
Function********************************************************************
Synopsis [Returns the maximum value of (n choose k) for a given n.]
Description [Computes the maximum value of (n choose k) for a given n. The maximum value occurs for k = n/2 when n is even, or k = (n-1)/2 when n is odd. The algorithm used in this procedure avoids intermediate overflow problems. It is based on the identity
binomial(n,k) = n/k * binomial(n-1,k-1).
Returns the computed value if successful; -1 if out of range.]
SideEffects [None]
SeeAlso []
Definition at line 363 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Gathers symmetry information.]
Description [Translates the symmetry information stored in the next field of each subtable from level to indices. This procedure is called immediately after symmetric sifting, so that the next fields are correct. By translating this informaton in terms of indices, we make it independent of subsequent reorderings. The format used is that of the next fields: a circular list where each variable points to the next variable in the same symmetry group. Only the entries between lower and upper are considered. The procedure returns a pointer to an array holding the symmetry information if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [checkSymmInfo]
Definition at line 972 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Pushes a variable in the order down to position "level."]
Description []
SideEffects [None]
SeeAlso []
Definition at line 934 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Updates entry for a subset.]
Description [Updates entry for a subset. Finds the subset, if it exists. If the new order for the subset has lower cost, or if the subset did not exist, it stores the new order and cost. Returns the number of subsets currently in the table.]
SideEffects [None]
SeeAlso []
Definition at line 880 of file cuddExact.c.
|
static |
Function********************************************************************
Synopsis [Updates the upper bound and saves the best order seen so far.]
Description [Updates the upper bound and saves the best order seen so far. Returns the current value of the upper bound.]
SideEffects [None]
SeeAlso []
Definition at line 658 of file cuddExact.c.
|
static |
CFile***********************************************************************
FileName [cuddExact.c]
PackageName [cudd]
Synopsis [Functions for exact variable reordering.]
Description [External procedures included in this file:
Internal procedures included in this module:
Static procedures included in this module:
]
Author [Cheng Hua, Fabio Somenzi]
Copyright [Copyright (c) 1995-2004, 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.]
Definition at line 95 of file cuddExact.c.