comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Help with Atomic_Components and whole array assignment
Date: Wed, 31 Jan 2001 16:41:59 -0500
Date: 2001-01-31T21:41:59+00:00	[thread overview]
Message-ID: <3A7886A7.F1BB5513@averstar.com> (raw)
In-Reply-To: 958o8f$vem$1@nnrp1.deja.com

Rod Chapman wrote:
> 
> In article <3A76E455.AABF2490@averstar.com>,
>   Tucker Taft <stt@averstar.com> wrote:
> 
> > I don't agree with Robert on this.  Have you tried writing it
> > as a loop rather than an aggregate assignment.
> 
> Of course, but that would usually be considered bad style in
> SPARK.  The assignment
>   A := A_Type'(others => 0);
> has information flow "derives A from ;" (i.e. the final value of
> A is derived from "nothing" - a constant - which is probably what
> you wanted and expected)
> 
> The compound statement
>    for I in A'Range loop
>       A(I) := 0;
>    end loop;
> has information flow "derives A from A", which is significantly
> different.

I don't understand why this derives A from A.  Is this just
a limitation of SPARK?  Clearly, we are assigning a new
value to every component of A, making no use of the original
values.

> ... Our device driver is a fine
> example of where we (justifiably) bend the rules... :-)

That doesn't surprise me.  Device drivers take special care.

I just bemoan anything that forces one to start using machine
code to write a device driver.  I know that 25 years ago Unix
was one of the first operating systems to have device drivers
written in something other than assembly code.  (I know it was
not *the* first, given Multics, etc.)  If 25 years
later I find we have to drop back to assembly code in Ada,
I would be quite disappointed, and believe we messed up the
language definition somewhere.

>  - Rod
-- 
-Tucker Taft   stt@avercom.net   http://www.averstar.com/~stt/
Chief Technology Officer, AverCom, Inc. (A Titan Company) Burlington, MA  USA
(AverCom was formed 1/1/01 from the Commercial Division of AverStar)
(http://www.averstar.com/services/ebusiness_applications.html)



  reply	other threads:[~2001-01-31 21:41 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-22 11:22 Help with Atomic_Components and whole array assignment r_c_chapman
2001-01-22 12:51 ` Stuart Palin
2001-01-22 14:16   ` mark_lundquist
2001-01-22 16:09     ` Pat Rogers
2001-01-22 16:29     ` Robert Dewar
2001-01-22 19:52       ` Mark Lundquist
2001-01-30 15:54       ` Tucker Taft
2001-01-30 18:20         ` Robert Dewar
2001-01-31  5:08           ` DuckE
2001-01-31  5:57             ` Robert Dewar
2001-02-01  3:31               ` DuckE
2001-02-02 21:38               ` Mark Lundquist
2001-02-02 23:08                 ` Robert Dewar
2001-02-03  1:39                 ` tmoran
2001-01-22 16:21 ` Robert Dewar
2001-01-22 16:39   ` r_c_chapman
2001-01-30 15:57     ` Tucker Taft
2001-01-30 18:26       ` Robert Dewar
2001-01-30 21:30         ` Simon Wright
2001-02-01  6:11           ` Robert Dewar
2001-02-06  0:32         ` Richard Kenner
2001-02-06  3:15           ` Robert Dewar
2001-01-31 10:09       ` Rod Chapman
2001-01-31 21:41         ` Tucker Taft [this message]
2001-02-01  5:33           ` Robert Dewar
2001-02-01  9:42           ` Rod Chapman
2001-02-01 18:10             ` Robert Dewar
2001-02-01 13:14           ` SPARK flow analysis (was Help with Atomic_Components and whole array assignment) Stuart Palin
2001-02-01 23:38           ` Help with Atomic_Components and whole array assignment Nick Roberts
2001-02-02  3:45             ` Robert Dewar
2001-02-07 21:40           ` Nick Williams
replies disabled

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