Skip to content

Efficient pure Java implementation of (Binary) Decision Diagrams

License

Notifications You must be signed in to change notification settings

incaseoftrouble/jbdd

Repository files navigation

JBDD

Build Status

JBDD (Java Binary Decision Diagrams) is (yet another) native implementation of (Reduced Ordered) BDDs in Java. It is loosely inspired by JDD, but completely rewritten from scratch, since JDD contained some bugs and was missing features like, for example, substitution. The design goals are simplicity, performance, and no dependencies.

Performance

Internally, JBDD does not use any objects, only primitive arrays, and uses manual memory management. JBDD also provides an object-oriented interface with automatic reference management through weak references (instead of finalize(), which has a hefty performance penalty). The overhead incurred by the object-oriented interface largely depends on the number of referenced objects, but was hardly measurable in several synthetic benchmarks.

Compared to other libraries, JBDD beats most Java implementations and even is on-par or faster than established, C-based libraries such as BuDDy. (Measured on several synthetic benchmarks.)

Features

Some more fancy BDD features and variants are missing. Most notably, these are ZDDs, MTBDDs, and variable reordering. They might get added over time, but if you require such features, consider using optimized implementations like CUDD, BuDDy or Sylvan instead.

Usage

You can either build the jar using gradle (see below) or fetch it from maven central:

<dependency>
  <groupId>de.tum.in</groupId>
  <artifactId>jbdd</artifactId>
  <version>0.6.0</version>
</dependency>

and for gradle:

// https://mvnrepository.com/artifact/de.tum.in/jbdd
implementation("de.tum.in:jbdd:0.6.0")

Building

Build the project using gradle. All dependencies are downloaded automatically.

$ ./gradlew build

Or, if you are on windows,

# gradlew.bat build

Referencing

If you use JBDD for your experiments, I would appreciate a citation akin to the following.

@misc{jbdd,
    author = {Tobias Meggendorfer},
    title = {{JBDD}: A Java {BDD} Library},
    howpublished = "\url{https://github.com/incaseoftrouble/jbdd}",
    year = 2017
}