Go backward to Non-strict Store Updates Go up to Top Go forward to Example |
begin
X := 0
Y := X+1
X := 4
return Y
K: Block -> Store_|_ -> Nat_|_
K[[begin C return E]] =
lambda s. E[[E]]
(C[[C]]s)
K[[begin X:=0; Y:= X+1; X:=4 return Y]]s0
= E[[Y]] (C[[X:=0; Y:= X+1; X:=4]]s0)
= E[[Y]] (C[[Y:= X+1; X:=4]] (C[[X:=0]]s0))
= E[[Y]] (C[[Y:= X+1; X:=4]]
(update [[X]] (E[[0]]s0) s0))
= E[[Y]] (C[[Y:= X+1; X:=4]] s1)
s1 = (E[[0]]s0) needs not be simplified!