comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr>
Subject: Re: Subverting 'Access for Sub-programs
Date: 1999/08/05
Date: 1999-08-05T14:02:57+00:00	[thread overview]
Message-ID: <7oc5ih$6mb$1@wanadoo.fr> (raw)
In-Reply-To: Pine.BSF.4.10.9908042041540.29130-100000@shell5.ba.best.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2532 bytes --]


Brian Rogoff <bpr@shell5.ba.best.com> a �crit dans le message :
Pine.BSF.4.10.9908042041540.29130-100000@shell5.ba.best.com...
On Wed, 4 Aug 1999, Jean-Pierre Rosen wrote:
> [snip]
>> I understood from a previous message that you didn't like the solution
with
>> a generic taking a formal procedure.
>> It seems however that it would allow you to do precisely what you want.
>> You may not "like" generics, but they are inherently safer than access
>> values. Actually, in the discussion about downward closures, it was noted
>> that all the cases presented could be equally well be dealt with with
>> generics, and therefore that it was not worth introducing a risky
feature.

>Not true for any reasonable value of "equally well". For instance, in one
>of those ancient postings of a few years ago on this very topic Richard
>O'Keefe presented the example of making a two dimensional integrator from
>a one dimensional one. The Ada version with generics depended on the name
>of the one dimensional integratoir, and so it was parameterized by that
>particular integrator. The downward closure one was free to range over all
>one dimensional integrators. I'll append the code, if you can come up with
>a perspicuous generic version that doesn't depend on the one dimensional
>code I'll be more convinced.
[code snipped for brievity]
OK, I understand your problem better (full examples always help :-)
Of course, you realize that "Integrator" could store the pointer to function
to any global variable, possibly resulting later in random branches.
I think the trade-off in language design was that accessing random memory
location was bad, but not THAT bad. OTOH, branching to random locations was
considered really too dangerous. Even if you promise not to store the
pointer to function to anything global, it would be a property of the body,
i.e. something that could be changed without anybody noticing, not even
requiring recompilation of users.
So take it as a trade-off between security and usability. But in the real
world (i.e. not academic exercise), is it so important to dynamically choose
the 1D integrator ? As you note, if the 1D integrator is fixed, there is an
easy solution with generics.

>I think its also true that in the typical implementation of generics there
>will be a code size problem too.
RR software has full generics sharing.

--
---------------------------------------------------------
           J-P. Rosen (Rosen.Adalog@wanadoo.fr)
Visit Adalog's web site at http://perso.wanadoo.fr/adalog







  reply	other threads:[~1999-08-05  0:00 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-03  0:00 Subverting 'Access for Sub-programs Anton Gibbs
1999-08-03  0:00 ` tmoran
1999-08-03  0:00 ` Steve Doiel
1999-08-03  0:00 ` Ted Dennison
1999-08-03  0:00 ` David C. Hoos, Sr.
1999-08-05  0:00   ` Robert A Duff
1999-08-03  0:00 ` Brian Rogoff
1999-08-03  0:00 ` Michael F. Yoder
1999-08-04  0:00 ` Robert Dewar
1999-08-04  0:00   ` Robert A Duff
1999-08-04  0:00     ` Robert Dewar
1999-08-04  0:00 ` Anton Gibbs
1999-08-04  0:00   ` Jean-Pierre Rosen
1999-08-04  0:00     ` Brian Rogoff
1999-08-05  0:00       ` Jean-Pierre Rosen [this message]
1999-08-05  0:00         ` Robert A Duff
1999-08-05  0:00           ` tmoran
1999-08-06  0:00             ` Robert A Duff
1999-08-05  0:00           ` Brian Rogoff
1999-08-06  0:00             ` Robert Dewar
1999-08-09  0:00               ` Tucker Taft
1999-08-10  0:00                 ` Robert Dewar
1999-08-11  0:00                   ` Robert A Duff
1999-08-11  0:00                     ` Robert Dewar
1999-08-11  0:00                   ` Tucker Taft
1999-08-13  0:00                     ` Robert Dewar
1999-08-13  0:00                     ` Robert Dewar
1999-08-13  0:00                       ` Brian Rogoff
1999-08-11  0:00                   ` Dmitry A. Kazakov
1999-08-11  0:00                     ` Richard D Riehle
1999-08-11  0:00                     ` Robert Dewar
1999-08-12  0:00                       ` Dmitry A. Kazakov
1999-08-14  0:00                         ` Robert Dewar
1999-08-16  0:00                           ` Dmitry A. Kazakov
1999-08-05  0:00           ` Robert Dewar
1999-08-05  0:00         ` adam
1999-08-05  0:00           ` adam
1999-08-06  0:00             ` Robert A Duff
1999-08-06  0:00               ` adam
1999-08-09  0:00                 ` Mark Biggar
1999-08-09  0:00                 ` Robert A Duff
1999-08-05  0:00           ` Robert Dewar
1999-08-05  0:00             ` What is a Display ? (was: Subverting 'Access for Sub-programs) Larry Kilgallen
1999-08-05  0:00               ` Hyman Rosen
1999-08-06  0:00                 ` Robert Dewar
1999-08-06  0:00               ` Robert Dewar
1999-08-06  0:00         ` Subverting 'Access for Sub-programs Brian Rogoff
1999-08-07  0:00           ` Gautier
1999-08-05  0:00     ` Robert A Duff
1999-08-05  0:00       ` Robert Dewar
1999-08-05  0:00         ` Brian Rogoff
1999-08-04  0:00   ` Robert A Duff
1999-08-04  0:00     ` Brian Rogoff
1999-08-05  0:00       ` tmoran
1999-08-05  0:00         ` Robert Dewar
1999-08-05  0:00           ` Ray Blaak
1999-08-06  0:00             ` Robert Dewar
1999-08-06  0:00               ` Robert A Duff
1999-08-08  0:00                 ` Brian Rogoff
1999-08-09  0:00                   ` Robert A Duff
1999-08-10  0:00                     ` Brian Rogoff
1999-08-09  0:00                 ` Tucker Taft
1999-08-06  0:00             ` Jean-Pierre Rosen
1999-08-06  0:00               ` Hyman Rosen
1999-08-07  0:00                 ` Florian Weimer
1999-08-05  0:00         ` Aidan Skinner
1999-08-05  0:00     ` Anton Gibbs
1999-08-05  0:00   ` Steve Quinlan
replies disabled

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