This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada front-end depends on signed overflow
- From: Robert Dewar <dewar at adacore dot com>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: 'Paul Schlie' <schlie at comcast dot net>, 'Florian Weimer' <fw at deneb dot enyo dot de>,'Andrew Pinski' <pinskia at physics dot uc dot edu>, 'GCC List' <gcc at gcc dot gnu dot org>, bosch at gnat dot com
- Date: Wed, 08 Jun 2005 09:58:15 -0400
- Subject: Re: Ada front-end depends on signed overflow
- References: <SERRANOVzDpubxcbz370000033e@SERRANO.CAM.ARTIMI.COM>
Dave Korn wrote:
I didn't say "Pseudo random number generation". I said "Random number
generation".
which once again has nothing whatever to do with non-determinism.
TO illustrate this, suppose I have a language which has sets of
integers. I have an operator ARB whose semantics is to select
an element of such a set non-deterministically. It is a fine
implementation to always return the smallest number in the
set (of course no legitimate program can rely on this artifact
of the implementation). It would not be at all fine to use
this implementation for the RAND operator that selects a
random element from the set.
Many people mix these concepts up, it always causes trouble.
I once remember a very senior member of the CS community
(I will keep the name to myself), during a discussion of
Ada semantics being dismayed at the overhead required for
non-deterministic selection of an open SELECT alternative,
since he assumed it meant that a random number generator
would have to be used :-)