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.

more. Formally, given m composite representations 〈n1, E1, D1, L1〉, . . . , 〈nm, Em, Dm, Lm〉,<br />

<strong>the</strong>ir conjunction can be computed, <strong>for</strong> each i ∈ N : 1 ≤ i ≤ m, by:<br />

〈n ′ i, E ′ i, D ′ i, L ′ i〉 = η ni,<br />

m m m<br />

Ej, Dj,<br />

j=1<br />

j=1<br />

j=1<br />

<br />

Lj ,<br />

〈n1, E1, D1, L1〉 ∧ . . . ∧ 〈nm, Em, Dm, Lm〉 = η m <br />

n ′ m<br />

j, E ′ m<br />

j, D ′ m<br />

j,<br />

j=1<br />

j=1<br />

j=1<br />

j=1<br />

L ′ <br />

j .<br />

The actual implementation, in fact, does not utilize this exact expression: whenever we<br />

per<strong>for</strong>m normalization (except, <strong>of</strong> course, <strong>the</strong> final normalization) we actually avoid looking<br />

<strong>for</strong> all entailed, disentailed and equivalent variables in <strong>the</strong> ROBDDs; instead we just<br />

reduce <strong>the</strong> current ROBDD using <strong>the</strong> in<strong>for</strong>mation on entailed, disentailed and equivalent<br />

variables that we have collected so far by using algorithms elim_search_true_vars,<br />

elim_search_false_vars and rename. If elim_search_true_vars or<br />

elim_search_false_vars find new entailed or disentailed variables <strong>the</strong>n <strong>the</strong>y are added<br />

to <strong>the</strong> sets <strong>of</strong> collected variables. We also conjunct each ROBDD immediately after this<br />

partial reduction instead <strong>of</strong> reducing <strong>the</strong> remaining ones be<strong>for</strong>e.<br />

4.2.4 Disjunction<br />

Given <strong>the</strong> same arguments as conjunction, disjunction can be per<strong>for</strong>med as:<br />

where:<br />

〈n1, E1, D1, L1〉 ∨ 〈n2, E2, D2, L2〉 = 〈n ′ 1 ∨ n ′ 2, E1 ∩ E2, D1 ∩ D2, L ′ 1 ∨ L ′ 2〉<br />

L ′ 1 = L1 ∧<br />

L ′ 2 = L2 ∧<br />

<br />

(x,y)∈E1\E2<br />

x≺y<br />

<br />

(x,y)∈E2\E1<br />

x≺y<br />

(x, y) ∧<br />

(x, y) ∧<br />

<br />

(x,y)∈D1\D2<br />

x≺y<br />

<br />

(x,y)∈D2\D1<br />

x≺y<br />

(x, y) ,<br />

(x, y) ,<br />

E ′ 1 = λL ′(x) <br />

′<br />

x ∈ E1 \ E2 , E 2 = λL ′(x) <br />

x ∈ E2 \ E1 ,<br />

D ′ 1 = λL ′(x) <br />

′<br />

x ∈ D1 \ D2 , D 2 = λL ′(x) <br />

x ∈ D2 \ D1 ,<br />

L ′′<br />

1 = (L ′ 1 \ L ′ 2) ∨ L1, L ′′<br />

2 = (L ′ 2 \ L ′ 1) ∨ L2,<br />

n ′ 1 = n1 ∧ <br />

x∈E ′ 1<br />

n ′ 2 = n2 ∧ <br />

x∈E ′ 2<br />

x ∧ <br />

x∈D ′ 1<br />

x ∧ <br />

x∈D ′ 2<br />

x ∧ <br />

(x,y)∈L ′′<br />

1<br />

x ∧ <br />

(x,y)∈L ′′<br />

2<br />

x ⇔ y,<br />

x ⇔ y.<br />

(recall that <strong>the</strong> ∨ operator on equivalence relations represents <strong>the</strong>ir intersection). If <strong>the</strong><br />

two arguments were already normalized, <strong>the</strong>n it is proven that <strong>the</strong> result <strong>of</strong> <strong>the</strong> application<br />

<strong>of</strong> this algorithm will be already normalized (o<strong>the</strong>rwise a fur<strong>the</strong>r call to <strong>the</strong> normalization<br />

operator is required).<br />

4.2 Algorithms with composite representations 41

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

Saved successfully!

Ooh no, something went wrong!