Nucleoplasmin ATPase: Difference between revisions
en>Citation bot 1 m Citations: [Pu168] added: issue, doi. You can use this bot yourself! Report bugs here. |
en>Anrnusna No edit summary |
||
| Line 1: | Line 1: | ||
< | '''Halstead complexity measures''' 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 the code. | |||
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 equation]]). | |||
Thus his metrics are actually not just complexity metrics. | |||
== Calculation == | |||
For a given problem, Let: | |||
* <math>\,\eta_1</math> = the number of distinct operators | |||
* <math>\,\eta_2</math> = the number of distinct operands | |||
* <math>\,N_1</math> = the total number of operators | |||
* <math>\,N_2</math> = the total number of operands | |||
From these numbers, several measures can be calculated: | |||
* Program vocabulary: <math>\eta = \eta_1 + \eta_2 \,</math> | |||
* Program length: <math>N = N_1 + N_2 \,</math> | |||
* Calculated program length: <math>\hat{N} = \eta_1 \log_2 \eta_1 + \eta_2 \log_2 \eta_2 </math> | |||
* Volume: <math>V = N \times \log_2 \eta </math> | |||
* Difficulty : <math>D = { \eta_1 \over 2 } \times { N_2 \over \eta_2 } </math> | |||
* Effort: <math>E = D \times V </math> | |||
The difficulty measure is related to the difficulty of the program to write or understand, e.g. when doing [[code review]]. | |||
The effort measure translates into actual coding time using the following relation, | |||
* Time required to program: <math>T = {E \over 18}</math> seconds | |||
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 {{Citation needed||reason='By whom?'|date=August 2013}}. | |||
== Example == | |||
Let us consider the following C program: | |||
<pre> | |||
main( ) | |||
{ | |||
int a, b, c, avg; | |||
scanf(“%d %d %d”, &a, &b, &c); | |||
avg = (a+b+c)/3; | |||
printf(“avg = %d”, avg); | |||
} | |||
</pre> | |||
The unique operators are: | |||
main,(),{},int,scanf,&/, printf | |||
The unique operands are: | |||
a, b, c, &a, &b, &c, a+b+c, avg, 3, “%d %d %d”, “avg = %d” | |||
Therefore, | |||
<math>\,\eta_1</math> = 12, <math>\,\eta_2</math> = 11 | |||
Calculated Program Length (or Estimated Length) = (12*log<sub>2</sub>12 + 11*log<sub>2</sub>11) = (12*3.58 + 11*3.45) = (43+38) = 81 | |||
Volume = Length*log(23) = 81*4.52 = 366 | |||
==References== | |||
<references /> | |||
== See also == | |||
* [[Function point]] | |||
* [[Cyclomatic complexity]] | |||
==External links== | |||
* [http://www.virtualmachinery.com/sidebar2.htm The Halstead metrics] - Extensive discussion on the calculation and use of Halstead Metrics in an object-oriented environment (with specific reference to Java). | |||
* [http://www.verifysoft.com/en_halstead_metrics.html Calculation of Halstead metrics] - Measurement of Halstead Metrics. | |||
* [http://www.win.tue.nl/~aserebre/2IS55/2010-2011/10.pdf Explanation with a Sample Program] - Example (on Page 6 of the PDF) | |||
[[Category:Software metrics]] | |||
Latest revision as of 06:33, 13 September 2013
Halstead complexity measures are software metrics introduced by Maurice Howard Halstead in 1977[1] 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 the code.
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 gas equation). Thus his metrics are actually not just complexity metrics.
Calculation
For a given problem, Let:
- = the number of distinct operators
- = the number of distinct operands
- = the total number of operators
- = the total number of operands
From these numbers, several measures can be calculated:
The difficulty measure is related to the difficulty of the program to write or understand, e.g. when doing code review.
The effort measure translates into actual coding time using the following relation,
Halstead's delivered bugs (B) is an estimate for the number of errors in the implementation.
- Number of delivered bugs : or, more recently, is accepted Potter or Ceramic Artist Truman Bedell from Rexton, has interests which include ceramics, best property developers in singapore developers in singapore and scrabble. Was especially enthused after visiting Alejandro de Humboldt National Park..
Example
Let us consider the following C program:
main( )
{
int a, b, c, avg;
scanf(“%d %d %d”, &a, &b, &c);
avg = (a+b+c)/3;
printf(“avg = %d”, avg);
}
The unique operators are: main,(),{},int,scanf,&/, printf
The unique operands are: a, b, c, &a, &b, &c, a+b+c, avg, 3, “%d %d %d”, “avg = %d”
Calculated Program Length (or Estimated Length) = (12*log212 + 11*log211) = (12*3.58 + 11*3.45) = (43+38) = 81
Volume = Length*log(23) = 81*4.52 = 366
References
- ↑ 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.
My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
See also
External links
- The Halstead metrics - Extensive discussion on the calculation and use of Halstead Metrics in an object-oriented environment (with specific reference to Java).
- Calculation of Halstead metrics - Measurement of Halstead Metrics.
- Explanation with a Sample Program - Example (on Page 6 of the PDF)