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.
7.1. A PARALLEL VERSION OF COOPER’S ALGORITHM<br />
•Parallelexecutionisdoneuntilacerta<strong>in</strong>depth.<br />
•Sizeofformulas(numberofliterals)canbeusedtodividetasksrunn<strong>in</strong>g<strong>in</strong><br />
parallel.<br />
•Anoperationisdonesequentiallyifthesizeofabranchistoosmallfor<br />
parallelism.<br />
We have done an experiment with parallel execution on a b<strong>in</strong>ary tree <strong>and</strong> present<br />
results <strong>in</strong> the next section.<br />
7.1.3 Experimental Results<br />
We have a version of b<strong>in</strong>ary tree <strong>and</strong> a parallel map function <strong>and</strong> we attempt to<br />
measure speedups on different oWorkload functions:<br />
type B<strong>in</strong>Tree =<br />
| Leaf of <strong>in</strong>t<br />
| Node of B<strong>in</strong>Tree ∗ B<strong>in</strong>Tree<br />
let pmap depth oWorkload tree =<br />
let rec pmapUtil t d =<br />
match t with<br />
| Leaf(n) −> if oWorkload(n) then Leaf(1) else Leaf(0)<br />
| _whend=0−> map oWorkload t<br />
| Node(t1, t2) −><br />
let t1’ =Task.Factory.StartNew( fun() −> pmapUtil t1 (d−1))<br />
let t2’ =Task.Factory.StartNew( fun() −> pmapUtil t2 (d−1))<br />
Task.WaitAll(t1’, t2’)<br />
Node(t1’.Result, t2’.Result)<br />
pmapUtil oWorkload tree depth<br />
Workload functions are simple for-loops runn<strong>in</strong>g a specified number of times:<br />
// Workload functions<br />
val oConstant : <strong>in</strong>t −> bool<br />
val oLog : <strong>in</strong>t −> bool<br />
val oL<strong>in</strong>ear : <strong>in</strong>t −> bool<br />
Figure 7.2 shows that speedup factors are really bad when workloads are not<br />
heavy enough <strong>and</strong> a good speedup of 6× is obta<strong>in</strong>ed with a rather big workload.<br />
Consider our scenario of manipulat<strong>in</strong>g <strong>Presburger</strong> formulas, trees are of big size<br />
but tasks at each node are t<strong>in</strong>y, <strong>and</strong> at most we manipulate small Terms by their<br />
arithmetic operations. Therefore, it hardly pays off if we try to parallelize every<br />
operation on Formula.<br />
The experiment with Cooper elim<strong>in</strong>ation is performed on 10 Pigeon-Hole <strong>Presburger</strong><br />
formulas (see Section 6.1 for their construction), <strong>and</strong> each of them consists of<br />
32 disjunctions which can be resolved <strong>in</strong> parallel. Their properties are summarized<br />
<strong>in</strong> Table 7.1.<br />
53