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,a02ecdd4cb0f0996 X-Google-Attributes: gid103376,public From: ralph@inputplus.demon.co.uk (Ralph Corderoy) Subject: Re: Pragma Inline and its Effects of Compilation Dependencies. Date: 2000/03/23 Message-ID: <8bd89l$6up$1@inputplus.demon.co.uk>#1/1 X-Deja-AN: 601322198 X-NNTP-Posting-Host: inputplus.demon.co.uk:194.222.72.27 References: <8b64ul$jov$1@inputplus.demon.co.uk> <38D7CD74.59C3C5BD@Raytheon.com> X-Trace: news.demon.co.uk 953823796 nnrp-04:35 NO-IDENT inputplus.demon.co.uk:194.222.72.27 Organization: InputPlus Ltd. Newsgroups: comp.lang.ada X-Complaints-To: abuse@demon.net Date: 2000-03-23T00:00:00+00:00 List-Id: Hi Samuel, > This is a good area for ASIS based tools. I use just such a beast to > help resolve this issue. Can you expand on that? > On the other hand, I have also found that compilation orders which > general place bodies as soon as possible rarely have this problem so > building a tool to handle this case may not be worth while if your > tool can do bodies ASAP. It does, but the routines to be inlined are normally in separates, not the body, and due to the missing dependency they can be placed too late in the order. > > It seems what I need is something that will take many source files, > > parse them, and spit out the dependencies for use in something like > > a traditional makefile. It isn't a trivial task as things like > > package renames and use clauses help to obscure what is being > > called. Plus it mustn't make the mistake of thinking an inline > > creates a dependency to the package body when a separate exists. > > Does something like this exist? > > This is easily written using ASIS queries. Lacking access to ASIS, > one can get a yacc/lex grammars for Ada and do the extra work > yourself. Hopefully, your compiler tool can spit out "normal" > dependencies so you don't have to worry about context clauses. You > only have to worry about which subprograms are inlines and where they > are called. Using syntax processes will easily handle straight > subprogram calls but requires more work if your code is using rename > declarations. We might have access to ASIS but isn't that an interface to the DIANA standard intermediate format? Are you suggesting building everything once, ignoring warnings about missed inline opportunities, and then use ASIS to poke around the library to find the dependencies? I've picked up a yacc grammar with lex parser from John Levine's archive (one minor bug in the lexer), and it spits out some parts easily enough. Not sure if it is worth the hassle to add the necessary rename handling, etc., code; it might be easier for the project to burn some man hours on maintaining the order manually over the next few years. > > This can't be an original problem. What do people with large Ada > > projects do? > > Such things are important to your compiler selection. If you need to > change compilers in the future, support for this problem area needs > to be on your list. In any event, you use what the compiler will give > you and build anything else you need to the degree that it is worth > building. This is a project that is getting on for a decade old; all the hardware, OS, and compilers were specified years ago and we aren't allowed to change them now. Yes, development is still ongoing ;-) We could probably get away with an extra tool that worked out compilation order for us though. Ralph.