a modern C++ library for the manipulation of Boolean functions
a modern C++ library for the manipulation of Boolean functions
a modern C++ library for the manipulation of Boolean functions
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
onto nfalse if a(nvar) = 0, o<strong>the</strong>rwise a(nvar) = 1 and we move onto ntrue. If we reach <strong>the</strong><br />
0 node <strong>the</strong>n f(a) = 0, o<strong>the</strong>rwise we reach <strong>the</strong> 1 node and f(a) = 1. The semantics,<br />
according to [BS98], can be <strong>for</strong>mally defined by a function which maps each ROBDD into<br />
<strong>the</strong> represented <strong>Boolean</strong> function:<br />
Definition 6. (Semantics <strong>of</strong> ROBDDs.) The function ·D : D → F is given, <strong>for</strong> each<br />
(r, N) ∈ D, by<br />
⎧<br />
⎪⎨ ⊥, if r = 0;<br />
def<br />
(r, N) = ⊤,<br />
D <br />
if r = 1;<br />
⎪⎩ rvar ∧ (rtrue, Ntrue) <br />
∨ ¬rvar ∧ (rfalse, Nfalse) <br />
, o<strong>the</strong>rwise.<br />
D<br />
For <strong>the</strong> sake <strong>of</strong> simplicity, we will sometimes write (r) D instead <strong>of</strong> (r, N) D.<br />
2.2 ROBDD properties<br />
2.2.1 Canonicity<br />
Theorem 2. (Canonicity <strong>of</strong> ROBDDs.) Given a fixed variable ordering ≺, we have<br />
that <strong>for</strong> each f ∈ F <strong>the</strong>re exists one and only one ROBDD (r, N) ∈ D such that<br />
(r, N) D = f.<br />
Pro<strong>of</strong>. See [Bry86].<br />
This has many important consequences <strong>for</strong> <strong>the</strong> CORAL implementation: <strong>for</strong> example,<br />
we have that two <strong>Boolean</strong> <strong>functions</strong> are identical if and only if <strong>the</strong>y are represented by<br />
<strong>the</strong> same ROBDD. CORAL keeps only one copy <strong>of</strong> each ROBDD into memory, so that<br />
equality test on ROBDDs can be per<strong>for</strong>med simply by comparing <strong>the</strong>ir memory addresses.<br />
2.2.2 Influence <strong>of</strong> variable ordering<br />
The number <strong>of</strong> nodes <strong>of</strong> ROBDDs is extremely critical <strong>for</strong> <strong>the</strong> efficiency <strong>of</strong> <strong>the</strong> algorithms<br />
used to manipulate <strong>the</strong>m, and <strong>the</strong> size <strong>of</strong> <strong>the</strong> ROBDD which represents a particular<br />
<strong>Boolean</strong> function may vary depending on <strong>the</strong> chosen variable ordering. Un<strong>for</strong>tunately, <strong>for</strong><br />
any fixed variable ordering, it is possible to find some <strong>Boolean</strong> <strong>functions</strong> such that <strong>the</strong>ir<br />
representative ROBDD’s size is exponential in <strong>the</strong> number <strong>of</strong> variables. For example,<br />
Bryant has verified in [Bry92] that while ROBDDs <strong>for</strong> symmetric <strong>Boolean</strong> <strong>functions</strong> may<br />
have sizes that range from being linear to quadratic in <strong>the</strong> number <strong>of</strong> variables depending<br />
on <strong>the</strong> chosen ordering, yet ROBDDs <strong>for</strong> <strong>functions</strong> representing integer addition may range<br />
from linear to exponential; <strong>for</strong> integer multiplication we even have exponentiality <strong>for</strong> all<br />
variable orderings. This is why some ROBDD implementations have built-in mechanisms<br />
<strong>for</strong> changing variable ordering dynamically, relying <strong>for</strong> example on heuristical analysis.<br />
CORAL instead uses fixed variablable ordering and relies on o<strong>the</strong>r mechanisms (which<br />
will be discussed later) <strong>for</strong> <strong>the</strong> purpose <strong>of</strong> keeping <strong>the</strong> ROBDDs as small as possible. In<br />
Figure 2.2 we give an example <strong>of</strong> two ROBDDs representing <strong>the</strong> same <strong>Boolean</strong> function<br />
(x1 ∧ y1) ∨ (x2 ∧ y2) ∨ (x3 ∧ y3) using two different variable orderings.<br />
2.2 ROBDD properties 7<br />
D