Building JavaBDD

If you have a supported system, it is easiest to just download one of the pre-built binaries. The native libraries have been optimized with the Intel compiler for maximum performance. Even if there is no pre-built binary for your system, the performance of the 100% Java implementation is still respectable.

If you still want to build it yourself, you will first need to decide which native library you want to interface with. JavaBDD can interface to BuDDy, CUDD, and/or CAL. The BuDDy source code is included; you can obtain the source for the others at the following locations:

BuDDy seems to have the best performance and is the most well-tested, so I recommend BuDDy.

The easiest way to build is to use the supplied Makefile. (To build JavaBDD on Windows, you will need cygwin or mingw installed.) Grab the JavaBDD source code from CVS, and extract the BuDDy/CUDD/CAL native code. Edit the Makefile to specify the path where to find the native code. (The default in the Makefile is buddy/src for BuDDy, cudd-2.4.0 for CUDD, and cal-2.1 for CAL.) It will automatically identify the path to the JDK, as long as you have it installed in the default location (C:/j2sdk* on Windows, /usr/java/j2sdk* on Linux). You may need to change this path if you are using JDK 1.5.0.

The default make target will build the jar file and the BuDDy native library. You can build the other native libraries by giving them as a make target (libcudd.so or libcal.so). Other useful make targets are "examples", "javadoc", "jar", "test", and "clean". Take a look at the Makefile for more information.

You can also specify different compilers by setting the CC variable. In addition to gcc, the Makefile supports the Microsoft compiler (cl), the Intel compiler (icc on Linux, icl on Windows), and the PathScale compiler (pathcc on Linux).

If you manage to successfully compile JavaBDD for another system, please contribute your Makefile and/or any source patches.