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

Sanity check tests for some CUDD functions. More...

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

Macros

#define TESTCUDD_VERSION   "TestCudd Version #1.0, Release date 3/17/01"
 

Functions

int main (int argc, char *const *argv)
 Main function for testcudd. More...
 
static void usage (char *prog)
 Prints usage info for testcudd. More...
 
static FILE * open_file (char *filename, const char *mode)
 Opens a file. More...
 
static int testWalsh (DdManager *dd, int N, int cmu, int approach, int pr)
 Tests Walsh matrix multiplication. More...
 
static int testIterators (DdManager *dd, DdNode *M, DdNode *C, int pr)
 Tests iterators on cubes and nodes. More...
 
static int testXor (DdManager *dd, DdNode *f, int pr, int nvars)
 Tests the functions related to the exclusive OR. More...
 
static int testHamming (DdManager *dd, DdNode *f, int pr)
 Tests the Hamming distance functions. More...
 
static int testSupport (DdManager *dd, DdNode *f, DdNode *g, int pr)
 Tests the support functions. More...
 

Variables

static const char * onames [] = { "C", "M" }
 

Detailed Description

Sanity check tests for some CUDD functions.

testcudd reads a matrix with real coefficients and transforms it into an ADD. It then performs various operations on the ADD and on the BDD corresponding to the ADD pattern. Finally, testcudd tests functions relate to Walsh matrices and matrix multiplication.

Author
Fabio Somenzi

Function Documentation

◆ main()

int main ( int  argc,
char *const *  argv 
)

Main function for testcudd.

Side effects None

< Initial size of subtables
< readable true

◆ open_file()

static FILE* open_file ( char *  filename,
const char *  mode 
)
static

Opens a file.

Opens a file, or fails with an error message and exits. Allows '-' as a synonym for standard input.

Side effects None

◆ testHamming()

static int testHamming ( DdManager dd,
DdNode f,
int  pr 
)
static

Tests the Hamming distance functions.

Returns
1 if successful; 0 otherwise.
Side effects None

◆ testIterators()

static int testIterators ( DdManager dd,
DdNode M,
DdNode C,
int  pr 
)
static

Tests iterators on cubes and nodes.

Side effects None

< readable true

< readable true
< readable true

◆ testSupport()

static int testSupport ( DdManager dd,
DdNode f,
DdNode g,
int  pr 
)
static

Tests the support functions.

Returns
1 if successful; 0 otherwise.
Side effects None

◆ testWalsh()

static int testWalsh ( DdManager dd,
int  N,
int  cmu,
int  approach,
int  pr 
)
static

Tests Walsh matrix multiplication.

Returns
1 if successful; 0 otherwise.
Side effects May create new variables in the manager.

◆ testXor()

static int testXor ( DdManager dd,
DdNode f,
int  pr,
int  nvars 
)
static

Tests the functions related to the exclusive OR.

Builds the boolean difference of the given function in three different ways and checks that the results is the same.

Returns
1 if successful; 0 otherwise.
Side effects None

◆ usage()

static void usage ( char *  prog)
static

Prints usage info for testcudd.

Side effects None