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 | ||
sav07_lecture_3_skeleton [2007/03/20 14:35] vkuncak |
sav07_lecture_3_skeleton [2007/03/20 14:42] vkuncak |
||
---|---|---|---|
Line 39: | Line 39: | ||
assume true = skip (does nothing) | assume true = skip (does nothing) | ||
+ | |||
Line 52: | Line 53: | ||
CR(c1 ; c2) = exists x_1,y_1,error_1. CR(c1)[x:=x_1,y:=y_1,error:=error_1] & CR(c2)[x:=x_1,y:=y_1,error:=error_1] | CR(c1 ; c2) = exists x_1,y_1,error_1. CR(c1)[x:=x_1,y:=y_1,error:=error_1] & CR(c2)[x:=x_1,y:=y_1,error:=error_1] | ||
+ | |||
+ | otherwise | ||
+ | |||
+ | CR(c)=R(c) (base case) | ||
+ | |||
+ | |||
+ | ==== Accumulation of equalities ==== | ||
+ | |||
+ | This approach generates many variables and many frame conditions. | ||
+ | |||
+ | Ignoring error for the moment: | ||
+ | |||
+ | R(x=3) = (x=3 & y=y_0) | ||
+ | R(y=x+2) = (y=x_0 + 2 & x=x_0) | ||
+ | |||
+ | CR(x=3;y=x+2) = x_1=3 & y_1 = y_0 & y = x_1 + 2 & x = x_1 | ||
+ | |||
+ | But if a variable is equal to another, it can be substituted using the substitution rules | ||
+ | |||
+ | (exists x_1. x_1 = t & F(x_1)) <-> F(t) | ||
+ | (forall x_1. x_1 = t -> F(x_1) <-> F(t) | ||