comp.lang.ada
 help / color / mirror / Atom feed
From: tony@probepak.com (Dr. Anthony Probe)
Subject: Re: Source Analysis Tools for Ada95
Date: 26 Apr 2003 15:34:25 -0700
Date: 2003-04-26T22:34:25+00:00	[thread overview]
Message-ID: <7fc0d0f7.0304261434.1f7f69fd@posting.google.com> (raw)
In-Reply-To: g2mqa.382112$Zo.89001@sccrnsc03

> 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



  reply	other threads:[~2003-04-26 22:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-26  0:07 Source Analysis Tools for Ada95 Dr. Anthony Probe
2003-04-26  2:21 ` Steve
2003-04-26 22:34   ` Dr. Anthony Probe [this message]
2003-04-27  6:26     ` Simon Wright
2003-04-27 15:15       ` Jano
2003-04-27 21:32         ` Frode Tennebø
2003-04-28 18:51           ` Jano
2003-04-27 18:49   ` tmoran
2003-04-27  2:36 ` Alex Gibson
2003-04-27 19:56   ` Peter Richtmyer
2003-04-27 16:43 ` Dr. Michael Paus
  -- strict thread matches above, loose matches on Subject: below --
2003-04-29 17:37 Lionel.DRAGHI
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox