Jump to content

Static program analysis

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by AlexWasFirst (talk | contribs) at 08:36, 7 November 2001 (Initial entry.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Static code analysis referes to a bunch of methods for anylising software source code in an effort to gain understanding and target areas for review and/or rewrite. The number of metrics (measures) that can be applied are numerous. One of the crudest measurments for example is the size of code, usually expressed in kLOC's (1000 lines of code). Defineing a consistent definition of a Line of Code has long been an item for debate.

One common metric in static analysis is McCabes Cyclomatic Complexity Metric which basically measure the number of choices a function makes. Functions with a high number of conditional statements (if's, while etc.) will have a high complexity therfore can be considered more likely to contain bugs and be harder to maintain.

Page on Software Measurment [1]