Halstead complexity measures: Difference between revisions

Content deleted Content added
No edit summary
Undid revision 565280468 by 14.139.190.98 (talk)
Line 1:
'''Halstead complexity mehttp://en.wikipedia.org/wiki/Main_Pageasuresmeasures''' are [[software metric]]s introduced by Maurice Howard Halstead in 1977<ref>{{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 makes 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 http://en.wikipedia.org/wiki/Main_Pagethethe code.
 
http://en.wikipedia.org/wiki/Main_Page
Halstead's goal was to identify measurable properties of software, and the relations between them.
This is similar to the identification of measurable properties of matter (like the volume, mass, and pressure of a gas) and the relationships between them (analogous to the [[ideal gas law|gas equahttp://en.wikipedia.org/wiki/Main_Pagetionequation]]).
Thus his metrics are actually not just complexity metrics.http://en.wikipedia.org/wiki/Main_Page
 
http://en.wikipedia.org/wiki/Main_Pagehttp://en.wikipedia.org/wiki/Main_Pagehttp://en.wikipedia.org/wiki/Main_Page
== Calculation ==http://en.wikipedia.org/wiki/Main_Page
For a given problem, Let:
* <math>\,\eta_1</math> = the number of distinct operators
* <math>\,\eta_2</math> = the number of distinct operandshttp://en.wikipedia.org/wiki/Main_Pageoperands
* <math>\,N_1</math> = the total number of operators
* <math>\,N_2</math> = the total number of operands