A new methodology of measuring software complexity is proposed based on pro
gram decomposition mechanisms. The purpose of our research is to improve th
e quality and reliability of software by using a good measurement of the co
mplexity of the software. Thus software development cost can be reduced due
to the fewer errors introduced. We present a complete survey of Various me
trics in the literature. Six types of metrics or measurement techniques are
discussed, including some earlier research results of the authors. We then
propose a program decomposition mechanism based on the operational semanti
cs of several languages constructs in most procedural languages. An algorit
hm along with some examples is also given to show the feasibility of our me
chanism. Our approach, relies on the path complexity of a program, is more
accurate and easier to be realized. The algorithm also points out that how
many individual complete paths of a program need to be tested.