After running Polyspace (Code Prover), in the "Reasons for Unchecked Code" section, if the progress of the "code operations" is not 100%, I would like to know how the percenta

20 次查看(过去 30 天)
After running Polyspace (Code Prover), in the "Reasons for Unchecked Code" section, if the progress of the "code operations" is not 100%, I would like to know how the percentage of "code operations" is calculated and what specifically "code operations" refer to.

回答(1 个)

Dheeraj
Dheeraj 2024-7-24,5:59
Hi 新宝,
I understand you seek to know how the "Code Operations" column which is seen in the Polyspace Code Prover Dashboard.
Code operations is the percentage of elementary operations in verified functions that are checked for run-time errors. Hence, can be calculated as follows,
(number of code operations reached/ total number of code operations present in software) * 100
You could refer to the below MATLAB documentation for more details about the Polyspace Code Prover Dashboard:
Thank you.
  1 个评论
新宝
新宝 2024-7-24,7:07
Hi Dheeraj, I have read your response, but I still have some questions about this part.
What is the definition of code operations, and how are the 'number of code operations reached' and 'total number of code operations present in software' calculated? Is the diagram below an explanation of code operations? It seems to suggest that code operations refer to checks on the code, as the definition of a variable like 'int x' doesn't require any checks, so it doesn't count as a code operation. However, the line 'x = 1 / x; x = x + 1;' undergoes five checks such as 'overflow check', so the total number of code operations is five. But in reality, only the 'Non-initialized local variable' check was performed, so the number of code operations reached is one. The percentage of code operations is then 20%. Is my understanding correct?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Generate Report 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by