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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,16e3a8dd4f3ab3f3 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Elaboration order Date: 1996/03/25 Message-ID: #1/1 X-Deja-AN: 144170814 references: <314701A1.469D@lfwc.lockheed.com> <314D2E1C.5C72@lfwc.lockheed.com> <4in4am$klb@watnews1.watson.ibm.com> <4inpiv$alk@cliffy.lfwc.lockheed.com> <4ip58c$gqo@cliffy.lfwc.lockheed.com> <696076745wnr@diphi.demon.co.uk> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-03-25T00:00:00+00:00 List-Id: JP Thornley writes "FWIW, the safety critical code we write uses a subset that avoids any elaboration order dependencies (and there is a tool to ensure conformance to the subset)." This seems a perfectly reasonable approach to me. Another is to eliminate all possible ABE's by some uniform scheme. A fierce one (too fierce I think, but it certainly does the job) is one that I heard was being used in one giant project: always put pragma Elaborate for every with. Of course this eliminates all ABE's, but also eliminates mutual recursion between packages. An interesting question for JP is how closely the subset corresponds to the built in notion of pragma Preelaborate in Ada 95. I think it is quite possible to consider using pragma Preelaborate for all packages in such an implementation, and then the compiler acts as the tool for enforcement without depending on implementatin dependent features.