Halstead complexity measures
Appearance
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 are derived:
Program length
N= N1 + N2
Program vocabulary
n= n1 + n2
Volume
V= N * (LOG2 n)
Difficulty
D= (n1/2) * (N2/n2)
Effort
E= D * V
From http://www.sei.cmu.edu/str/descriptions/halstead.html [1]