Boolean Ring Satisfiability: Abstract
Boolean Ring Satisfiability: Abstract
Abstract. We propose a method for testing satisfiability based on Boolean rings. It makes
heavy use of simplification, but avoids the potential size increase associated with application
of the distributive law by employing a combined linear and binomial representation. Several
complexity results suggest why the method may be relatively effective in many cases. The
framework is also amenable to learning from intersections, as in Stålmarck’s method. Some
experiments have been undertaken.
1 Introduction
Simplification has been used successfully in recent years in the context of theorem proving. This
process is based on a well-founded notion of “simplicity”, under which one can delete intermediate
results that follow from known (or yet to be derived) simpler facts. Simplifying as much as pos-
sible at each stage can greatly reduce storage requirements. Simplification-based theorem-proving
strategies, as in the popular term-rewriting approach, have been used to solve some difficult prob-
lems in mathematics, including the long-open Robbins Algebra Conjecture [12]. For term rewriting
in automated deduction, see [6].
A natural way of incorporating simplification in propositional reasoning is to use the Boolean-
ring (BR) formalism. Boolean rings obey the following identities:
xx =x x0 = 0 x1 = x
x +x =0 x +0 = x −x = x
xy = yx (xy)z = x(yz)
x+y = y + x (x + y) + z = x + (y + z) x (y +z ) = xy +xz
to why the proposed method may be efficient. Then (in Section 7) we apply the Boolean-ring
representation in a framework—akin to Stålmarck’s method [14] and recursive learning [11]—that
includes computing the intersection of sets of formulæ. Preliminary experimental results may be
found in Section 8. This is followed by some brief comments.
2 Satisfiability
3 Simplification
To counter the certain exponential cost of naı̈ve realizations of satisfiability methods, simplification
at intermediate stages is of paramount importance. Database entries are replaced with simpler ones
(in some well-founded sense) by making polynomial-time inferences and deleting now-redundant
formulæ. Such steps reduce the likelihood of suffering from the potentially exponential aspect of
the approach (be it case analysis, splitting, merging, or distribution).
Regardless of the method, it is helpful to make cheap and valuable deductions—which may
enable additional simplifications—as early as possible. In particular, virtually all approaches employ
some mechanism for detecting “necessary” assignments. Simplification rules used in DPL and
OBDD provers [3] include tautology, unit (BCP), pure literal, subsumption, and failed literal. (In
practice, tautology and pure-literal are often omitted.) In the search approach, after assigning 0
Boolean Ring Satisfiability 283
4 Representation
We argue that Boolean rings are an especially convenient framework for simplification. As men-
tioned already, distributivity is the potentially expensive step (even when directed acyclic graphs
are used for shared subterms). We propose a new representation that circumvents this problem.
A linear equation (over Z2 ) is a Boolean equation in which each monomial is either a single
variable or a constant; it takes the form x1 + · · · + xn = 1 or x1 + · · · + xn = 0, where the xi
are distinct propositional variables. A binomial equation is a Boolean equation with at most two
monomials, that is, an equation of one of the three forms: P = Q, P = 0, or Q = 1, where P and
Q are products of distinct propositional variables (distinct on account of idempotence). Simple
equations, x = 0, y = 1, or x = y, for propositional variables x, y, as well as degenerate equations,
0 = 0, 1 = 1, or 1 = 0, will be considered both linear and binomial.
Let B be a set of binomial equations and L be a set of linear equations over the propositional
variables. Instead of solving a general set of Boolean-ring equations (e.g. xy + x + y = 0 implies
x = 0 and y = 0), we will decide the satisfiability of B ∪ L. Simplification by B of L, and vice-versa,
will be severely limited.
Given a system R = B ∪ L and an ordering > on monomials, inference proceeds as follows:
1. Termination Test. If 1 = 0 has been inferred, the system is unsatisfiable.
2. Tautology Deletion. Remove all trivial equations A = A.
3. Decomposition. Decompose any equation x1 x2 · · · xk = 1 in B into x1 = 1,. . . , xk = 1.
4. Unit Rule. Use all unit equations of the form x = 0 or x = 1 in R to simplify equations in R.
5. Equivalence Rule. If two variables are equated, x = y, replace one by the other throughout R.
6. Simplification. Inter-reduce one equation by another within B and within L.
7. Splitting. Split the system of equations by considering, R ∪ {x = 1} and R ∪ {x = 0}, individ-
ually and recursively, for some propositional variable x appearing in R.
Equations in B and L are processed independently, except for the Unit Rule and Equivalence
Rule. Splitting on x and applying the unit rule eliminates x from both B ∪ {x = 1} ∪ L and
B ∪ {x = 0} ∪ L. One advantage of this mixed representation is that relatively fast methods exist
for processing each of the two components (see Section 6). The Simplification step is not needed
for completeness, but rather to improve search efficiency. The choice of ordering > is flexible: It
may prefer short monomials, to keep equations short, or long ones, to maximize the likelihood of
a simplifier applying.
The method presented above is complete for propositional reasoning (Theorem 3 below). Soft-
ware is available to handle the computations within each of the two sets, B and L. Distributivity
is not needed when simplifying Boolean terms, because equations in L are not used to simplify B,
so formulæ do not grow very large, as in more conventional Boolean-ring based methods.
Example 1. Suppose we want to prove the validity of the formula
(p ∨ q) ∧ (q̄ ∨ s) ∧ (s̄ ∨ p) ∧ (p̄ ∨ r) ∧ (r̄ ∨ p̄ ∨ t) ⇒ (t ∧ r).
In order to represent the clause p ∨ q, a new variable u for p̄ is required. The clausal form of its
negation, written as Boolean equations, is as follows:
(1) qs = q (2) sp = s (3) prt = pr (4) rt = 0 (5) p + u = 1 (6) qu = u (7) pr = p
Eq. (4) simplifies (3) to pr = 0, which, in turn, simplifies (7) to p = 0. This invokes the Unit
Rule, and (2,5) become s = 0 and u = 1, which simplify (1) to q = 0. Finally, u = 1 and q = 0
simplify (6) into the contradiction 1 = 0, concluding the proof (sans splits). t
u
284 Nachum Dershowitz et al.
5 Cross Fertilization
It is advantageous to allow some “cross fertilization” between B and L, so that useful equations
can migrate from one set to the other. Consider a linear equation x + y + z = 1. By assigning 1
to variables x and y, the equation reduces to z = 1, since the even number of 1’s cancelled each
other. Thus, we may conclude that the binomial equation xyz = xy is a logical consequence. In
general, a linear equation y1 + y2 + · · · + yk = c, implies the binomial y1 y2 · · · yk = 0, if either
k is even and c = 1, or k odd and c = 0. In the remaining two cases, it implies k binomials
y1 y2 · · · yk = y1 y2 · · · yk−1 . We emphasize that every linear equation can breed some binomial
equation(s). If we have w + x + y = 0 and x + y + z = 1 in L, we can add wxy = 0, xyz = xy,
xyz = xz, and xyz = yz to B. More interestingly, the sum of the two linear equations is w + z = 1,
which implies wz = 0.
Additional simplifications within B are also possible. Suppose we have M P = QR and M Q = 0,
where M, P, Q, R are monomials. Since either M or Q equals 0, it is evident that either M P or
QR equals 0. However, M P = QR; hence both must be 0. Therefore, we can use M Q = 0 to
reduce M P = QR to two equations, M P = 0 and QR = 0. This is an example of a critical pair
computation [6], which results—after simplification—in smaller equations. In general, entailment
of equations in either B or L alone is cheap (cf. Theorems 1, 2 below).
In practice, it is better when short equations are derived. A shorter equation has more chance
to simplify others, and after performing simplification, the shorter equations may be retained more
economically.
7 Intersection Method
The innovative approach of Stålmarck’s Prover [14] has been used successfully for testing satisfia-
bility of several large-scale industrial problems. The core idea is to learn as much as possible from
case splits. Such saturate-by-intersection methods (also [11]) proceed via iterative deepening:
1. Perform cheap (i.e. polynomial) inferences. Check if done.
2. Choose a variable to split on; recur on each case.
3. If either case succeeds, then done; otherwise, merge results.
4. If something learned, add it to formulæ and reset the list of variables.
5. If no unsplit variables remain, increase depth up to current bound;
otherwise, continue at same depth.
6. Repeat with incremented bound on maximum depth.
By “merging”, we mean looking for consequences that hold in both cases. Since the process is
repeated whenever new formulæ are learned, the search can involve a much larger than necessary
total number of splits.
Formulæ in [14] are represented as “triplets”, of the form x ⇔ y ∧ z, where x, y, z are proposi-
tional variables, which is just the binomial x = yz in BR. We have implemented such a scheme for
the full Bin-Lin representation (see the next section). The low complexity of inference for either
binomials or linear equations means that one can tractably test for small shared simplifiers, even
if they do not appear explicitly in B or L.
8 Results
The degree to which simplification and learning can sometimes reduce the number of splits needed in
a backtrack search is the main practical question. In our initial experiments with an implementation
of a naı̈ve Boolean-ring-based search method (of Section 2), the number of splits was reduced
by 30% [10]. This saving, however, came at the price of time-consuming simplification, mainly
because—in that implementation—distributivity was needed, which is not the case with the method
proposed here.
We implemented the intersection method of the previous section (in about 5K lines of C++ ),
using the Bin-Lin representation of Section 4, and incorporating conflict learning (but no other
DPL improvements). We ran the program on 700 real-life hardware verification examples and
observed a reduction of about 30% in the number of the splits when intersections were computed.
Table 1 displays some representative results. Despite the heavy cost of merging, there was an
overall average reduction of 3% in run time, since merging often produces simplifiers that greatly
reduce the need for splitting. Although our experiments to date included only 5–10 input variables,
the number of intermediates sometimes exceeded 100, due to the need for temporary variables to
convert to the Bin-Lin representation. The code wasn’t designed to be competitive in terms of
performance; thus constant propagation over the Bin-Lin system was noticeably time consuming.
(For this reason, we could not perform larger tests within the allotted 5-minute timeout.)
In these tests, as the complexity of the problem increased, the reduction in splits improved.
This trend can be seen in the above table, and may be explained by the higher probability of
obtaining new facts in the intersection.
286 Nachum Dershowitz et al.
9 Discussion
Simplification is more time-consuming than splitting on a variable or evaluating a truth-assignment.
Splitting a variable can usually be carried out in linear time, but we know of no linear-time algo-
rithm for checking or performing simplification. (A polynomial simplification algorithm is straight-
forward, simply trying all possible pairs of input equations.)
Besides the ease of incorporating simplification, Boolean rings are a suitable representation for
preprocessing for the following reason: Let C be the set of Boolean formulæ over all binary and
unary operations, D be over {∨, ∧, ¯}, and G over {1, +, ∧}. As shown in [9], any formula in C
is linearly reducible to one in G, but may not be linearly reducible to one in D. Hence, Boolean-
ring formulæ can preserve the structure of any Boolean formulæ, while Boolean algebra requires
additional variables. This ability to preserve structure is also important for Stålmarck’s method
(cf. Section 7), which is sensitive to the structure of the input formula.
Nilpotence of + makes it possible to express parity succinctly as a linear equation in the
Boolean ring. This feature allows for very simple BR proofs of the pigeon-hole principle and the
mutilated checkerboard. In contrast, in Boolean algebra, the shortest corresponding formula is of
quadratic length, if no new variables are introduced. Introducing new variables normally increases
computational effort.
It should also be interesting to identify additional subclasses of Boolean rings (like Binomial-
BRSAT) for which satisfiability testing can be accomplished by simplification alone, without split-
ting.
References
1. Ben-Sasson, E., and Wigderson, A.: Short proofs are narrow — resolution made simple. Journal of the
ACM 48 (2001) 149–169
2. Bloniarz, P. A., Hunt, H. B., III, and Rosenkrantz, D. J.: Algebraic structures with hard equivalence
and minimization problems. Journal of the ACM 31 (1984) 879–904
3. Bryant, R. E.: Symbolic Boolean manipulation with ordered binary-decision diagrams. ACM Computing
Surveys 24 (1992) 293–318
4. Clegg, M., Edmonds, J., and Impagliazzo, R.: Using the Groebner basis algorithm to find proofs of
unsatisfiability. Proc. 28th ACM Symposium on Theory of Computing (1996) 174–183
5. Davis, M., Logemann, G., and Loveland, D.: A machine program for theorem proving. Communications
of the ACM 5 (1962) 394–397
6. Dershowitz, N., and Plaisted, D. A.: Rewriting. Handbook of Automated Reasoning, Robinson, A.,
and Voronkov, A., eds., vol. 1, chap. 9, Elsevier (2001) 535–610
7. Hsiang, J., and Dershowitz, N.: Rewrite methods for clausal and non-clausal theorem proving. Proc.
10th Intl. Colloquium on Automata, Languages and Programming (Barcelona, Spain), Lecture Notes
in Computer Science 154, Springer-Verlag (1983) 331–346
8. Hsiang, J., and Huang, G. S.: Some fundamental properties of Boolean ring normal forms. DIMACS
Series in Discrete Mathematics and Theoretical Computer Science 35 (1997) 587–602
9. Hsiang, J., and Huang, G. S.: Compact representation of Boolean formulas. Chinese Journal of Ad-
vanced Software Research (1999)
10. Jan, R. L.: Experimental results on propositional theorem proving with Boolean ring. Master’s thesis,
Department of Computer Science and Information Engineering, National Taiwan University (1997)
11. Kunz, W.: Recursive learning: A new implication technique for efficient solutions to CAD problems
— test, verification, and optimization. IEEE Trans. on Computer-Aided Design of Integrated Circuits
and Systems 13 (1994) 1143–1158
12. McCune, W.: Solution of the Robbins problem. Journal of Automated Reasoning 19 (1997) 263-276
13. Marques-Silva, J. P.: Algebraic simplification techniques for propositional satisfiability. Technical
Report RT/01/2000, INESC (2000)
14. Sheeran, M., and Stålmarck, G.: A tutorial on Stålmarck’s proof procedure for propositional logic.
Proc. 2nd Intl. Conference on Formal Methods in Computer-Aided Design, Lecture Notes in Computer
Science 1522, Springer Verlag (1998) 82–99
15. Urquhart, A.: Hard examples for resolution. Journal of the ACM 34 (1987) 209–219