normalize

# Differences

This shows you the differences between two versions of the page.

 normalize [2017/11/14 07:20]waruna [Normalization Rules] normalize [2017/11/14 07:50] (current)waruna [Example] Both sides previous revision Previous revision 2017/11/14 07:50 waruna [Example] 2017/11/14 07:46 waruna [Normalization Rules] Fixed rule 4 and 5. latex plugin does not work anymore, therefore used the mathjax plugin 2017/11/14 07:22 waruna [Normalization Rules] 2017/11/14 07:20 waruna [Normalization Rules] 2017/04/19 14:14 external edit Next revision Previous revision 2017/11/14 07:50 waruna [Example] 2017/11/14 07:46 waruna [Normalization Rules] Fixed rule 4 and 5. latex plugin does not work anymore, therefore used the mathjax plugin 2017/11/14 07:22 waruna [Normalization Rules] 2017/11/14 07:20 waruna [Normalization Rules] 2017/04/19 14:14 external edit Line 10: Line 10: ====Normalization Rules==== ====Normalization Rules==== Normalize takes a program and applies a set of normalization rules on it. Some of the basic rules are shown below: Normalize takes a program and applies a set of normalization rules on it. Some of the basic rules are shown below: - -  $e.f \Rightarrow e$, if $f(z)=z$ + - $e.f \Rightarrow e,$ if $f(z)=z$ - -  $(e_{1} \oplus e_{2}).f \Rightarrow (e_{1}.f) \oplus (e_{2}.f)$  + - $(e_{1} \oplus e_{2}).f \Rightarrow (e_{1}.f) \oplus (e_{2}.f)$ - -  $(D:e_{1})\oplus e_{2} \Rightarrow D:(e_{1} \oplus e_{2})$ + - $(D:e_{1})\oplus e_{2} \Rightarrow D:(e_{1} \oplus e_{2})$ - -  $e_{1}\oplus (D: e_{2}) \Rightarrow D:(e_{1} \oplus e_{2})$ + - $e_{1}\oplus (D: e_{2}) \Rightarrow D:(e_{1} \oplus e_{2})$ - -  $(e\dot f_{1}). f_{2} \Rightarrow e . f$, where $f = f_{1} o f_{2}$ + - $(e. f_{1}). f_{2} \Rightarrow e . f$, where $f = f_{1} o f_{2}$ - -  $D_{1}:(D_{2}:e) \Rightarrow D:e$, where $D=D_{1} \cap D_{2}$  + - $D_{1}:(D_{2}:e) \Rightarrow D:e$, where $D=D_{1} \cap D_{2}$ - -  $(D:e). f \Rightarrow D':e$, where $D' = f^{-1}(D)$ + - $(D:e). f \Rightarrow D':e$, where $D' = f^{-1}(D)$ ======== ======== ====Example==== ====Example==== Line 41: Line 41: * In the computation for C, expression A[i] is equivalent to A.(i %%->%% i), f is an identity function, rule number one is satisfied. So A.(i %%->%% i) %%=>%% A. * In the computation for C, expression A[i] is equivalent to A.(i %%->%% i), f is an identity function, rule number one is satisfied. So A.(i %%->%% i) %%=>%% A. * In the computation for C, expression {i| 0 %%<=%% i < N}: ({i|0 %%<=%% i < 2N}:A[i]) matches rule number 6, where D1 = {i| 0 %%<=%% i < N}, D2={i|0 %%<=%% i < 2N}. D=D1 ∩ D1 ={i|0 %%<=%% i < N}, the expression is changed to {i|0 %%<=%% i < N}:A. * In the computation for C, expression {i| 0 %%<=%% i < N}: ({i|0 %%<=%% i < 2N}:A[i]) matches rule number 6, where D1 = {i| 0 %%<=%% i < N}, D2={i|0 %%<=%% i < 2N}. D=D1 ∩ D1 ={i|0 %%<=%% i < N}, the expression is changed to {i|0 %%<=%% i < N}:A. - * In the computation for D, expression (i, j %%->%% j, i)@({|0 %%<=%% i < N\}:A[i]) matches rule number 7, where D = {i,j |0 %%<=%% i < N }, f=(i, j %%->%% j, i). D'=f^(-1)(D)={i,j|0 %%<=%% j < N}, the expression is changed to {i,j|0 %%<=%% j < N}:A[i,j]; + * In the computation for D, expression (i, j %%->%% j, i)@({|0 %%<=%% i < N}:A[i]) matches rule number 7, where D = {i,j |0 %%<=%% i < N }, f=(i, j %%->%% j, i). D'=f^(-1)(D)={i,j|0 %%<=%% j < N}, the expression is changed to {i,j|0 %%<=%% j < N}:A[i,j]; The result for the above program after normalization is: The result for the above program after normalization is: 