SSoelvsten / adiar

An I/O-efficient implementation of (Binary) Decision Diagrams
https://ssoelvsten.github.io/adiar/
MIT License
24 stars 13 forks source link
bdd binary-decision-diagrams external-memory zdd zero-suppressed-decision-diagrams

Adiar

MIT License   Documentation   test   test   test   codecov

Based on the work of Lars Arge [Arge96], Adiar¹ is a BDD package [Bryant86] that makes use of time-forward processing to improve the I/O complexity of BDD manipulation. This makes it able to achieve efficient manipulation of BDDs, even when they outgrow the memory limit of the given machine.

Running Time of Adiar and other BDD packages solving the N-Queens problem

Figure: Running time solving N Queens (lower is better).

This project has been developed at the Logic and Semantics group at Aarhus University.

Table of Contents

Documentation

The documentation is available on Github Pages. To compile it locally, you need CMake and Doxygen (see Dependencies and Usage).

Dependencies

The implementation is dependant on the following external libraries

All of these are included within the repository as submodules. If you have not cloned the repository recursively, then run the following command

git submodule update --init --recursive

Other dependencies that we cannot provide as a submodule are shown below. The ticked dependencies are mandatory to have installed.

To install all of the above, run the respective command below.

Operating System Shell command
Ubuntu 22+ apt install cmake g++ libboost-all-dev doxygen graphviz
Fedora 36+ dnf install cmake gcc-c++ boost-devel doxygen graphviz
Arch Linux pacman -S --needed cmake gcc boost-libs doxygen graphviz

Usage

For how to use Adiar in your project, see the Getting Started page in the documentation.

Makefile Targets

The project is build with CMake, though for convenience I have simplified the CMake interactions to a single Makefile which works on a local machine.

The Makefile provides the following targets

target effect
build Build the source files
docs Build the documentation files
clean Remove all build files
test Build and run all unit tests
test/... Build and run a subset of the unit tests
coverage Build and run all unit tests and create lcov report
clang/format Format all files in src/ and test/

Playground

To quickly get started running small pieces of code, we provide in src/playground.cpp a tiny program where all of the boiler-plate is taken care of. This can be useful for trying out a feature, creating a minimal example for a bug report, and to guide development of new features.

To build and run src/playground.cpp with <MiB> MiB of memory (default: 1024 MiB), just run the following make command.

make playground M=<MiB>

Examples

The example/ folder contains larger examples for how to use Adiar. The README.md file in said folder contains a more in-depth description of each of the examples. For benchmarking Adiar against other BDD packages, see the BDD Benchmarking repository.

You can use make examples/<name> to compile and run them.

Contributions

Adiar is not yet feature complete. If you notice anything is missing, please open an issue.

Your contribution to the project is also very welcome! We list multiple “issues” where you can help - these tasks range from the smallest of tasks to entire student projects. Please get familiar with our Contribution Guidelines before you start to work on something.

License

The software and documentation files in this repository are provided under the MIT License.

Using Adiar will indirectly use TPIE underneath, which in turn is licensed under the LGPL v3 license. Hence, a binary of yours that is statically linked to Adiar will be affected by that license. That is, if you share that binary with others, then you will be obliged to make the source public. This can be resolved by using Adiar as a shared library or have it use an alternative to TPIE, such as STXXL.

Citing this project

If you use Adiar in some of your academic work, then please consider to cite one or more of the papers in docs/papers/cite.md.

References

Footnotes

  1. adiar ⟨ portugese ⟩ ( verb ) : to defer, to postpone