29.04.2014 Views

Presburger Arithmetic and Its Use in Verification

Presburger Arithmetic and Its Use in Verification

Presburger Arithmetic and Its Use in Verification

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7.<br />

PARALLEL EXECUTION OF DECISION PROCEDURES<br />

We analyze the algorithm <strong>in</strong> a case of our specific <strong>in</strong>put. We have a quantified<br />

formula with k quantifiers <strong>and</strong> a conjunctions of m literals <strong>and</strong> n disjunctions of<br />

two literals. As discussed above, the correspond<strong>in</strong>g formula <strong>in</strong> DNF consists of 2 n<br />

conjunctions of (m + n) literals. Exam<strong>in</strong><strong>in</strong>geachconjunctionseparately,eachquantifier<br />

elim<strong>in</strong>ation step causes a product between two lists of size (m+n). Therefore,<br />

we have a worst-case complexity of Θ((m + n) 2k ). Certa<strong>in</strong>ly, this does not happen<br />

often <strong>in</strong> practice, if one of these lists is empty we have size of new conjunctions<br />

rema<strong>in</strong><strong>in</strong>g l<strong>in</strong>ear of m + n. The worst-case complexity of the whole procedure is<br />

Work = Θ(2 n (m + n) 2k ). Analyz<strong>in</strong>g the algorithm by the DAG model of multithread<strong>in</strong>g,<br />

Span = Θ((m + n) 2k ), <strong>and</strong> we have Parallelism Factor of Θ(2 n ). We can say this<br />

one is an <strong>in</strong>stance of embarrass<strong>in</strong>gly-parallel algorithms, <strong>and</strong> its parallelism is only<br />

bounded by the number of used processors.<br />

Regard<strong>in</strong>g specific implementation details, we have written two different versions<br />

of the algorithm: one is List-based <strong>and</strong> one is Array-based. Wewanttoexam<strong>in</strong>e<br />

performance of List <strong>and</strong> Array <strong>in</strong> the context of parallel execution although it<br />

requires a little effort to translate from List-based version to Array-based one.<br />

Certa<strong>in</strong>ly, with each version we implement a parallel variant <strong>and</strong> a sequential one.<br />

They are runn<strong>in</strong>g on the same codebase, there are only some small differences<br />

regard<strong>in</strong>g parallelism constructs. In the next section, we present our experiment on<br />

asmalltestset<strong>and</strong>someconclusionsaboutthealgorithm<strong>and</strong>itsparallelexecution.<br />

7.2.3 Experimental Results<br />

We create a testset from consistency predicates of N-sequence automata <strong>in</strong> Figure<br />

6.1. For each automaton <strong>in</strong> 3-sequence, 4-sequence <strong>and</strong> 5-sequence automata, we<br />

select five arbitrary consistency predicates. Therefore, we have a testset of 15 <strong>Presburger</strong><br />

formulas ordered by their number of quantifiers <strong>and</strong> their size. We notice<br />

that each consistency predicates is a conjunction between literals <strong>and</strong> disjunctions<br />

which <strong>in</strong> turn conta<strong>in</strong> two literals, characteristics of the testset are summarized <strong>in</strong><br />

Table 7.3.<br />

Automaton Quantifiers Literals Disjunctions<br />

3-seq 3 8 5<br />

4-seq 6 13 7<br />

5-seq 10 19 9<br />

Table 7.3. Test set for the Omega Test.<br />

From the table we can see that at most the procedure resolves 2 5 ,2 7 or 2 9 Omega<br />

Tests <strong>in</strong> parallel. Because these numbers are usually bigger than the number of<br />

hardware threads, us<strong>in</strong>g some work balanc<strong>in</strong>g mechanisms would benefit the whole<br />

procedure. In the List-based version, work balanc<strong>in</strong>g is done by PLINQ eng<strong>in</strong>e<br />

without users’ <strong>in</strong>tervention. In our Array-based variant, we have more control<br />

over distribution of work on different cores. Here we use a partition<strong>in</strong>g technique<br />

which divides work <strong>in</strong>to balanced chunks for the execut<strong>in</strong>g operation.<br />

58

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

Saved successfully!

Ooh no, something went wrong!