comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Parameter evaluation order
Date: 1998/04/09
Date: 1998-04-09T00:00:00+00:00	[thread overview]
Message-ID: <Er63s7.7oJ.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: Er5Ir9.5Ip@world.std.com


Robert A Duff (robertduff@world.std.com) wrote:

: ...
: I'm not even convinced the tradeoff is worthwhile.  That is, perhaps it
: *is* a stupid rule, despite the fact that it might make some programs
: run faster.  I don't like nondeterministic semantics.

I do. ;-).

It is interesting that Djikstra in his classic book
"A Discipline of Programming" chose to write it all using
non-deterministic control flow constructs.  This is in spite
of the fact that he is very interested in proving programs
correct.  Implicit in this is that proving properties of programs
is not necessarily harder in the presence of non-deterministic
semantics.  In some cases, non-determinism actually simplifies 
the program proving rules.  Furthermore, multitasking programs
are inevitably non-deterministic, and as we move to hardware
where speed is achieved by increasing the number of processors
rather than just the speed of individual processors, 
non-deterministic semantics are even more important.

As an example of simplification, the rules for real model intervals
in Ada are not trivial, but they are much simpler to work with
than trying to reflect the exact IEEE rounding-to-nearest-even
rules in attempts to prove programs.  Of course the 
rounding-to-nearest-even has nice statistical properties,
but clearly when you start relying on statistical properties,
you are not talking determinism!

I think the attempts to make Java's semantics deterministic
were misguided.  My understanding is that they have finally
relented with respect to floating point calculations, and will
allow extended-precision intermediates during evaluation of
floating point expressions.  Given that multi-tasking is
a big part of Java, and they didn't even incorporate a clean
race-free state-based task signaling mechanism like entry barriers, 
but instead use the notoriously race-prone wait/notify approach,
specifying order of evaluation of parameters seems to be 
missing the forest for the trees.

: - Bob
: -- 
: Change robert to bob to get my real email address.  Sorry.

Stepping off the soapbox...

-Tuck




  parent reply	other threads:[~1998-04-09  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-05  0:00 Parameter evaluation order Mark.Rutten
1998-04-05  0:00 ` Matthew Heaney
1998-04-07  0:00   ` Don Harrison
1998-04-09  0:00   ` Simon Wright
1998-04-10  0:00     ` Matthew Heaney
1998-04-10  0:00       ` Simon Wright
1998-04-11  0:00         ` Robert Dewar
1998-04-06  0:00 ` Corey Ashford
1998-04-06  0:00 ` William D. Ghrist
1998-04-08  0:00 ` Glenden Lee
1998-04-09  0:00   ` Robert Dewar
     [not found]     ` <Er5Ir9.5Ip@world.std.com>
1998-04-09  0:00       ` Peter Amey
1998-04-09  0:00       ` Tucker Taft [this message]
1998-04-16  0:00         ` Nick Roberts
1998-04-17  0:00           ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox