Halstead complexity measures: Difference between revisions

Content deleted Content added
Tag: Reverted
Add: redlink for Maurice Howard Halstead
 
(8 intermediate revisions by 7 users not shown)
Line 1:
{{short description|Software maintainability index}}
'''Halstead complexity measures''' are [[software metric]]s introduced by [[Maurice Halstead|Maurice Howard Halstead]] in 1977<ref name="Elements of Software Science">{{cite book |author=Halstead, Maurice H. |title=Elements of Software Science |publisher=Elsevier North-Holland, Inc. |___location=Amsterdam |year=1977 |isbn=0-444-00205-7}}</ref> as part of his treatise on establishing an empirical science of software development.
Halstead made the observation that metrics of the software should reflect the implementation or expression of algorithms in different languages, but be independent of their execution on a specific platform.
These metrics are therefore computed statically from the code.
Line 29:
 
Halstead's delivered bugs (B) is an estimate for the number of errors in the implementation.
*Number of delivered bugs : <math>B = {E^{2 \over 3} \over 3000}</math> or, more recently, <math>B = {V \over 3000}</math> is accepted.<ref {{Citation needed||reasonname='By"Elements whom?'|date=Augustof 2013}}.Software Science" />
 
== Example ==
Line 40:
int a, b, c, avg;
scanf("%d %d %d", &a, &b, &c);
avg = (a-+b-+c)/43;
printf("avg = %d", avg);
}