User`s guide

Types of Model Coverage
15-3
Types of Model Coverage
Simulink Verification and Validation software can perform several types of coverage
analysis.
In this section...
“Cyclomatic Complexity” on page 15-3
“Condition Coverage (CC)” on page 15-4
“Decision Coverage (DC)” on page 15-4
“Lookup Table Coverage” on page 15-4
“Modified Condition/Decision Coverage (MCDC)” on page 15-5
“Relational Boundary Coverage” on page 15-6
“Saturate on Integer Overflow Coverage” on page 15-8
“Signal Range Coverage” on page 15-8
“Signal Size Coverage” on page 15-9
“Simulink Design Verifier Coverage” on page 15-9
Cyclomatic Complexity
Cyclomatic complexity is a measure of the structural complexity of a model. It
approximates the McCabe complexity measure for code generated from the model. The
McCabe complexity measure is slightly higher on the generated code due to error checks
that the model coverage analysis does not consider.
To compute the cyclomatic complexity of an object (such as a block, chart, or state), model
coverage uses the following formula:
c o
n
N
=
( )1
1
N is the number of decision points that the object represents and o
n
is the number of
outcomes for the nth decision point. The tool adds 1 to the complexity number for atomic
subsystems and Stateflow charts.