abc-master
|
Go to the source code of this file.
Macros | |
#define | DD_NORMAL_SIFT 0 |
#define | DD_LAZY_SIFT 1 |
#define | DD_SIFT_DOWN 0 |
#define | DD_SIFT_UP 1 |
Typedefs | |
typedef int(* | DD_CHKFP )(DdManager *, int, int) |
Functions | |
static int | ddTreeSiftingAux (DdManager *table, MtrNode *treenode, Cudd_ReorderingType method) |
static int | ddReorderChildren (DdManager *table, MtrNode *treenode, Cudd_ReorderingType method) |
static void | ddFindNodeHiLo (DdManager *table, MtrNode *treenode, int *lower, int *upper) |
static int | ddUniqueCompareGroup (int *ptrX, int *ptrY) |
static int | ddGroupSifting (DdManager *table, int lower, int upper, DD_CHKFP checkFunction, int lazyFlag) |
static void | ddCreateGroup (DdManager *table, int x, int y) |
static int | ddGroupSiftingAux (DdManager *table, int x, int xLow, int xHigh, DD_CHKFP checkFunction, int lazyFlag) |
static int | ddGroupSiftingUp (DdManager *table, int y, int xLow, DD_CHKFP checkFunction, Move **moves) |
static int | ddGroupSiftingDown (DdManager *table, int x, int xHigh, DD_CHKFP checkFunction, Move **moves) |
static int | ddGroupMove (DdManager *table, int x, int y, Move **moves) |
static int | ddGroupMoveBackward (DdManager *table, int x, int y) |
static int | ddGroupSiftingBackward (DdManager *table, Move *moves, int size, int upFlag, int lazyFlag) |
static void | ddMergeGroups (DdManager *table, MtrNode *treenode, int low, int high) |
static void | ddDissolveGroup (DdManager *table, int x, int y) |
static int | ddNoCheck (DdManager *table, int x, int y) |
static int | ddSecDiffCheck (DdManager *table, int x, int y) |
static int | ddExtSymmCheck (DdManager *table, int x, int y) |
static int | ddVarGroupCheck (DdManager *table, int x, int y) |
static int | ddSetVarHandled (DdManager *dd, int index) |
static int | ddResetVarHandled (DdManager *dd, int index) |
static int | ddIsVarHandled (DdManager *dd, int index) |
MtrNode * | Cudd_MakeTreeNode (DdManager *dd, unsigned int low, unsigned int size, unsigned int type) |
int | cuddTreeSifting (DdManager *table, Cudd_ReorderingType method) |
Variables | |
static char rcsid[] | DD_UNUSED = "$Id: cuddGroup.c,v 1.44 2009/02/21 18:24:10 fabio Exp $" |
static int * | entry |
int | ddTotalNumberSwapping |
static unsigned int | originalSize |
#define DD_LAZY_SIFT 1 |
Definition at line 92 of file cuddGroup.c.
#define DD_NORMAL_SIFT 0 |
CFile***********************************************************************
FileName [cuddGroup.c]
PackageName [cudd]
Synopsis [Functions for group sifting.]
Description [External procedures included in this file:
Internal procedures included in this file:
Static procedures included in this module:
]
Author [Shipra Panda, 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 91 of file cuddGroup.c.
#define DD_SIFT_DOWN 0 |
Definition at line 95 of file cuddGroup.c.
#define DD_SIFT_UP 1 |
Definition at line 96 of file cuddGroup.c.
typedef int(* DD_CHKFP)(DdManager *, int, int) |
Definition at line 109 of file cuddGroup.c.
MtrNode* Cudd_MakeTreeNode | ( | DdManager * | dd, |
unsigned int | low, | ||
unsigned int | size, | ||
unsigned int | type | ||
) |
AutomaticEnd Function********************************************************************
Synopsis [Creates a new variable group.]
Description [Creates a new variable group. The group starts at variable and contains size variables. The parameter low is the index of the first variable. If the variable already exists, its current position in the order is known to the manager. If the variable does not exist yet, the position is assumed to be the same as the index. The group tree is created if it does not exist yet. Returns a pointer to the group if successful; NULL otherwise.]
SideEffects [The variable tree is changed.]
SeeAlso [Cudd_MakeZddTreeNode]
Definition at line 206 of file cuddGroup.c.
int cuddTreeSifting | ( | DdManager * | table, |
Cudd_ReorderingType | method | ||
) |
Function********************************************************************
Synopsis [Tree sifting algorithm.]
Description [Tree sifting algorithm. Assumes that a tree representing a group hierarchy is passed as a parameter. It then reorders each group in postorder fashion by calling ddTreeSiftingAux. Assumes that no dead nodes are present. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
Definition at line 274 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Creates a group encompassing variables from x to y in the DD table.]
Description [Creates a group encompassing variables from x to y in the DD table. In the current implementation it must be y == x+1. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 915 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Dissolves a group in the DD table.]
Description [x and y are variables in a group to be cut in two. The cut is to pass between x and y.]
SideEffects [None]
Definition at line 1823 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Checks for extended symmetry of x and y.]
Description [Checks for extended symmetry of x and y. Returns 1 in case of extended symmetry; 0 otherwise.]
SideEffects [None]
Definition at line 1938 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Finds the lower and upper bounds of the group represented by treenode.]
Description [Finds the lower and upper bounds of the group represented by treenode. From the index and size fields we need to derive the current positions, and find maximum and minimum.]
SideEffects [The bounds are returned as side effects.]
SeeAlso []
Definition at line 617 of file cuddGroup.c.
Function********************************************************************
Synopsis [Swaps two groups and records the move.]
Description [Swaps two groups and records the move. Returns the number of keys in the DD table in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 1488 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Undoes the swap two groups.]
Description [Undoes the swap two groups. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 1594 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Sifts from treenode->low to treenode->high.]
Description [Sifts from treenode->low to treenode->high. If croupcheck == CUDD_GROUP_CHECK7, it checks for group creation at the end of the initial sifting. If a group is created, it is then sifted again. After sifting one variable, the group that contains it is dissolved. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 720 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Sifts one variable up and down until it has taken all positions. Checks for aggregation.]
Description [Sifts one variable up and down until it has taken all positions. Checks for aggregation. There may be at most two sweeps, even if the group grows. Assumes that x is either an isolated variable, or it is the bottom of a group. All groups may not have been found. The variable being moved is returned to the best position seen during sifting. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 956 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Determines the best position for a variables and returns it there.]
Description [Determines the best position for a variables and returns it there. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 1668 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Sifts down a variable until it reaches position xHigh.]
Description [Sifts down a variable until it reaches position xHigh. Assumes that x is the bottom of a group (or a singleton). Records all the moves. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 1312 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Sifts up a variable until either it reaches position xLow or the size of the DD heap increases too much.]
Description [Sifts up a variable until either it reaches position xLow or the size of the DD heap increases too much. Assumes that y is the top of a group (or a singleton). Checks y for aggregation to the adjacent variables. Records all the moves that are appended to the list of moves received as input and returned as a side effect. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
Definition at line 1154 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Checks whether a variables is already handled.]
Description [Checks whether a variables is already handled. This function is used for lazy sifting.]
SideEffects [none]
SeeAlso []
Definition at line 2176 of file cuddGroup.c.
Function********************************************************************
Synopsis [Merges groups in the DD table.]
Description [Creates a single group from low to high and adjusts the index field of the tree node.]
SideEffects [None]
Definition at line 1775 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Pretends to check two variables for aggregation.]
Description [Pretends to check two variables for aggregation. Always returns 0.]
SideEffects [None]
Definition at line 1857 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Reorders the children of a group tree node according to the options.]
Description [Reorders the children of a group tree node according to the options. After reordering puts all the variables in the group and/or its descendents in a single group. This allows hierarchical reordering. If the variables in the group do not exist yet, simply does nothing. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
Definition at line 453 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Resets a variable to be processed.]
Description [Resets a variable to be processed. This function is used for lazy sifting.]
SideEffects [none]
SeeAlso []
Definition at line 2152 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Checks two variables for aggregation.]
Description [Checks two variables for aggregation. The check is based on the second difference of the number of nodes as a function of the layer. If the second difference is lower than a given threshold (typically negative) then the two variables should be aggregated. Returns 1 if the two variables pass the test; 0 otherwise.]
SideEffects [None]
Definition at line 1881 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Sets a variable to already handled.]
Description [Sets a variable to already handled. This function is used for lazy sifting.]
SideEffects [none]
SeeAlso []
Definition at line 2128 of file cuddGroup.c.
|
static |
AutomaticStart
Function********************************************************************
Synopsis [Visits the group tree and reorders each group.]
Description [Recursively visits the group tree and reorders each group in postorder fashion. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
Definition at line 361 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Comparison function used by qsort.]
Description [Comparison function used by qsort to order the variables according to the number of keys in the subtables. Returns the difference in number of keys between the two variables being compared.]
SideEffects [None]
Definition at line 692 of file cuddGroup.c.
|
static |
Function********************************************************************
Synopsis [Checks for grouping of x and y.]
Description [Checks for grouping of x and y. Returns 1 in case of grouping; 0 otherwise. This function is used for lazy sifting.]
SideEffects [None]
Definition at line 2088 of file cuddGroup.c.
|
static |
Definition at line 119 of file cuddGroup.c.
int ddTotalNumberSwapping |
Definition at line 107 of file cuddReorder.c.
|
static |
Definition at line 122 of file cuddGroup.c.
|
static |
Definition at line 136 of file cuddGroup.c.