[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mathematical models



From: Jeffrey Mark Siskind <qobi@qobi.nj.nec.com>
Subject: Re: mathematical models
Date: Thu, 5 Jun 1997 12:35:27 -0400

> I always understood the motivation for leaving argument evaluation order
> unspecified to be the desire to allow parallel argument evaluation, not the
> desire to allow optimizaion by reordering. But parallel argument evaluation is
> even weaker than unspecified argument evaluation order. Under parallel
> argument evaulation, the following expression
> 
> (let ((x 0))
>  (+ (begin (if (zero? x) (set! x 1)) x)
>     (begin (if (zero? x) (set! x 2)) x)))
> 
> could yield 3 which it could not do under any unspecified (applicative)
> argument evaluation order, even one that allowed each call from a given call
> site to have different argument evaluation order.
> 
> Mind you, I agree with Henry that it is better to specify argument evaluation
> order and require the compiler to determine when it is safe to evaluation
> arguments in parallel. I'm just pointing out one possible interpretation for
> the motivation behind the current wording.
> 
>     Jeff (http://www.neci.nj.nec.com/homepages/qobi.html)

No, this has been ruled out explicitly.  My copy of R4RS says of page 8:

``Note:  Although the order of evaluation is otherwise unspecified,
the effect of any concurrent evaluation of the operator and operand
expressions is constrained to be consistent with some sequential order
of evaluation. ...''

-Matthias