Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
sav08:sign_analysis_of_expressions_and_programs [2008/05/07 00:09] vkuncak |
sav08:sign_analysis_of_expressions_and_programs [2008/05/07 00:17] vkuncak |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Sign Analysis of Expressions and Programs ====== | ====== Sign Analysis of Expressions and Programs ====== | ||
+ | |||
+ | ===== Sign Analysis of Expressions ===== | ||
Suppose we want to test quickly whether the result of an expression is positive, negative or zero. | Suppose we want to test quickly whether the result of an expression is positive, negative or zero. | ||
Line 20: | Line 22: | ||
++++| | ++++| | ||
\[ | \[ | ||
- | (pos \oplus (pos \otimes neg)) \otimes pos = (pos \oplus neg) \otimes pos = \bot \otimes pos = \bot | + | (pos \oplus (pos \otimes neg)) \otimes pos = (pos \oplus neg) \otimes pos = \top \otimes pos = \top |
\] | \] | ||
++++ | ++++ | ||
Line 28: | Line 30: | ||
Concrete operations: ${+}, {\times} : \mathbb{Z}^2 \to \mathbb{Z}$ | Concrete operations: ${+}, {\times} : \mathbb{Z}^2 \to \mathbb{Z}$ | ||
- | Abstract domain: $A = \{ pos, neg, \bot \}$ | + | Abstract domain: $A = \{ pos, nul, neg, \top \}$ |
+ | |||
+ | Abstract operations: $\oplus, \otimes : A^2 \to A$ defined by tables: | ||
- | Abstract operations: $\oplus, \otimes : A^2 \to A$ | ||