[R6RS] summary of decisions regarding multiple values
Michael Sperber
sperber at informatik.uni-tuebingen.de
Sat Jun 24 08:17:29 EDT 2006
William D Clinger <will at ccs.neu.edu> writes:
> Mike wrote:
>> > (begin E1 E2)
>> > and
>> > ((lambda (ignored) E2) E1)
>>
>> This bit I don't buy at all. (That doesn't imply any opinion on your
>> overall point; but as it keeps coming up, I'm commenting.) Your
>> choice of that particular transformation seems to be an implementation
>> aspect rather than an aspect of the semantics.
>
> The reason this particular transformation is important
> is that it is the transformation used to convert begin
> expressions into A-normal form.
There is a reason why this sentence is in the passive voice. I don't
think the original ANF paper says anything about the translation of
`begin.' (And I still don't see why the choice of ANF would have to
dictate the semantics of Scheme, especially given that the
denotational semantics in R5RS is written in CPS, not ANF.)
Now, looking at the ANF paper, I would think that I could just modify
CPS(CS) to have
P ::= ... | (W (\lambda x_1 ... x_n.P) W_1 ... W_n)
| ... | (O (\lambda x_1 ... x_n.P) W_1 ... W_n)
... carry that change over to the C_cpsE machine (extending the
closure machine values, go from there to C_cpsEK machine (extending
the continuation values there), and then applying an inverse
transformation into an ANF with a multiple-value LET. Does this fall
down anywhere?
> It is a fact that
>
> 1. If the traditional equivalence used to justify
> translation of begin expressions into A-normal
> form continues to hold, and
>
> 2. Continuations created by begin must accept any
> number of values, then
>
> 3. Continuations created for argument evaluation
> must accept any number of arguments.
Sure the implication is a fact. I just don't agree with the premise.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the R6RS
mailing list