Presburger Arithmetic and Its Use in Verification
Presburger Arithmetic and Its Use in Verification
Presburger Arithmetic and Its Use in Verification
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
CHAPTER 7.<br />
PARALLEL EXECUTION OF DECISION PROCEDURES<br />
parallel elim<strong>in</strong>ation is based on follow<strong>in</strong>g rules where formulas are <strong>in</strong> NNF:<br />
∃ x 1 ...x n . ∨ i<br />
∀ x 1 ...x n . ∧ i<br />
F i ≡ ∨ i<br />
F i ≡ ∧ i<br />
∃ x 1 ...x n .F i (7.1)<br />
∀ x 1 ...x n .F i (7.2)<br />
However, for arbitrary NNF formulas, the degree of parallelism may be limited<br />
because of small disjunctions (or conjunctions). One way to enhance concurrency is<br />
convert<strong>in</strong>g formulas <strong>in</strong>to DNF. Normally a DNF formula is <strong>in</strong> a form of a huge disjunction<br />
of many <strong>in</strong>ner conjunctions <strong>and</strong> quantifier elim<strong>in</strong>ation can be distributed to<br />
<strong>in</strong>ner conjunctions immediately. Because conversion <strong>in</strong>to DNF causes the formula’s<br />
size to grow very fast, we only do DNF conversion once at the outermost level of<br />
quantifiers.<br />
Because there are still some cases where DNF formulas do not expose enough<br />
concurrency, we seek concurrency <strong>in</strong>side the procedure. First, due to recursive<br />
nature of <strong>Presburger</strong> formulas, these formulas are represented by tree data structures.<br />
Certa<strong>in</strong>ly we can manipulate these formulas by do<strong>in</strong>g operations on tree <strong>in</strong><br />
aparallelmanner,forexample,do<strong>in</strong>gparallelevaluationoftreebranches.Second,<br />
certa<strong>in</strong> parts <strong>in</strong> quantifier elim<strong>in</strong>ation could be done <strong>in</strong> parallel. As can be seen<br />
from Figure 7.1, Get Coefficients, Get A-Terms <strong>and</strong> Get B-Terms have no order<br />
of execution. We are able to create three Tasks to run them concurrently. Similarly<br />
Least Satisfy<strong>in</strong>g Assignment <strong>and</strong> Small Satisfy<strong>in</strong>g Assignments could<br />
be calculated <strong>in</strong> parallel. The figure preserves relative ratios between sizes of different<br />
tasks where Small Satisfy<strong>in</strong>g Assignments is the largest task (it consists of<br />
|B| (or |A|) timessubstitutionofavariablebyaterm<strong>in</strong>theformula)<strong>and</strong>Elim<strong>in</strong>ate<br />
Variable is a very lightweight task where we assemble different results. Assum<strong>in</strong>g<br />
that the number of B-Terms are always smaller than that of A-Terms, we have<br />
aroughestimationofparallelismbasedontheDAG model of multithread<strong>in</strong>g as<br />
follows:<br />
•AssumethatElim<strong>in</strong>ate Variable is an <strong>in</strong>significant task <strong>and</strong> omit it.<br />
•Estimateeachtaskbythenumberoftraversalsthroughthewhole<strong>Presburger</strong><br />
formula.<br />
• Work = 1 + 1 + 1 + 1 + 1 + |B| = |B| + 5<br />
• Span = 1 + 1 + 1 = 3<br />
• Parallelism Factor =(|B| + 5)/3<br />
Roughly speak<strong>in</strong>g, Parallelism Factor is bounded by (|B| + 5)/3, sowecanhardly<br />
achieve a good speedup if the number of B-Terms (or A-Terms) is too small. Actually<br />
the number of terms is quite small due to symbolic representation of big<br />
disjuncts <strong>and</strong> the choice of the smallest number of terms <strong>in</strong> projection which leads<br />
to limited concurrency <strong>in</strong> each elim<strong>in</strong>ation step. One <strong>in</strong>terest<strong>in</strong>g th<strong>in</strong>g is after each<br />
50