Getting Started with the CU Decision Diagram (CUDD) Package for Windows

I have managed to download, uncompress and compile this library in a Visual Studio environment. At last.  Though a very powerful package for the implementation of binary decision diagrams, the documentation for its actual set-up for non-Unix environments seems a little sketchy and somewhat intimidating for the beginner.  Here are some instructions for the most recent version at this time of writing (2.4.2).  If I get any more useful insights, I will add them to this post accordingly.

1. Acquire CUDD v2.4.2

You can download CUDD v2.4.2 from this ftp site or visit Fabio Somenzi’s home page and get it there.

2. Install CygWin and the make program

You will then need to run some Unix-type commands in order to make the CUDD project.  The way to run Unix/Linux commands and scripts directly in Windows is to use CygWin.  This is available for free at http://cygwin.com.  In order to run the make command at the command prompt, you must ensure it has been installed. When running the CygWin setup.exe facility, the make utility can be found in the ‘Devel’ subsection:

3. Fix the Makefile and source code issues

In addition to installing CygWin satisfactorily, the documentation tells you to run the make command inside wherever you installed the CUDD 2.4.2 directory eg:

C:\cudd-2.4.2>make

It won’t build properly just yet. But feel free to try this and watch it it not work.

Please be aware of two sources of trouble you need to address first, one in the Makefile and the other in the void util_print_cpu_stats(FILE *fp) contained inside the file cpu_stats.c (in the util directory).

Using your own choice of text editor, first edit the Makefile so that:

XCFLAGS = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD

becomes:

XCFLAGS = -malign-double -DHAVE_IEEE_754 -DBSD

Secondly in cpu_stats.c look for the code snippet that says

#if defined(_IBMR2)

and replace it with:

#if 0

Then look for the first line inside the void util_print_cpu_stats(FILE *fp) function and replace:

#ifdef BSD

with:

#if 0

4. Make CUDD

Now cd to the cudd-2.4.2 directory and go ahead with the make command.

cudd2

This should create the additional include directory with new header files as shown:

cudd3

There also should also be number of new c archive files created in the { util, epd, mtr, st, obj, dddmp } directories respectively:

$CUDD_ROOT/util/libutil.a
$CUDD_ROOT/epd/libepd.a
$CUDD_ROOT/mtr/libmtr.a
$CUDD_ROOT/st/libst.a
$CUDD_ROOT/obj/libobj.a
$CUDD_ROOT/dddmp/libdddmp.a

5. Link to the CUDD libraries

In Visual Studio, go to your project’s Configuration Properties, select C/C++ then Additional Include Directories and set it to the new include folder:

cudd4

In your project Configuration Properties, select Linker then General and then Additional Library Directories and insert the following directories:

cudd5

In Project Configuration Properties, select Linker, Input, Additional Dependencies, and insert the following linked libraries:

cudd6

That is all there is to it.  You might wish to check that anything utilising the CUDD project builds OK by using a simple code snippet eg:

// CUDD.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "util.h"
#include "cudd.h"

int _tmain(int argc, _TCHAR* argv[])
{
	DdNode* node1 = new DdNode;	

	return 0;
}

Latest Comments

  1. Francis 15 November 2011
    • admin 15 November 2011
  2. Arin 20 January 2013
    • chua123 22 February 2013
    • hello 30 August 2013
  3. chua123 14 February 2013
  4. chua123 17 February 2013
    • Andy 24 February 2013
      • chua123 28 February 2013
        • happyuk 28 February 2013
          • chua123 5 March 2013
  5. happyuk 21 March 2013
    • happyuk 21 March 2013
      • hello 24 August 2013
  6. hello 24 August 2013
  7. Omar 6 February 2014
  8. Anmol 12 September 2014

Leave a Reply to chua123 Cancel reply