https://github.com/msakai/haskell-decision-diagrams
Binary decision diagrams (BDD) and Zero-Suppressed Binary Decision Diagrams (ZDD) in Haskell
https://github.com/msakai/haskell-decision-diagrams
bdd binary-decision-diagram binary-decision-diagrams data-structures haskell zdd
Last synced: about 1 month ago
JSON representation
Binary decision diagrams (BDD) and Zero-Suppressed Binary Decision Diagrams (ZDD) in Haskell
- Host: GitHub
- URL: https://github.com/msakai/haskell-decision-diagrams
- Owner: msakai
- License: bsd-3-clause
- Created: 2021-10-16T09:32:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-26T03:05:30.000Z (5 months ago)
- Last Synced: 2025-03-18T21:50:59.847Z (about 1 month ago)
- Topics: bdd, binary-decision-diagram, binary-decision-diagrams, data-structures, haskell, zdd
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/decision-diagrams
- Size: 213 KB
- Stars: 13
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# decision-diagrams
Hackage:
[](https://hackage.haskell.org/package/decision-diagrams)
[](https://packdeps.haskellers.com/feed?needle=decision-diagrams)Dev:
[](https://github.com/msakai/haskell-decision-diagrams/actions/workflows/build.yaml)
[](https://coveralls.io/r/msakai/haskell-decision-diagrams)[Binary Decision Diagrams (BDD)](https://en.wikipedia.org/wiki/Binary_decision_diagram) and [Zero-suppressed Binary Decision Diagrams (ZDD)](https://en.wikipedia.org/wiki/Zero-suppressed_decision_diagram) implementation in Haskell.
BDD is a data structure suitable for representing boolean functions (can be thought as a compressed representation of truth tables) and many operations on boolean functions can be performed efficiently. ZDD is a variant of BDD suitable for representing (sparse) families of sets compactly.
BDD/ZDD uses hash-consing for compact representation and efficient comparison, and we use [intern](https://hackage.haskell.org/package/intern) package for implementing hash-consing.
## Comparison with other BDD packages for Haskell
|Package name|Repository|License|BDD|ZDD|Style|Implementation|Hash-consing / Fast equality test|Dynamic variable reordering|
|------------|----------|-------|---|---|-----|--------------|---------------------------------|---------------------------|
|[decision-diagrams](https://hackage.haskell.org/package/decision-diagrams) (this package)|[GitHub](https://github.com/msakai/haskell-decision-diagrams/)|BSD|✔️|✔️|pure|pure Haskell|✔️|-|
|[zsdd](https://hackage.haskell.org/package/zsdd)|[GitHub](https://github.com/eddiejones2108/decision-diagrams) (deleted?)|BSD|✔️|✔️|monadic|pure Haskell|✔️|-|
|[obdd](https://hackage.haskell.org/package/obdd)|[GitHub](https://github.com/jwaldmann/haskell-obdd)|GPL|✔️|-|pure|pure Haskell|-|-|
|[HasCacBDD](https://hackage.haskell.org/package/HasCacBDD)|[GitHub](https://github.com/m4lvin/HasCacBDD)|GPL|✔️|-|pure|FFI|✔️|-|
|[hBDD](https://hackage.haskell.org/package/hBDD) ([hBDD-CUDD](https://hackage.haskell.org/package/hBDD-CUDD), [hBDD-CMUBDD](https://hackage.haskell.org/package/hBDD-CMUBDD))|[GitHub](https://github.com/peteg/hBDD)|LGPL|✔️|-|pure|FFI|✔️|✔️|
|[cudd](https://hackage.haskell.org/package/cudd)|[GitHub](https://github.com/adamwalker/haskell_cudd)|BSD|✔️|-|both pure\*1 and monadic|FFI|✔️|✔️|\*1: `cudd`'s pure interface is different from normal Haskell data types (like ones in the [containers](https://hackage.haskell.org/package/containers) package, for example) because it requires `DDManager` argument.
Please feel free to make a pull request for addition or correction to the comparison.