LARA

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
sav07_lecture_3_skeleton [2007/03/21 09:25]
vkuncak
sav07_lecture_3_skeleton [2007/03/21 09:48]
vkuncak
Line 127: Line 127:
 Alternative:​ Alternative:​
   * decide that you will only loop for formulas of restricted form, as in abstract interpretation and data flow analysis (next week)   * decide that you will only loop for formulas of restricted form, as in abstract interpretation and data flow analysis (next week)
 +
  
 ===== Proving quantifier-free linear arithmetic formulas ===== ===== Proving quantifier-free linear arithmetic formulas =====
 +
 +Suppose that we obtain (one or more) verification conditions of the form
 +
 +==== Quantifier Presburger arithmetic ====
 +
 +Here is the grammar:
 +
 +  var = x | y | z | ...                    (variables)
 +  K = ... | -2 | -1 | 0 | 1 | 2 | ...      (integer constants)
 +  T ::= var | T + T | K * T                (terms)
 +  A ::= T=T | T <= T                       ​(atomic formulas)
 +  F ::= F & F |  F|F  |  ~F                (formulas)
 +
 +To get full Presburger arithmetic, allow existential and universal quantifiers in formula as well.
 +
 +Note: we can assume we have boolean variables (such as '​error'​) as well, because we can represent them as 0/1 integers.
 +
 +Satisfiability of quantifier-free Presburger arithmetic is decidable.
 +
 +Proof: small model theorem.
 +
 +
 +
 +==== Small model theorem for Quantifier-Free Presburger Arithmetic (QFPA) ====
 +
 +First step: transform to disjunctive normal form.
 +
 +Next: reduce to integer linear programming:​
 +\begin{equation*}
 +  Ax = b, x \geq 0
 +\end{equation*}
 +where $A \in {\cal Z}^{m,n}$ and $x \in {\cal Z}^n$.
 +
 +Then use small model theorem for integer linear programming (ILP).
 +
 +Short proof by {{papadimitriou81complexityintegerprogramming.pdf|Papadimitriou}}.
 +
 +Note: if small model theorem applies to conjunctions,​ it also applies to arbitrary QFPA formulas. ​ Moreover, one can improve these bounds. ​ One tool based on these ideas is [[http://​www.cs.cmu.edu/​~uclid/​|UCLID]].
 +
 +Alternative:​ enumerate disjuncts of DNF on demand, each disjunct is a conjunction,​ then use ILP techniques (often first solve the underlying linear programming problem over reals). ​ Most SMT tools are based on this idea (along with Nelson-Oppen combination:​ next class).
 +  * [[http://​www.cs.nyu.edu/​acsys/​cvc3/​download.html|CVC3]] (successor of CVC Lite)
 +  * [[http://​combination.cs.uiowa.edu/​smtlib/​|SMT-LIB]] Standard for formulas, competition
 +
 +==== Full Presburger arithmetic ====
 +
 +Full Presburger arithmetic is also decidable.
  
 ===== Papers ===== ===== Papers =====