cudd  3.0.0
The University of Colorado Decision Diagram Package
Macros | Functions
cuddZddLin.c File Reference

Procedures for dynamic variable ordering of ZDDs. More...

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

Macros

#define CUDD_SWAP_MOVE   0
 
#define CUDD_LINEAR_TRANSFORM_MOVE   1
 
#define CUDD_INVERSE_TRANSFORM_MOVE   2
 

Functions

int cuddZddLinearSifting (DdManager *table, int lower, int upper)
 Implementation of the linear sifting algorithm for ZDDs. More...
 
static int cuddZddLinearInPlace (DdManager *table, int x, int y)
 Linearly combines two adjacent variables. More...
 
static int cuddZddLinearAux (DdManager *table, int x, int xLow, int xHigh)
 Given xLow <= x <= xHigh moves x up and down between the boundaries. More...
 
static MovecuddZddLinearUp (DdManager *table, int y, int xLow, Move *prevMoves)
 Sifts a variable up applying the XOR transformation. More...
 
static MovecuddZddLinearDown (DdManager *table, int x, int xHigh, Move *prevMoves)
 Sifts a variable down and applies the XOR transformation. More...
 
static int cuddZddLinearBackward (DdManager *table, int size, Move *moves)
 Given a set of moves, returns the ZDD heap to the position giving the minimum size. More...
 
static MovecuddZddUndoMoves (DdManager *table, Move *moves)
 Given a set of moves, returns the ZDD heap to the order in effect before the moves. More...
 

Detailed Description

Procedures for dynamic variable ordering of ZDDs.

See also
cuddLinear.c cuddZddReord.c
Author
Fabio Somenzi

Function Documentation

◆ cuddZddLinearAux()

static int cuddZddLinearAux ( DdManager table,
int  x,
int  xLow,
int  xHigh 
)
static

Given xLow <= x <= xHigh moves x up and down between the boundaries.

Finds the best position and does the required changes.

Returns
1 if successful; 0 otherwise.
Side effects None

◆ cuddZddLinearBackward()

static int cuddZddLinearBackward ( DdManager table,
int  size,
Move moves 
)
static

Given a set of moves, returns the ZDD heap to the position giving the minimum size.

In case of ties, returns to the closest position giving the minimum size.

Returns
1 in case of success; 0 otherwise.
Side effects None

◆ cuddZddLinearDown()

static Move* cuddZddLinearDown ( DdManager table,
int  x,
int  xHigh,
Move prevMoves 
)
static

Sifts a variable down and applies the XOR transformation.

Sifts a variable down. Moves x down until either it reaches the bound (xHigh) or the size of the ZDD heap increases too much.

Returns
the set of moves in case of success; NULL if memory is full.
Side effects None

◆ cuddZddLinearInPlace()

static int cuddZddLinearInPlace ( DdManager table,
int  x,
int  y 
)
static

Linearly combines two adjacent variables.

It assumes that no dead nodes are present on entry to this procedure. The procedure then guarantees that no dead nodes will be present when it terminates. cuddZddLinearInPlace assumes that x < y.

Returns
the number of keys in the table if successful; 0 otherwise.
Side effects None
See also
cuddZddSwapInPlace cuddLinearInPlace

◆ cuddZddLinearSifting()

int cuddZddLinearSifting ( DdManager table,
int  lower,
int  upper 
)

Implementation of the linear sifting algorithm for ZDDs.

Assumes that no dead nodes are present.

  1. Order all the variables according to the number of entries in each unique table.
  2. Sift the variable up and down and applies the XOR transformation, remembering each time the total size of the DD heap.
  3. Select the best permutation.
  4. Repeat 3 and 4 for all variables.
Returns
1 if successful; 0 otherwise.
Side effects None

◆ cuddZddLinearUp()

static Move* cuddZddLinearUp ( DdManager table,
int  y,
int  xLow,
Move prevMoves 
)
static

Sifts a variable up applying the XOR transformation.

Moves y up until either it reaches the bound (xLow) or the size of the ZDD heap increases too much.

Returns
the set of moves in case of success; NULL if memory is full.
Side effects None

◆ cuddZddUndoMoves()

static Move* cuddZddUndoMoves ( DdManager table,
Move moves 
)
static

Given a set of moves, returns the ZDD heap to the order in effect before the moves.

Returns
1 in case of success; 0 otherwise.
Side effects None