From: Thomas Lotze <thomas@thomas-lotze.de>
Subject: Re: Libraries written in Ada
Date: Tue, 23 Nov 2004 14:53:09 +0100
Date: 2004-11-23T14:53:09+01:00 [thread overview]
Message-ID: <pan.2004.11.23.13.53.09.112968@ID-174572.user.uni-berlin.de> (raw)
In-Reply-To: 29776258.sBDdEVhOhy@linux1.krischik.com
On Tue, 23 Nov 2004 13:36:02 +0100, Martin Krischik wrote:
> You can restrict packages to not use specific elaboations:
>
> pragma Pure ();
> pragma Preelaboreate ();
>
> The pragmas are for the Annex E where these things are more important than
> in normal development.
Ah, now I found what I was looking for. The ARM really makes for some
reading...
>> So it's not possible to reset a package in the midst of program
>> execution? If so, is it a conscious design decision, and what's the
>> rationale? (The solution seems to be offering reset functionality in the
>> package.)
>
> A conscious design decision:
>
> package
> Test
> is
>
> Y : constant Integer = X (...);
>
> end Test;
>
> Do I have to explain it or do you spot it yourself ;-) .
The value of the constant might be different after a hypothetical
re-elaboration. So there would still be no problem if a constant was
understood to not change its value _after_ elaboration. In your example
I'd have a constant of unknown value anyway (or X() would have to always
yield the same value, in which case we'd be discussing a non-existing
problem), so you'd be just as fine after a re-elaboration as before
provided you treat such an event as a kind of Big Bang and never try to
connect information from after it with information from before. But I do
admit that this would be a potential well of grief.
> With GNAT the binder will automaticly generate the needed code just like
> with adainit ().
>
> The code generated by the binder is stored in some b~ file. It is a normal
> Ada source code. In Ada only programms the binder output is deleted
> imediatly after linking - in mixed language development the binder output
> is not deleted.
Yes, I've seen such files. It is possible that adafinal() consists of just
one call to Do_Finalize. Can it be omitted in that case? Neither the ARM
nor the GNAT RM or UG seem to explain it.
> package Interface.C.Strings is only Preelaborate and package Ada.Text_IO
> is unmarked.
>
> And if a package is unmarked then you have to expect both init and term.
Too bad.
--
Viele Gr��e,
Thomas
next prev parent reply other threads:[~2004-11-23 13:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-22 11:32 Libraries written in Ada Thomas Lotze
2004-11-22 15:58 ` Martin Krischik
2004-11-22 16:28 ` Thomas Lotze
2004-11-22 16:46 ` Alex R. Mosteo
2004-11-22 19:09 ` Pascal Obry
2004-11-23 11:12 ` Alex R. Mosteo
2004-11-22 17:59 ` Martin Krischik
2004-11-22 20:36 ` Thomas Lotze
2004-11-22 21:25 ` Georg Bauhaus
2004-11-22 21:45 ` Thomas Lotze
2004-11-22 22:07 ` Georg Bauhaus
2004-11-22 22:27 ` Thomas Lotze
2004-11-23 9:54 ` Adrien Plisson
2004-11-23 9:55 ` Martin Krischik
2004-11-23 9:55 ` Martin Krischik
2004-11-23 9:48 ` Martin Krischik
2004-11-23 11:03 ` Thomas Lotze
2004-11-23 11:38 ` Alex R. Mosteo
2004-11-23 12:22 ` Georg Bauhaus
2004-11-23 13:20 ` Alex R. Mosteo
2004-11-23 13:40 ` Alex R. Mosteo
2004-11-23 12:36 ` Martin Krischik
2004-11-23 13:53 ` Thomas Lotze [this message]
2004-11-23 18:39 ` Jeffrey Carter
2004-11-22 20:45 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox