Refutation-Complete Binary Decision Diagrams

Binary decision diagrams (BDDs) are an approach to encoding and reasoning with formulae in propositional logic. They have the property that the representation of any propositional formula is canonical (i.e., two formulae are equivalent iff they have the same structure under a variable ordering condition that can be easily enforced); this is particularly useful since tautological and inconsistent formula will reduce to TRUE and FALSE, respectively. However, in traditional theorem proving and satisfiability testing, we typically only need to refute a formula (or equivalently determine that it is unsatisfiable). Since BDDs can both directly prove or refute a formula, they seem to be more powerful than required for many standard applications. Consequently, we analyze the standard BDD algorithms and show that they are performing much more computation than required to provide a refutation. By pruning structure from the BDD that is unnecessary for refutation, we show how the BDD algorithms can be modified to provide an efficient implementation of directional resolution. This yields a refutation-complete BDD (RCBDD) that we implement using CUDD and compare to the original BDD algorithm for satisfiability testing on random 3-SAT formulae. These results show that RCBDDs are an efficient alternative to BDDs for satisfiability testing, with RCBDDs generally outperforming BDDs, and only slightly underperforming BDDs in the remaining cases. The efficiency of RCBDDs and the intuitions developed in this paper make them a promising approach for a wide variety of applications that we discuss in the concluding section. 1 Background Since the abstract outlines the general structure of the paper, we will immediately delve into the background material required to understand this paper. 1.1 Binary decision diagrams Binary decision diagrams (BDDs) were introduced in their most well-known form by Bryant [1]. BDDs allow one to encode any propositional formula as a reduced, ordered, directed acyclic decision graph terminating in a TRUE or FALSE terminal node. At each decision node, the branch corresponding to the variable evaluation is taken (true/false, a.k.a high/low). Once a BDD terminal node is reached, that node represents the evaluation of the formula under the given variable assignment. To maintain a canonical BDD representation that allows one to determine formula equivalence via graph isomorphism, one must maintain a variable order for all decision nodes and maintain the BDD in reduced form. BDD reduction requires that two properties be maintained: 1. There are only two distinct terminal nodes TRUE and FALSE and no two distinct decision nodes have the same high and low branches (these properties can be maintained via hash tables). 2. Any node having the same child node on its high and low branches is replaced with its child node. The first rule amounts to an efficient, non-redundant representation for BDDs. We note that this rule is not required to show soundness or completeness of BDD-based theorem proving (where the goal is to directly prove or refute a theorem) but it is required to achieve a canonical graph otherwise. The second rule performs all of the logicaldeduction. For insight into the power of this deduction, see Figure 1. In general we note that the BDD provides an efficient way to store both CNF and DNF formula. In addition, the reduction rules amount to performing refutation resolution for CNF theories and an analogous rule for direct-proof in DNF theories. 1.2 Directional resolution Directional resolution [2] is the bucket elimination algorithm [3] applied to the DavisPutnam resolution theorem proving procedure [4]. It essentially amounts to resolving all clauses containing a variable, eliminating that variable, and propagating all remaining clauses to the next variable in the ordering. As for all bucket elimination algorithms, this algorithm has worst-case performance that is exponential in tree-width induced by the variable ordering. An example of directional resolution is given in Figure 2. 2 Refutation-complete BDDs As noted in Figure 1, the standard BDD algorithms are performing a great deal of unneeded computation if we are only seeking to show unsatisfiability. Specifically, we need not retain the CNF representation of any formula that could not possibly be resolved against in the future. This is the motivation for using variable elimination in the directional resolution algorithm and it can be easily extended to BDDs. We call this extension refutation-complete BDDs (RCBDDs) since they combine the representation of BDDs with the refutationcompleteness of directional resolution. 2.1 Algorithm If we examine Figure 2, we see that we can draw a direct correspondence between directional resolution and BDD algorithms if we note that the CNF formula at each step are represented by the distinct paths to the FALSE terminal node. The basic BDD algorithm already takes care of the resolution rule as noted in Figure 1, so we need only add the variable elimination procedure of directional resolution to this process. We can do this easily by pruning out elimated variables and replacing them with TRUE as demonstrated in Figure 2. This pruning step does require extra overhead to reduce the RCBDD to canonical form, but it removes a lot of unnecessary structure that should save a great deal of future computation.