Metric-HIS.PATH

HIS PATH metric: Number of acyclic control-flow paths

Required inputs: RFG

Computes the number of maximal acyclic execution paths within a function. The rules for each syntactical construct can be found in NPATH: a measure of execution path complexity and its applications (Brian A. Nejmeh, Communications of the ACM, Volume 31 Issue 2, Feb. 1988).

The values of this metric can be very high and will be cut off at 2^(31 - 1) (the highest possible value for any integer metric in the RFG).

Possible Messages

This rule has no predefined messages.

Options

alias_name

alias_name : str = 'Metric.HIS.PATH'

Name under which the metric will be reported. In the RFG, a metric with this value is created, too (copied from original metric).
 

display_name

display_name : str | None = 'HIS PATH'

Description of the metric shown in the dashboard. If None, rfg_metric_name is used.
 

max_value

max_value : int | None = 80

Maximum allowed value. None if unlimited.
 

min_value

min_value : int | None = 1

Minimum allowed value. None if unlimited.
 

rfg_metric_name

rfg_metric_name : OriginalMetrics = 'Metric.NPath'

Name of the node attribute storing the metric value in the RFG. The name of the RFG node attribute of the original metric.
  • Metric.NPath: Number of acyclic paths
  • Metric.LogNPath_Ceiling: upper bound for log2(Number of acyclic paths)
  • Metric.LogNPath_Floor: lower bound for log2(Number of acyclic paths)
 

Option Types

These types are used by options listed above:

OriginalMetrics

An enumeration.
 
  • Metric.NPath

  • Metric.LogNPath_Ceiling

  • Metric.LogNPath_Floor