Binary Decision Diagrams:Data Structure
Data Structure
In a typical realization of a BDD manipulator, all the nodes are stored in a single table in the main memory of the computer. Figure 29.10 is a simple example of realization for the BDD shown in Figure 29.6. Each node has three basic attributes: input variable and the next nodes accessed by the 0- and 1-edges. Also, 0- and 1-terminals are first allocated in the table as special nodes. The other non-terminal nodes are created one by one during the execution of logic operations.
Before creating a new node, we check the reduction rules of Procedure 29.1. If the 0- and 1-edges go to the same next node (Step 1(b) of Procedure 29.1) or if an equivalent node already exists (Step 1(a)), then we do not create a new node but simply copy that node as the next node. To find an equivalent node, we check a table which displays all the existing nodes. The hash table technique is very effective to accelerate this checking. (It can be done in a constant time for any large-scale BDDs, unless the table overflows in main memories.)
When generating BDDs for logic expressions, such as Procedure 29.2, many intermediate BDDs are temporarily generated. It is important for memory efficiency to delete such unnecessary BDDs. In order to determine the necessity of the nodes, a reference counter is attached to each node, which shows the number of incoming edges to the node.
In a typical implementation, the BDD manipulator consumes 20 to 30 bytes of memory for each node. Today, there are personal computers and workstations with more than 100 Mbytes of memory, and those facilitate us to generate BDDs containing as many as millions of nodes. However, the BDDs still grow beyond the memory capacity in some practical applications.
Comments
Post a Comment