comp.lang.ada
 help / color / mirror / Atom feed
From: news.crd.ge.com!e7sa!groleau@uunet.uu.net  (Wes Groleau X7574)
Subject: Re: McCabe package for Ada?
Date: 19 May 93 20:03:28 GMT	[thread overview]
Message-ID: <C7AIDs.K3@crdnns.crd.ge.com> (raw)

In article <raj2.737741040@Isis.MsState.Edu> raj2@Isis.MsState.Edu (rex allan j
ones) writes:
>	Could someone please point me in the direction of a metrics package
>to compute McCabe's Cyclomatic Complexity for Ada programs?

Logiscope, from Verilog.
Or AdaDL, from SSD (?)
Or check the Ada Software Repository for something free.

Somone else (I hate "vi") wrote:
>Not that this answers your question, but since you bring it up :)
>
>Who is using McCabe, and why? What values are construed as "acceptable",
>"requires further investigation", and "this code is rejected"? How
>were these values derived? Enquiring minds want to know...

McCabe scores are not by themselves a very useful indication of Ada quality.
However, they can be of some use.  When someone hands me 2500 lines of 
code written by the guy that just quit, I look first at the routines with the
highest McCabe scores.  Almost always, if the score is over twenty, I can 
bring it down to 15 or less with some thoughtful re-design.  Not everyone
can make sense out of spaghetti code like that, so I see it as a "service" to
those that come after me--even if the code was already meeting its requirements
(of course I keep the old version for safety :-)  )

As far as what the values SHOULD be:  I have had to work on code written by
many other people.  Consequently I have a good idea of who writes "good stuff"
and who writes "bad stuff"  So I can get a list of the McCabe scores for all
of Fred's units in one list, all of Frieda's in another, etc. and compare.
The averages are usually QUITE different.

Wes G.

P.S. One thing McCabe doesn't show is what I call "hidden" complexity.
Hidden, because it doesn't show on a flow chart or path graph.  This kind of
complexity is produced by a technique more than one of my former colleagues
was fond of:  That of declaring lots of "flag" variables, and using them to
control branching at a point far away from where they were set.  I'd like
to see someone come up with a McCabe-like metric where if dotted lines are
drawn on a control graph connecting the setting of one of these flags with
all tests that depend on that setting, the metric would be affected by 
these lines and their nodes.  Whew! What's the complexity metric of that last
sentence?!?!? 

             reply	other threads:[~1993-05-19 20:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-19 20:03 Wes Groleau X7574 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-06-07 18:43 McCabe package for Ada? sgi!fido.asd.sgi.com!dblues!jackr
1993-06-05 19:29 David Boyd
1993-06-04 23:53 Kevin Sullivan
1993-06-04 22:07 dog.ee.lbl.gov!network.ucsd.edu!swrinde!cs.utexas.edu!csc.ti.com!tilde.cs
1993-06-04 21:44 Ala n R. Weiss
1993-06-04 21:25 Dani Zweig
1993-06-04 15:47 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!w
1993-06-04  6:24 Dani Zweig
1993-06-03 19:47 dog.ee.lbl.gov!network.ucsd.edu!sdd.hp.com!portal!lisburn!jaime
1993-05-27 17:55 Laurence VanDolsen
1993-05-26 22:42 David Boyd
1993-05-26 20:44 Wes Groleau X7574
1993-05-25 10:52 pipex!uknet!glasgow!unix.brighton.ac.uk!wjmc
1993-05-24 19:36 Alex Blakemore
1993-05-24  0:33 mole-end!mat
1993-05-19 23:04 David Boyd
1993-05-19 22:09 David Boyd
1993-05-19 21:18 agate!howland.reston.ans.net!darwin.sura.net!haven.umd.edu!news.umbc.edu!
1993-05-19 15:20 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!howland.
1993-05-19  0:44 sgi!fido.asd.sgi.com!dblues!jackr
1993-05-18 23:42 David Boyd
1993-05-18 21:26 dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!ux1.cso.uiuc
1993-05-18 19:24 dog.ee.lbl.gov!network.ucsd.edu!usc!howland.reston.ans.net!europa.eng.gte
replies disabled

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