|
|
In this appendix, we will develop precise rules for the standard measurement of 19 program attributes for the C programming language. Moses did not come down from the mountain to give us our new 19 rules. They are not holy. They are, however, intended to be unambiguous and completely reproducible by others. That is the intent of a standard. It is hoped that this standard will serve as a framework for new measures for C program attributes and also as a framework for the development of similar standards for other programming languages.
This standard is meant to capture the metrics at the C function level. These are the smallest compilable C program units. This standard is carefully defined from the C compiler perspective. It will assume that all compiler directives have been resolved prior to the measurement process. Header files (the .h files) will have been resolved prior to measurement as well.
The proposed measurement standard will identify procedures for the precise enumeration of 19 metrics:
Comments
Executable statements
Nonexecutable statements
Operators
Unique operators
Unique nonoverloaded operators
Total operands
Unique operands
Unique actual operands
Nodes
Edges
Paths
Maximum path length
Average path length
Cycles
Total system fan-out
Unique system fan-out
Total standard C fan-out
Unique standard C fan-out
Each of these 19 metrics will be described in an unambiguous manner so that new measurement tools written to this standard will all produce identical results. That is the whole notion of a standard. These definitions will be organized into the four basic measurement groups: style and statement metrics, lexical metrics, control flowgraph metrics, and coupling metrics.
|
|