Halstead complexity measures

Halstead complexity measures

Halstead complexity measures are software metrics indroduced by Maurice Howard Halstead in 1977. These metrics are computed statically, without program execution.

Calculation

First we need to compute the following numbers, given the program:
* n1 = the number of distinct operators
* n2 = the number of distinct operands
* N1 = the total number of operators
* N2 = the total number of operands

From these numbers, five measures can be calculated:
* Program length:N = N1 + N2 ,
* Program vocabulary: n = n1 + n2 ,
* Volume: V= N imes log_2 n ,
* Difficulty : D= { n_1 over 2 } imes { N_2 over n_2 } ,
* Effort: E= D * V ,

The difficulty measure is related to the difficulty of the program to write or understand, e.g. when doing code review.

See also

* Function point
* Cyclomatic complexity

External links

* [http://www.sei.cmu.edu/str/descriptions/halstead.html Halstead complexity measures] by Edmond VanDoren, Kaman Sciences, Colorado Springs.


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Halstead (disambiguation) — Halstead may refer to:Place names;United Kingdom * Halstead, a town in Essex, England * Halstead, Kent, a village in Kent, England * Fort Halstead, a British military research site;United States * Halstead, Kansas, a city in Harvey CountyPeople*… …   Wikipedia

  • Cyclomatic complexity — (or conditional complexity) is a software metric (measurement). It was developed by Thomas J. McCabe, Sr. in 1976 and is used to indicate the complexity of a program. It directly measures the number of linearly independent paths through a program …   Wikipedia

  • Programming Complexity — Programming Complexity, which is often also referred to as Software Complexity is a term that encompasses numerous properties of a piece of software, all of which affect internal interactions. According to several commentators, including… …   Wikipedia

  • Function point — A function point is a unit of measurement to express the amount of business functionality an information system provides to a user. Function points are the units of measure used by the IFPUG Functional Size Measurement Method. The IFPUG FSM… …   Wikipedia

  • Maintainability — In engineering, maintainability is the ease with which a product can be maintained in order to: isolate defects or their cause correct defects or their cause meet new requirements make future maintenance easier, or cope with a changed environment …   Wikipedia

  • Software quality — Contents 1 Motivation for Defining Software Quality 2 Definition 3 Alternative Approaches to Software Quality Defin …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”