decision-diagrams

June 15, 2023 · View on GitHub

Hackage: Hackage Hackage Deps

Dev: Build Status Coverage Status

Binary Decision Diagrams (BDD) and Zero-suppressed Binary Decision Diagrams (ZDD) 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 package for implementing hash-consing.

Comparison with other BDD packages for Haskell

Package nameRepositoryLicenseBDDZDDStyleImplementationHash-consing / Fast equality testDynamic variable reordering
decision-diagrams (this package)GitHubBSD✔️✔️purepure Haskell✔️-
zsddGitHub (deleted?)BSD✔️✔️monadicpure Haskell✔️-
obddGitHubGPL✔️-purepure Haskell--
HasCacBDDGitHubGPL✔️-pureFFI✔️-
hBDD (hBDD-CUDD, hBDD-CMUBDD)GitHubLGPL✔️-pureFFI✔️✔️
cuddGitHubBSD✔️-both pure*1 and monadicFFI✔️✔️

*1: cudd's pure interface is different from normal Haskell data types (like ones in the containers package, for example) because it requires DDManager argument.

Please feel free to make a pull request for addition or correction to the comparison.