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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 6.<br />

EXPERIMENTS ON PRESBURGER ARITHMETIC<br />

to test with controllably big <strong>in</strong>puts which are particularly helpful <strong>in</strong> context<br />

of parallel execution.<br />

Here we describe our formulation of Pigeon Hole Pr<strong>in</strong>ciple: given N pigeons <strong>and</strong><br />

K holes, if N ≤ K there exists a way to assign the pigeons to the holes where no<br />

hole has more than one pigeon; otherwise, no such assignment exists. Certa<strong>in</strong>ly,<br />

there are many ways to formulate Pigeon Hole Pr<strong>in</strong>ciple <strong>in</strong> logic, here we employ a<br />

very simple <strong>in</strong>terpretation.<br />

Let x ik be the predicate where pigeon i is <strong>in</strong> hole k. ThepredicateF shows that<br />

if pigeon i is <strong>in</strong> the hole k, thereisnootherpigeon<strong>in</strong>thathole:<br />

F(i, k) = x ik ⇒<br />

∧<br />

1≤ j≤ N<br />

j≠i<br />

¬x jk<br />

The predicate G shows that each pigeon is assigned one hole:<br />

∨<br />

G(i) =<br />

x ik<br />

1≤ k≤ K<br />

The predicate H shows that each pigeon is <strong>in</strong> only one hole:<br />

H(i, k) = x ik ⇒<br />

∧<br />

The pr<strong>in</strong>ciple is formulated as follows:<br />

∧<br />

Pigeon(N, K) = F(i, k) ∧<br />

1≤ i≤ N<br />

1≤ k≤ K<br />

1≤ l≤ K<br />

l≠k<br />

∧<br />

1≤ i≤ N<br />

¬x il<br />

G(i) ∧<br />

∧<br />

1≤ i≤ N<br />

1≤ k≤ K<br />

H(i, k)<br />

Accord<strong>in</strong>g to the pr<strong>in</strong>ciple, satisfiability of Pigeon(i, k) iseasydeterm<strong>in</strong>edby<br />

values of N <strong>and</strong> K. Andsizeofthesepredicatescaneasilyscaledbythebigvalues<br />

of arguments which are really helpful for test<strong>in</strong>g <strong>and</strong> optimiz<strong>in</strong>g parallel algorithms.<br />

Up till now we exam<strong>in</strong>e the Pigeon Hole Pr<strong>in</strong>ciple <strong>in</strong> a propositional sett<strong>in</strong>g, to<br />

<strong>in</strong>ject l<strong>in</strong>ear constra<strong>in</strong>ts <strong>and</strong> quantifiers we consider the follow<strong>in</strong>g encod<strong>in</strong>gs:<br />

x ik ←⊤ x ik ≥ 0 x ik = 0 2 | x ik<br />

x ik ←⊥ x ik < 0 x ik ≠ 0 ¬(2 | x ik )<br />

<strong>and</strong> def<strong>in</strong>e quantified formulas <strong>in</strong> the form of ∃x 11 , ..., x NK . Pigeon(N, K). We call<br />

these formulas Pigeon-Hole <strong>Presburger</strong> formulas to attribute their orig<strong>in</strong>s. So these<br />

formulas conta<strong>in</strong> N ∗ K variables <strong>and</strong> N ∗ K quantifiers; we can omit some quantifiers to<br />

adjust the number of quantifiers by our needs. Different encod<strong>in</strong>gs give us different<br />

preferences of constra<strong>in</strong>ts which <strong>in</strong> turn demonstrate some <strong>in</strong>terest<strong>in</strong>g aspects <strong>in</strong><br />

decision procedures. This procedure of generat<strong>in</strong>g <strong>Presburger</strong> formulas is easy to<br />

extend by us<strong>in</strong>g other encod<strong>in</strong>gs <strong>and</strong> there are many other ways to formulate the<br />

44

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

Saved successfully!

Ooh no, something went wrong!