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.
5.2. SIMPLIFICATION OF PRESBURGER FORMULAS<br />
<strong>and</strong> a conjunction guard are proposition logic fragments <strong>in</strong> the follow<strong>in</strong>g forms respectively:<br />
∧<br />
L i ⇒ ∨ P j<br />
i j<br />
∧<br />
L i ∧ ∧ P j<br />
i j<br />
We consider GNF <strong>in</strong> the <strong>Presburger</strong> sett<strong>in</strong>g where literals are comparison <strong>and</strong><br />
divisibility constra<strong>in</strong>ts <strong>and</strong> guards consist of propositional connectives of quantified<br />
<strong>and</strong> quantifier-free formulas. First, GNF supports an easy way to express NNF [15]:<br />
P ∧ Q ≡ ∧ i∈φ<br />
∧P ∧ Q<br />
P ∨ Q ≡ ∧ i∈φ<br />
⇒ P ∨ Q<br />
¬( ∧ i<br />
L i ⇒ ∨ j<br />
P j ) ≡ ∧ i<br />
L i ∧ ∧ j<br />
¬P j<br />
¬( ∧ i<br />
L i ∧ ∧ j<br />
P j ) ≡ ∧ i<br />
L i ⇒ ∨ j<br />
¬P j<br />
As we can see from above equations, the implication guard <strong>and</strong> the conjunction<br />
guard are dual of each other. Transformation <strong>in</strong>to NNF is done by simply push<strong>in</strong>g<br />
negation <strong>in</strong>side <strong>in</strong>ner guarded formulas only. A formula is said to be <strong>in</strong> GNF if<br />
conjunction guards only occur <strong>in</strong> implication guards <strong>and</strong> vice versa. A guarded<br />
formula is put <strong>in</strong>to GNF by apply<strong>in</strong>g equivalences:<br />
∧<br />
L i ⇒ ( ∧ L ′ k ⇒ ∨ P l ′ ) ∨ ∨ P j ≡ ∧ L i ∧ ∧ L ′ k ⇒ ∨ P j ∨ ∨ P l ′ (5.1)<br />
i<br />
k l j i k j l<br />
∧<br />
L i ∧ ( ∧ L ′ k ∧ ∧<br />
i k l<br />
P ′<br />
l ) ∧ ∧ j<br />
P j ≡ ∧ i<br />
L i ∧ ∧ k<br />
L ′ k ∧ ∧ j<br />
P j ∨ ∧ l<br />
P ′<br />
l (5.2)<br />
Application of above rules helps to reduce the nest<strong>in</strong>g of guarded formulas; <strong>in</strong>the<br />
next section, we study how to use GNF <strong>in</strong> connection with PA <strong>and</strong> simplify formulas<br />
as much as possible.<br />
5.2.2 Equation-based simplification<br />
Given a <strong>Presburger</strong> formula <strong>in</strong> the GNF, we sketch a simple algorithm to do cheap<br />
simplification on the formula. The first set of rules is for simplify<strong>in</strong>g quantifier<br />
guards with equations <strong>in</strong>side:<br />
∃x.(nx = t ∧ ∧ i<br />
L i ⇒ ∨ j<br />
P j ) ≡⊤ (5.3)<br />
∀x.(nx = t ∧ ∧ i<br />
L i ∧ ∧ j<br />
P j ) ≡⊥ (5.4)<br />
39