27.09.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

An even more exotic class <strong>of</strong> <strong>functions</strong><br />

The conj algorithm takes a set <strong>of</strong> variables V = <br />

v1, v2, . . . vn as its argument and<br />

builds <strong>the</strong> ROBDD <strong>for</strong> <strong>the</strong> <strong>Boolean</strong> function that evaluates to false if and only if one<br />

and only one variable in V is false. This function can be viewed as:<br />

(v0 ⇐= v1 ∧v2 ∧. . .∧vn)∧(v1 ⇐= v0 ∧v2 ∧. . .∧vn)∧. . .∧(vn ⇐= v0 ∧v1 ∧. . .∧vn−1)<br />

Since we must conjunct a set <strong>of</strong> clauses, we start by building <strong>the</strong> ROBDD <strong>for</strong> <strong>the</strong> first<br />

clause, <strong>the</strong>n we build <strong>the</strong> ROBDD <strong>for</strong> <strong>the</strong> second one and conjunct it with <strong>the</strong> first one<br />

using and_ite, <strong>the</strong>n we conjunct <strong>the</strong> result with <strong>the</strong> ROBDD <strong>for</strong> <strong>the</strong> third one and so on.<br />

The only problem we still have to solve is how to build <strong>the</strong> ROBDD <strong>for</strong> a <strong>Boolean</strong><br />

function <strong>of</strong> type v ⇐= t1 ∧ t2 ∧ . . . ∧ tn. As with <strong>the</strong> two previous algorithms, <strong>the</strong> solution<br />

is trivial when <strong>the</strong> implied variable is greater than all <strong>the</strong> o<strong>the</strong>rs: <strong>the</strong> result is simply a<br />

ROBDD whose root is labeled with v, has 1 as its true successor and has <strong>the</strong> ROBDD<br />

<strong>for</strong> ¬t1 ∨ ¬t2 ∨ . . . ∨ ¬tn as its false successor. So we start as usual by considering only<br />

<strong>the</strong> greater variables and building <strong>the</strong> corresponding ROBDD; afterwards we handle <strong>the</strong><br />

smaller variables as shown in Algorithm 21.<br />

3.2 ROBDD algorithms 32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!