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.
4.2. DECISION PROCEDURES FOR PRESBURGER ARITHMETIC<br />
Another technique to m<strong>in</strong>imize the number of literals <strong>in</strong>side quantifier alternation<br />
is elim<strong>in</strong>at<strong>in</strong>g blocks of quantifiers [5]. Based on the follow<strong>in</strong>g rule:<br />
δ∨<br />
∃x 1 ...x n−1 .<br />
j=1(F ′ −∞(x 1 ...x n−1 , j) ∨ ∨ F ′ (x 1 ...x n−1 , b + j))<br />
b∈B<br />
δ∨<br />
≡ 1 ...x n−1 .F<br />
j=1(∃x ′ −∞(x 1 ,...,x n−1 , j) ∨ ∨ ∃x 1 ...x n−1 .F ′ (x 1 ...x n−1 , b + j))<br />
b∈B<br />
we can see that after each quantifier alternation, only 1 + |B| formulas need to be<br />
exam<strong>in</strong>ed <strong>in</strong> the next iteration. Therefore, remov<strong>in</strong>g a series of quantifiers does not<br />
<strong>in</strong>crease sizes of quantify<strong>in</strong>g formulas.<br />
Due to the huge time complexity of PA, many heuristics are <strong>in</strong>corporated to deal<br />
with subsets of PA. For example, for PA fragments with universal quantifiers only,<br />
aheuristicis<strong>in</strong>validat<strong>in</strong>g∀x.F(x) withaparticularfalse <strong>in</strong>stance F(c) [17];some<br />
ground values of the formula have been <strong>in</strong>stantiated to quickly decide the formula.<br />
AvariantofCooper’sprocedurewiththissimpletechniqueistested<strong>in</strong>10000r<strong>and</strong>omly<br />
generated formulas <strong>and</strong> shown to outperform some other decision procedures.<br />
Another heuristic is solv<strong>in</strong>g a set of divisibility constra<strong>in</strong>ts [5]. When elim<strong>in</strong>at<strong>in</strong>g<br />
quantifiers, formulas could be represented symbolically, but they have to be exp<strong>and</strong>ed<br />
for evaluation. And this expansion is expensive on even a small problem;<br />
the idea of solv<strong>in</strong>g divisibility constra<strong>in</strong>ts is <strong>in</strong>stead of exp<strong>and</strong><strong>in</strong>g big disjuncts by<br />
all possible assignments, only assignments which satisfy divisibility constra<strong>in</strong>ts are<br />
<strong>in</strong>stantiated. This heuristic is relevant because each quantifier alternation generates<br />
anewdivisibilityconstra<strong>in</strong>t<strong>in</strong>bigdisjuncts.<br />
4.2.2 The Omega Test<br />
The Omega Test proposed by Pugh [27] is an extension of Fourier-Motzk<strong>in</strong> variable<br />
elim<strong>in</strong>ation to check dependence analysis <strong>in</strong> a production compiler. It consists of<br />
aprocedureforelim<strong>in</strong>at<strong>in</strong>gequalities<strong>and</strong>elementsfordecid<strong>in</strong>gsatisfiabilityofa<br />
conjunction of weak <strong>in</strong>equalities. Three elements of the Omega Test are the Real<br />
Shadow, theDark Shadow <strong>and</strong> the Gray Shadow which are summarized <strong>in</strong> Figure<br />
4.1.<br />
Real Shadow<br />
The Real shadow is an overapproximat<strong>in</strong>g projection of the problem, <strong>and</strong> it is used<br />
for check<strong>in</strong>g unsatisfiability [18]:<br />
∃x. β≤ bz ∧ cz ≤ γ =⇒ cβ ≤ bγ<br />
If the Real shadow i.e. the equation cβ ≤ bγ does not hold, there is no real solution,<br />
hence there is no <strong>in</strong>teger solution for the problem.<br />
31