Substitution Principles
- E[[LET I = E1 IN E2]] = E[[ [E1/I]E2 ]]
LET X = a0 IN
LET Y = X CONS NIL IN
(HEAD Y) CONS X CONS NIL
=> LET Y = a0 CONS NIL IN
(HEAD Y) CONS a0 CONS NIL
=> (HEAD (a0 CONS NIL)) CONS a0 CONS NIL
=> a0 CONS a0 CONS NIL
- E[[LETREC I = E1 IN E2]] = ?
- Substitute [[E1]] for [[I]] in [[E2]].
- Substitute [[E1]] for [[I]] in resulting expression.
- Continue until occurences of [[I]] eliminated.
- Number of substitutions is unbounded!
- Substitute occurences only when required for further simplification!
Computation is substitution; in implementation environment becomes
run-time structure.
Author: Wolfgang Schreiner
Last Modification: November 18, 1997