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
sav08:sign_analysis_of_expressions_and_programs [2008/05/07 00:17]
vkuncak
sav08:sign_analysis_of_expressions_and_programs [2008/05/07 01:08]
vkuncak
Line 34: Line 34:
 Abstract operations: $\oplus, \otimes : A^2 \to A$ defined by tables: Abstract operations: $\oplus, \otimes : A^2 \to A$ defined by tables:
  
 +===== Sign Analysis of Programs =====
  
 +Prove that this program never reports error:
  
 +<​code>​
 +i = 20;
 +x = 2;
 +while (i > 0) {
 +  x = x + 4;
 +  i = i - 1;
 +}
 +if (x==0) {
 +  error;
 +} else {
 +  y = 1000/x;
 +}
 +</​code>​
 +
 +Abstract state: map each variable to element of $A$.
 +
 +  * computation over control-flow graph
 +
 +What does it mean for such computation to be correct?