Is it possible to collect the number of function calls in unreachable gray code? Call coverage metrics

4 views (last 30 days)
Hello,
I would like to extract the call coverage metrics from the Polyspace Code Prover analysis results.
Is there an automatic way to count the number of function calls in the unreachable code (gray checks)?
Based on this number and the total number of function calls I want to calculate the call coverage which is a recommended metrics from ISO 26262-6:2018(E), chapter 10.4.5, Table 12.
Remark: Call coverage refers to the percentage of executed functions in relation to each implemented call of these functions in the source code.
Example:
In this example the number of function calls in "unreachable code" would be incremented to 1 (function Det_ReportError() is never called).
To calculate the call coverage I would need the number of implemented function calls in the unreachable gray code.
The total number of function calls is already reported by Polyspace in "Function Metrics for: Number of Call Occurrences".
Thank you.

Answers (0)

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!