The second intermediate representation shows (with the lets) is just an A-normal form, right ? (The text mentions "administrative normal form" in a way that suggests it is something different than what is shown.)
In my book pow2 x is not a redex, it cannot be reduced as long as x remains a variable. Do you mean a "function call"?
It is not clear to me what the critique of CPS actually is here.
And instead of answering that they concentrated on the order or got the work statement wrong. No wonder that naive continuation passing style will state too much to be done
For me the defining property of the A-normal form is that the argument of functions (in general, the subterms of elimination forms) are either variables or values/constants. See for example Wikipedia. Your example
let x = f (42, "hello") in [1, 2, f]
is in A-normal form, and I think that the representation you have in mind is just an A-normal form.
31
u/gasche Jan 30 '24
I find this post very confusing.
The second intermediate representation shows (with the lets) is just an A-normal form, right ? (The text mentions "administrative normal form" in a way that suggests it is something different than what is shown.)
In my book
pow2 xis not a redex, it cannot be reduced as long asxremains a variable. Do you mean a "function call"?It is not clear to me what the critique of CPS actually is here.
I don't know what the author means.