Skip to Main Content Skip to Search
Product Documentation

Opening Verification Results

Downloading Results from Server to Client

When you run a verification on a Polyspace server, the Polyspace software automatically downloads the results to the client system that launched the verification. The results are also stored on the Polyspace server, and you can download the results from the server to other client systems.

To download verification results from a server to a client system:

  1. Double-click the Polyspace Spooler icon.

    The Polyspace Queue Manager Interface opens.

  2. Right-click the job that you want to view, and select Download Results .

      Note   After downloading your results, to remove the job from the queue , from the context menu, select Download Results And Remove From Queue .

    The Save dialog box opens.

  3. Select the folder into which you want to download results.

  4. Click Save to download the results and close the dialog box.

    When the download is complete, a dialog box opens asking if you want to open the Polyspace results.

  5. Click Yes to open the results.

Once you download results, they remain on the client. You can review them at any time using the Polyspace Results Manager perspective.

Downloading Server Results Using the Command Line

You can download verification results at the command line using the psqueue-download command.

To download your results, enter the following command:

Polyspace_Common/RemoteLauncher/bin/psqueue-download <id> <results dir>

The verification <id> is downloaded into the results folder <results dir>.

Once you download results, they remain on the client. You can review them at any time using the Polyspace Results Manager perspective.

The psqueue-download command has the following options:

For more information on managing verification jobs at the command line, see Managing Verifications in Batch.

Downloading Results from Unit-by-Unit Verifications

If you run a unit-by-unit verification, each source file is sent to thePolyspace Server individually. The queue manager displays a job for the full verification group, as well as jobs for each unit (using a tree structure).

You can download and view verification results for the entire project or for individual units.

To download the results from unit-by-unit verifications:

Opening Verification Results from the Project Manager Perspective

You can open verification results directly from the Project Browser in the Project Manager perspective. Because each Polyspace project can contain multiple verifications, the Project Browser allows you to quickly identify and open the results that you want to review.

To open verification results from the Project Manager:

  1. Open the project containing the results that you want to review.

  2. In the Project Browser Source tree, navigate to the results that you want to review.

  3. Double-click the results file.

    The results open in the Results Manager perspective.

Opening Verification Results from the Results Manager Perspective

Use the Results Manager perspective to review verification results. If you know the location of the results file that you want to review, you can open it directly from the Results Manager perspective.

To open verification results from the Results Manager perspective:

  1. On the Polyspace verification environment toolbar, click the Results Manager button .

  2. Select File > Open Result

    The Open results dialog box opens.

  3. Select the results file that you want to view.

  4. Click Open.

    The results open in the Results Manager perspective.

Exploring the Results Manager Perspective

Overview

The Results Manager perspective looks like the following figure.

The Results Manager perspective has six sections below the toolbar. Each section provides a different view of the results. The following table describes these views.

This Pane or Tab ...Displays ...
Results Explorer\Results Summary
(Procedural entities view)
List of checks (diagnostics) for each file and function in the project
Source
(Source code view)
Source code for a selected check in the procedural entities view
Check Details
(Selected check view)
Details about the selected check
Check Review\Review Statistics
(Coding review progress view)
Review information about selected check

Statistics about the review progress for checks with the same type and category as the selected check

Variable Access
(Variables view )
Information about global variables declared in the source code
Call Hierarchy
(Call tree view)
Tree structure of function calls

You can resize or hide any of these sections.

Results Explorer Tab

The Results Explorer tab displays a table with information about the diagnostics for each file in the project. The Results Explorer tab is also called the Procedural entities view.

The checks in the Procedural entities view are colored as follows:

Polyspace software assigns files and functions the color of the most severe error found in that file. For example, the file example.c is red because it has run-time errors.

The first column of the table is the procedural entity (the file or function). The following table describes some of the other columns in the procedural entities view.

Column HeadingIndicates

Number of red checks (operations where an error always occurs)

Number of gray checks (unreachable code)

Number of orange checks (warnings for operations where an error might occur)

Number of purple checks (coding rule violations)

Number of green checks (operations where an error never occurs)

Selectivity of the verification (percentage of checks that are not orange), which is an indication of the level of proof.

You can select which columns appear in the procedural entities view by right-clicking the Procedural entities column heading and selecting the columns you want to display.

Code Coverage Metrics.  In the Procedual entities view, the software displays two metrics for the project:

These metrics provide:

Unreachable Functions.  If the verification detects functions that cannot be reached from the main program, it does not verify them. The software considers these functions to be unreachable, and highlights them in gray in the procedural entities view.

In this example, the function Unreachable_Code is considered unreachable, and therefore is not verified.

Source Pane

The Source pane shows the source code with colored checks highlighted. The Source Pane is also called the Source code view.

Tooltips.  Placing your cursor over a check displays a tooltip that provides ranges for variables, operands, function parameters, and return values. For more information on tooltips, see Using Range Information in the Results Manager Perspective.

Examining Source Code.  In the Source pane, if you right-click a text string, the context menu provides options that help you to examine your code. For example, right-click the global variable PowerLevel:

Use the following options to examine and navigate through your code:

Managing Multiple Files in Source Pane.  You can view multiple source files in the Source pane. By default, the files are displayed as tabs in the Source pane.

On the Source pane toolbar, right-click any tab to manage source files.

From the Source pane context menu, you can:

Check Details Pane

The Check Details pane displays information about the current check. The Check Details pane is also called the Selected check view.

Error Call Graph.  Click the Show error call graph icon in the Check Details pane toolbar to display the call sequence that leads to the code associated with a check.

For more information, see Displaying the Call Sequence for a Check.

Check Review Tab

When reviewing checks, use the Check Review tab to mark checks as Justified, and enter comments to describe the results of your review. This helps you track the progress of your review and avoid reviewing the same check twice.

For more information, see Reviewing and Commenting Checks .

Review Statistics Tab

The Review Statistics tab displays statistics about how many checks you have reviewed. As you review checks, the software updates these statistics.

The Count column displays a ratio and the Progress column displays the equivalent percentage.

The first row displays the ratio of justified checks to total checks that have the same color and category of the current check. In this example, the first row displays the ratio of reviewed red IDP checks to total red IDP errors in the project.

The second row displays the ratio of justified checks to total checks that have the color of the current check. In this example, this is the ratio of red errors reviewed to total red errors in the project.

The last row displays the ratio of the number of green checks to the total number of checks, providing an indicator of the reliability of the software.

Variable Access Pane

The Variable Access pane, which is also called the Variables view, displays global variables. The pane shows where in the source code the variables are read or written to, and provides:

The software does not treat the addressing operation on a global variable or object (in C++) as a read or write access operation. For example, consider the following C++ code.

class C0 
{ 
public: 
  C0() {} 
  int get_flag() 
  { 
    volatile int rd; 
    return rd; 
  } 
  ~C0() {} 
private: 
  int a;                /* Never read/written */ 
}; 

C0 c0;                  /* c0 is unreachable */ 

int main() 
{ 
  if (c0.get_flag())    /* Uses address of the method */ 
    { 
      int *ptr = take_addr_of_x(); 
      return 1; 
    } 
  else 
    return 0; 
}

The object c0 is unreachable (gray). However, you will not see the method call c0.get_flag() in the Variable Access pane because the call is an addressing operation on the method belonging to the object c0.

Concurrent Access Graph.  Click the Show Access Graph button in the Variable Access pane toolbar to display a graph of read and write access for the selected variable.

For more information, see Displaying the Access Graph for Variables.

Non Shared Variables.  Click the Non-Shared Variables button in the Variable Access pane toolbar to show or hide non-shared variables.

Read and Write Access in Dead Code.  If a read or write access operation on a global variable lies within dead code, then Polyspace colors the operation gray in the Variable Access pane. When you examine verification results, you can hide these operations by clicking the filter button .

Legend Information.  To display the legend for a variable, right-click the variable and select Show legend.

Call Hierarchy Pane

The Call Hierarchy pane displays the call tree of functions in the source code. You can use the call tree view to easily navigate up and down the call tree. The Call Hierarchy pane is also called the Call Tree view.

Callers and Callees.  Click the buttons in the Call Tree View toolbar to show or hide callers and callees.

Function Definitions.  To go directly to the definition of a function, right-click the function call and select Go to definition.

Selecting Review Level

On the Results Manager toolbar, use the slider to specify the review level.

You can review results from five different levels:

The default setting is 1.

Searching Results in Results Manager Perspective

You can search your results and source code using the Search feature in the Results Manager perspective toolbar.

The Search toolbar allows you to quickly enter search terms, specify search options, and set the scope for your search.

You can limit the scope of your search to only file content, only expanded nodes, or you can search the complete hierarchy.

When you perform a search, your search results are reported in the Search tab.

Search results are organized by location:

On the Search tab toolbar, you can use the four filter buttons to hide results from any of these locations.

Setting Character Encoding Preferences

If the source files that you want to verify are created on an operating system that uses different character encoding than your current system (for example, when viewing files containing Japanese characters), you receive an error message when you view the source file or run certain macros.

The Character encoding option allows you to view source files created on an operating system that uses different character encoding than your current system.

To set the character encoding for a source file:

  1. Select Options > Preferences.

  2. In the Polyspace Preferences dialog box, select the Character encoding tab.

  3. Select the character encoding used by the operating system on which the source file was created.

  4. Click OK.

  5. Close and restart the Polyspace verification environment to use the new character encoding settings.

Opening Results for Generated Code

When opening results for automatically generated code, the software must know which code generator created the code, so that it can interpret comments and create back-to-source links in the Results Manager perspective.

If you launched the verification using the Polyspace Model Link SL or Polyspace Model Link TL products, the software automatically creates a file in the results folder called code_generator_used.txt to provide this information. However, if you did not use these products to launch verification, you must provide this information manually.

To manually specify which code generator created the code:

  1. Open your results in the Results Manager perspective.

  2. Select Review > Code Generator Support > code_generator

Manually Creating the Code Generator Text File

To avoid specifying the code generator each time you open your results, you can manually create a file named code_generator_used.txt in your results folder. The software then automatically uses this file each time you open the results.

The format of this file is:

<Code generator> 
MATLABROOT=<Path to MATLAB>
ModelVersion=<model name>:<model version>

<Code generator> can be either RTWEmbeddedCoder or TargetLink.

For example:

RTWEmbeddedCoder 
MATLABROOT=C:\MATLAB\R2010b 
ModelVersion=demo_ml:1.94
  


 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS