User`s guide

Model Coverage for Stateflow Charts
18-45
Model Coverage for Stateflow Charts
In this section...
“How Model Coverage Reports Work for Stateflow Charts” on page 18-45
“Specify Coverage Report Settings” on page 18-46
“Cyclomatic Complexity” on page 18-46
“Decision Coverage” on page 18-47
“Condition Coverage” on page 18-50
“MCDC Coverage” on page 18-51
“Relational Boundary Coverage” on page 18-51
“Simulink Design Verifier Coverage” on page 18-51
“Model Coverage Reports for Stateflow Charts” on page 18-53
“Model Coverage for Stateflow State Transition Tables” on page 18-62
“Model Coverage for Stateflow Atomic Subcharts” on page 18-63
“Model Coverage for Stateflow Truth Tables” on page 18-66
“Colored Stateflow Chart Coverage Display” on page 18-71
How Model Coverage Reports Work for Stateflow Charts
To generate a Model Coverage report, select Analysis > Coverage > Settings and
specify the desired options on the Reporting tab of the Coverage Settings dialog box. For
Stateflow charts, the Simulink Verification and Validation software records the execution
of the chart itself and the execution of states, transition decisions, and individual
conditions that compose each decision. After simulation ends, the model coverage reports
on how thoroughly a model was tested. The report shows:
How many times each exclusive substate is entered, executed, and exited based on the
history of the superstate
How many times each transition decision has been evaluated as true or false
How many times each condition has been evaluated as true or false
Note: To measure model coverage data for a Stateflow chart, you must: