comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Precalculation of parameters (was: Software landmines)
Date: 1998/09/10
Date: 1998-09-10T00:00:00+00:00	[thread overview]
Message-ID: <Ez28B6.DMI.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 6t6hn9$t0m$1@nnrp1.dejanews.com

dennison@telepath.com wrote:

: In article <Ez0tp1.59L.0.-s@inmet.camb.inmet.com>,
:   stt@houdini.camb.inmet.com (Tucker Taft) wrote:
: > dennison@telepath.com wrote:
: >
: > : Is that actually the rule?
: >
: > RM95 6.4(10) permits evaluation of parameters in an "arbitrary"
: > order.   RM95 1.1.4(18) defines "arbitrary" order, indicating
: > that it must be an order that is equivalent to some sequential
: > ordering.                                      ^^^^^^^^^^^^^^^
:   ^^^^^^^^

: Ahhh. That was the part I was missing. So language was specifically added to
: the RM to prevent compilers from blindly parallelizing this. Out of
: curiosity, what was the reason this was done? I can't find anything about it
: in the Rationale.

All code within a single task is defined to be "sequential." This
is critical to being able to prove things about safe access to global
variables.  If the RM allowed parallel evaluation of parameter expressions,
all of the discussion in RM95 9.10 about sharing variables between tasks and
about "independent addressability" would have to apply to sharing variables 
and manipulating neighboring packed-array components between different 
parameter evaluations, which would dramatically increase the likelihood 
of erroneous execution per 9.10(11).

See RM95 9.10 for a discussion of these issues.  The critical paragraph
is 9.10(13), where any two actions that occur as part of the execution
of a single task are defined to be "sequential."  In some ways, that
*is* the definition of a "task."

: --
: T.E.D.

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




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

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-22  0:00 Software landmines (was: Why C++ is successful) dewar
1998-08-23  0:00 ` Dale Stanbrough
1998-08-23  0:00   ` dewar
1998-08-23  0:00   ` Andi Kleen
1998-08-24  0:00 ` Richard D Riehle
1998-08-25  0:00   ` dennison
1998-08-25  0:00   ` Andi Kleen
1998-08-25  0:00     ` Brian Rogoff
1998-08-28  0:00   ` Matthew Heaney
1998-08-28  0:00     ` Richard D Riehle
1998-08-29  0:00       ` Matthew Heaney
1998-09-06  0:00         ` John G. Volan
1998-09-07  0:00           ` Mats Weber
1998-09-07  0:00             ` dewarr
1998-09-08  0:00               ` Tucker Taft
1998-09-08  0:00                 ` Precalculation of parameters (was: Software landmines) dennison
1998-09-09  0:00                   ` Tucker Taft
1998-09-09  0:00                     ` dennison
1998-09-10  0:00                       ` Tucker Taft [this message]
1998-09-10  0:00                         ` dewarr
1998-09-16  0:00               ` Software landmines (was: Why C++ is successful) Matthew Heaney
1998-08-29  0:00       ` Matthew Heaney
     [not found]   ` <35eca5d9.4354839@news.geccs.gecm.com>
1998-09-01  0:00     ` Richard D Riehle
replies disabled

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