Filter löschen
Filter löschen

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 Ansichten (letzte 30 Tage)
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.

Antworten (1)

Dheeraj
Dheeraj am 24 Jul. 2024 um 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 Kommentar
新宝
新宝 am 24 Jul. 2024 um 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?

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by