- = the number of distinct operators
- = the number of distinct operands
- = the total number of operators
- = the total number of operands
From these numbers, five measures are derived:
- Program length:
- Program vocabulary:
- Volume:
- Difficulty :
- Effort:
- Number of the used different operators (() and operand (), ), together the vocabulary size .
- Number of the altogether used operators () and operand (), together the implementation length .
From this then the sizes of Halstead length become () and Healstead volume () are calculated:
From the base quantities one can compute different characteristic numbers, e.g.:
Where D = difficulty of the program to write or understand, e.g. with one Code review (?).
From http://www.sei.cmu.edu/str/descriptions/halstead.html [1] and the German wikipedia entry.