Main Content

Address Results in Polyspace Platform User Interface Through Bug Fixes or Justifications

Once you understand the root cause of a Polyspace® finding, you can fix your code. Otherwise, add review information to your Polyspace results to fix the code later or to justify the result. You can use the information to keep track of your review progress.

Flowchart detailing fix or justify finding process

If you add review information to your results file, they carry over to the results of the next analysis on the same project. If you add the same information as comments to your code (annotate), they carry over to any subsequent analysis of the code, whether in the same project or not. You can also hide results using code annotations.

Add Review Information to Results File

You can add review information in the Result Details pane. Select a result in the Results List, then in the Result Details pane, set the Severity and Status fields. Optionally, add notes in the Comment field.

Example of set Severity and Status fields

The status indicates your response to the Polyspace result. If you do not plan to fix your code in response to a result, assign one of the following statuses:

  • Justified

  • No Action Planned

  • Not a Defect

These statuses indicate that you have given due consideration and justified that result (retained the code despite the result). Note that subsequent analyses continue to show justified results as before. For instance, a Code Prover result that was previously orange does not turn green after justification. However, during review, you can filter out justified results in one click and focus only on results that are not justified. See Filter and Sort Results in Polyspace Platform User Interface.

You can also create and assign custom statuses. To create a new status:

  1. In the Polyspace Preferences dialog box, in the Review Statuses (Static Results only) section, click the Add User Status icon icon.

  2. Enter your status in the Add User Status dialog box. If you want your custom status to act as a justified status, select the Justified check box.

  3. Click Create to add your custom status to the User Statuses group.

Your custom status displays at the bottom of the Status dropdown list in the Result Details pane.

A Polyspace Test™ result can inherit the Jusified status. If you assign a parent node the Justified status, all the child nodes of the parent node inherit that status. A child node with an inherited Justified status shows an Inherited label in the Result Details pane.

Comment or Annotate in Code

You can add specific code comments or annotations in response to Polyspace results. If you enter code comments or annotations in a specific syntax, on the next analysis of the code, the software can read them and populate the Severity, Status, and Comment fields in the result details.

You can type the annotation directly into your code on on the same line as the result. See the annotation syntax in Annotate Code and Hide Known or Acceptable Results.If you type the annotation without explicitly assigning a status, Polyspace assumes that you have set a status of No Action Planned. The software hides the result from all places (except reports needed for certification1 ). The only exceptions are the safety-critical Code Prover run-time checks, which are hidden from the results list but not the source code. If you want to explicitly set a status, first fill the Status field for a result and then copy the annotation to your code. Paste on the line containing the result.

Import Review Information in Polyspace Platform User Interface

By default, review information is imported automatically from the most recent analysis to the next analysis. You can also manually import review information from a selected analysis.

To import review information from one set of analysis results to another in the Polyspace Platform user interface:

  1. Open the results which you want to import result details information.

  2. Select Import Comments in the toolstrip.

  3. In the explorer window that opens, select the results file (.psbf or .pscp) that contains the review information that you intend to import into your current results and click Open.

Polyspace imports the following results details information:

  • Status

  • Severity

  • Comments

Polyspace does not overwrite existing result details information when you import new result details.

If the results you are attempting to import are not compatible with the results you are importing to, an error message appears saying the import is not possible.


1 Reports generated from Polyspace results are typically meant for archiving and certification. Therefore, the reports contain all Polyspace results, justified or otherwise. Justified results show the justification status, for instance, No Action Planned, along with comments supporting the justification. These reports allow standards committees such as certification authorities to verify if a Polyspace result was justified for approved reasons.