A measurement of structure for unstructured programming languages

  • Authors:
  • Gary W. Cobb

  • Affiliations:
  • -

  • Venue:
  • Proceedings of the software quality assurance workshop on Functional and performance issues
  • Year:
  • 1978

Quantified Score

Hi-index 0.00

Visualization

Abstract

Software Science is a field of Natural Science which deals with the development of measurements which reveal properties of software programs. These measurements are qualified as to their degree of correlation to human beings being able to construct or understand a subject program. Maurice Halstead has pioneered much of the theories in this field ((5) through (10)), which applies statistical and psychological testing techniques to the evaluation of the measurements. The basic inputs to the Halstead predictors are easily measured: the number of distinct operators and operands, and the number of occurrences of the operators and operands. Due to the statistical nature of the measurements, there can be erroneous results when applying them to small sample spaces. However, the predictors are very adequate when applied to large samples, that is, large software systems. In an excellent review article by Fitzsimmons and Love (4), it is pointed out that several of the estimators defined by Halstead assumed that the subject programs were well-structured, and inaccurancy in the predictors can result if they are applied to "unpolished" programs. In fact, Halstead qualified six classes of impurities in code which can cause the length predictor to be inaccurate. The definition of volume for software, another predictor introduced in Halstead's book, is related to the level of the specification of the program. An algorithm which is written in assembly language will have a greater volume than the same algorithm written in Pascal, due to the richness of the semantic constructs that are available in the higher-level languages. Hence, this predictor is language dependent.