From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e13b2443cdd722bd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-07 06:38:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Constant elaboration order Date: 07 Dec 2001 09:34:18 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: <3c0800dc$0$211$626a54ce@news.free.fr> <5ee5b646.0112010843.6ad01bc3@posting.google.com> <3c0fedf4$0$203$626a54ce@news.free.fr> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1007735838 26222 128.183.220.71 (7 Dec 2001 14:37:18 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 7 Dec 2001 14:37:18 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:17566 Date: 2001-12-07T14:37:18+00:00 List-Id: "Thierry BERNIER" writes: > > my question was about a given executable. When the compiler, binder and > linker have processed source files. My executable is here and I would like > to assert that from one run to another of this executable; elaboration code > chunks are executed in the same order (the one statically choosen by the > binder). This is true. Any executable will give the same results when run again, unless it depends on some random external factor (like time or user input). Since there are no external factors determining elaboration order, it is repeatable. Hmm. I guess it is _possible_ to put external IO and tasks in elaboration code, which _could_ affect the final elaboration order. But you'd have to really work at it! > I understand this is true for GNAT, but found no rule in the RM (we > can forget annex E here). Hmm. The closest rule I can find is 10.2.1 (26), which defines pragmas Elaborate_Body and Elaborate_All. However, to really understand an issue like this, you need to consider the RM as a whole, which can be hard. That's why ACT made the effort of writing their user guide, which is far more understandable (as you discovered). In sum, elaboration order, in the absence of elaboration order pragmas, is left to the implementation. If you want to guarrantee that the elaboration order is safe, put in the elaboration pragmas suggested by GNAT. -- -- Stephe