Main Content

HIS Code Complexity Metrics

Note

Starting in a future release, Code prover will not support calculating code metrics. Migrate to Bug Finder for calculating code metrics. See HIS Code Complexity Metrics.

The following list shows the Hersteller Initiative Software (HIS) standard metrics that Polyspace® evaluates. These metrics and the recommended limits for their values are part of a standard defined by a major group of Original Equipment Manufacturers or OEMs. For more information on how to focus your review to this subset of code metrics, see Compute Code Complexity Metrics Using Polyspace.

Project

Polyspace evaluates the following HIS metrics at the project level.

MetricRecommended Upper Limit
Number of direct recursions (AP_CG_DIRECT_CYCLE)0
Number of recursions (AP_CG_CYCLE)0

File

Polyspace evaluates the HIS metric, comment density, at the file level. The recommended lower limit is 20.

Function

Polyspace evaluates the following HIS metrics at the function level.

MetricRecommended Upper Limit
Cyclomatic complexity (VG)10
Language scope (VOCF)4
Number of call levels (LEVEL)4
Number of calling functions (CALLING)5
Number of called functions (CALLS)7
Number of function parameters (PARAM)5
Number of goto statements (GOTO)0
Number of instructions (STMT)50
Number of paths (PATH)80
Number of return statements (RETURN)1

Related Topics