Differences
This shows you the differences between two versions of the page.
Both sides previous 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:37] 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 ==== | ||
+ | |||
+ | 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. | ||
+ | |||
+ | Short proof by | ||
+ | |||
+ | Tools: | ||
+ | * [[http://www.cs.cmu.edu/~uclid/|UCLID]] | ||
+ | |||
+ | ==== Full Presburger arithmetic ==== | ||
+ | |||
+ | Full Presburger arithmetic is also decidable. | ||
===== Papers ===== | ===== Papers ===== |