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,89672537efe45443 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-26 15:34:25 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: tony@probepak.com (Dr. Anthony Probe) Newsgroups: comp.lang.ada Subject: Re: Source Analysis Tools for Ada95 Date: 26 Apr 2003 15:34:25 -0700 Organization: http://groups.google.com/ Message-ID: <7fc0d0f7.0304261434.1f7f69fd@posting.google.com> References: <7fc0d0f7.0304251607.efb4d7b@posting.google.com> NNTP-Posting-Host: 4.64.17.89 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1051396465 15206 127.0.0.1 (26 Apr 2003 22:34:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 26 Apr 2003 22:34:25 GMT Xref: archiver1.google.com comp.lang.ada:36617 Date: 2003-04-26T22:34:25+00:00 List-Id: > Gnat includes "gnatelim" which generates a list of gnat specific pragmas > causing no object code to be built for dead code. You should be able to use > this as a starting point for deleting unused code. Wouldn't a compiler only detect the obvious dead code (that which isn't used from just analyzing the comp unit? I had planned on generating a list of subprograms that are actually used (that is referenced from the main subprogram, or the elaboration code for with'd library units in a transitive fashion). I can get this list from the binaries that are produced from the code. So, the first task is to remove all subprograms and hopefully any static data that are not included in any of the executables. Then, if I eliminate unused withs, this might cut the size down some more and repeat the elimination of unused subprograms. The point of this exercise is that a 1M line system is easier to maintain than a 1M line system with 3M lines of unused code sprinkled throughout the system. Then we plan on doing code review/analysis on the remaining used code. I would gladly pay for a real tool that eliminates unused code (or makes the process more painless), but I can certainly write my own scripts to do this job. After that, I am looking for any tools that have proven to help do meaningful code cleanup and analysis. Anyway, I'll certainly be running the code through various compilers to see what they tell me. Any other specific recommendations for other tools? Tony