comp.lang.ada
 help / color / mirror / Atom feed
From: sparky!dwb@uunet.uu.net  (David Boyd)
Subject: Re: McCabe package for Ada?
Date: 18 May 93 23:42:50 GMT	[thread overview]
Message-ID: <1993May18.234250.18247@sparky.imd.sterling.com> (raw)

In article <1993May18.192447.9259@saifr00.cfsat.honeywell.com> shanks@saifr00.c
fsat.honeywell.com (Mark Shanks) writes:
>Who is using McCabe, and why? 
We are.  We are utilizing the tools currently for two purposes.  One is to
gather some type of complexity and quality metrics for software.  These 
metrics can be used to support costing and estimates when inheriting legacy
software.  The other use we are making of the software is for the Tuning
phase of an Evolutionary Prototyping Lifecycle.  High values for the various
metrics tend to indicate modules which should be looked at for tuning.  Several
organizations are using the metrics for supporting structured testing and
looking at the path coverages of their testing.  Other uses are selective
re-engineering (modules with high complexity tend to have high error rates),
and reduncy elimination (modules with similar values tend to be similar).

>What values are construed as "acceptable",
>"requires further investigation", and "this code is rejected"? 

	This depends entirely on your organization and what limits
you want to set out.  I am of the belief that there are some algorithms or
functions that are inherently complex (the example I use is regular expression
compilation/matching).  Some constructs such as consectutive case statements
generate abnormally high cyclomatic complexities.  My general feeling is that
these are primarily indicators of where to concentrate reviews/walkthroughs.
The following were the ranges I used on a recent
project for cyclomatic, essential, and design.  All of these were given with
the caveat that after inspection an informed cost/benefits analysis on 
whether or not the module would be re-written would be done.

		Cyclomatic	Essential	Design
Good		   <10		   <5		  <8
Acceptable	   <50		   <10		  <16
Marginal	   <100	           <100		  <100
Unacceptable	   100+		   100+           100+

>How were these values derived? Enquiring minds want to know...
	The best reference for this is the National Bureau of Standards
publication NBS Special Publication 500-99 "Structured Testing: A Software
Testing Methodology Using the Cyclomatic Complexity Metric".  This explains
the theory and math behind Cyclomatic and Essential.  Design complexity is
derived from Cyclomatic complexity and is the count of basis paths through
a module which interact with other modules. 


-- 
David W. Boyd	             UUCP:     uunet!sparky!dwb
Sterling Software IMD        INTERNET: dwb@IMD.Sterling.COM
1404 Ft. Crook Rd. South     Phone:    (402) 291-8300 
Bellevue, NE. 68005-2969     FAX:      (402) 291-4362

             reply	other threads:[~1993-05-18 23:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-18 23:42 David Boyd [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 20:03 Wes Groleau X7574
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 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