Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
(make-If  true  X  Y)	   =>	X
(make-If  false  X  Y)	   =>	Y
(make-If  X  true  false)  =>	X
(make-If  X  Y  Y) 	   =>	Y
(make-If  X  Y  Z)	   =>	(make-If  X  Y\[X <\- true\]  Z\[X <\- false\])

The notation M[X <- N] means M with all occurrences of the symbol X replaced by the expression N. It is very costly to actually perform these substitutions on NormIfExp data. To avoid this computational expense, we simply maintain a list of bindings which are pairs consisting of symbols (variable names) and boolean values {true, false. The following data definition definition formally defines the binding type.