[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arg evaluation order
This is a response to a rather old message -- but then again, a file
system lossage recently reset my state to July 17, causing me to take
a fresh look at some then-pending mail messages (and then the first
time I tried to send this message it bounced):
> Jinx writes:
> The problem is that there are perfectly portable sequential programs
> which work when ANY sequential order is used, but not when
> interleaved. Consider, for example, ...
> Now, a compiler should be able trivially to determine that node-mark!
> is a (potential) mutator, and hence that count-nodes! is a mutator;
> thus determining that there is a race condition just in case
> (eq? (node-left graph-node) (node-right graph-node))
> is straightforward, ....
Your argument here seems to be devoted to whether a compiler can tell
that, in this case, a parallel execution could yield a result different
from that of any legal sequential execution.
I don't think anybody is trying to *prevent* a Scheme implementation
from working in parallel, if it can prove that the result of such
operation will be equivalent to that of a legal sequential execution.
The issue here is whether the Scheme specification should be weakened
so as to include as a legal execution order the kind of interleaving
that Jinx's example highlights. I agree completely with Jinx that this
would be a radical change and would cause great difficulty in writing
portable programs. You can invent a language that is like Scheme in
every respect except that it relaxes this restriction (I have, in fact),
but that's different enough that you shouldn't call it Scheme.
-Bert Halstead