Abstract
This paper addresses the problem of binary decision diagram (BDD) minimization in the presence of don’t care sets. Specifically, given an incompletely specified function $g$ and a fixed ordering of the variables, we propose an exact algorithm for selecting $f$ such that $f$ is a cover for $g$ and the binary decision diagram for $f$ is of minimum size. We proved that this problem is NP-complete. Here we show that the BDD minimization problem can be formulated as a binate covering problem and solved using implicit enumeration techniques similar to the ones used in the reduction of incompletely specified finite state machines.
Introduction
Published in 1997, this work represents a significant milestone in formal logic synthesis. It bridges the gap between two seemingly disparate problems: minimizing Binary Decision Diagrams (BDDs) and reducing Finite State Machines (FSMs). The authors present IMAGEM, the first exact algorithm for minimizing BDDs with "don't care" conditions that avoids exhaustive enumeration of input points.
The Challenge of Incompletely Specified Functions
In digital logic and machine learning, we often work with incompletely specified functions—Boolean functions where some input combinations are "don't cares." When representing these functions as BDDs, the goal is to find the smallest possible graph to optimize memory and processing speed.
While heuristics like the "restrict" or "constrain" operators are common, they do not guarantee a minimum-sized BDD. Finding the absolute minimum is an NP-complete problem. Previous exact methods were exponential relative to the number of don't care points, limiting their use to trivial problems. IMAGEM aims to solve this exactly for much larger, non-trivial functions.
Methodology: BDDs as State Transition Graphs
The core innovation is a change in perspective: treating the BDD like a state transition graph. The process involves several key steps:
- 3TBDD Representation: The function is initially represented as a "3-Terminal BDD," which includes standard 0 and 1 terminals, plus a third terminal ($n_x$) for undefined/don't care values.
- Common Support Compatibility (CSC): Two nodes in the BDD are "compatible" if they can be merged without violating variable ordering or functional requirements.
- The Compatibility Graph: A graph is constructed where edges represent these compatibilities. Merging nodes creates "closure" requirements—merging parent nodes often necessitates merging their children to maintain consistency.
- Binate Covering & Implicit Enumeration: Instead of explicit enumeration, the authors use implicit techniques, representing sets of compatible nodes as BDDs themselves. This allows for the simultaneous manipulation of millions of combinations using Boolean algebra.
Key Insights and Results
The most profound insight is the structural similarity between BDD minimization and the reduction of Incompletely Specified Finite State Machines (ISFSMs). This allowed the authors to leverage decades of FSM research. By fixing the variable ordering, the problem becomes manageable, demonstrating that "implicit" representation is essential for handling NP-complete problems at scale.
IMAGEM significantly outperformed standard heuristics:
- Size Reduction: For the
xor8benchmark, the heuristic produced 45 nodes, while IMAGEM found the true minimum of 17. - Efficiency: On the
dnfabenchmark, which involved over 1.3 million compatibles, IMAGEM found the exact solution in approximately 517 seconds. - Optimality: The tool successfully identified BDDs no larger than the original functions, proving its effectiveness in utilizing don't cares.
Limitations and Future Work
Despite its success, the algorithm requires a fixed variable ordering, whereas BDD size is highly sensitive to this order. Additionally, some very large benchmarks still encountered memory "spaceouts." Future work could involve extending the theory to include complemented edges, a common feature in modern BDD packages that further reduces size.
Summary updated