Main Content

Polyspace Platform: A Unified Platform for Static Analysis and Dynamic Testing

Polyspace® Platform is an integrated environment that supports static analysis and dynamic testing of C/C++ code with Polyspace products.

The term Polyspace Platform is an umbrella term that covers several Polyspace products:

  • Products that support static analysis such as Polyspace Bug Finder™ and Polyspace Code Prover™.

  • Products that support dynamic testing such as Polyspace Test™.

Using these products, you can cover most C/C++ code analysis and testing requirements and view the analysis and test results in a unified user interface. For instance:

  • You can find bugs, check for run-time errors, write and run unit tests, and perform other activities related to C/C++ development.

  • You can see an overview of results from all Polyspace products on a common dashboard. You can use the dashboard as a common starting point to drill down to further details of the results.

Desktop and Server Workflows Using Polyspace Platform

You can run the products covered by Polyspace Platform on a single desktop or perform automated runs on a server.

Desktop

On a desktop, Polyspace Platform comes with a user interface that supports project setup, configuration, running static analysis or tests, and reviewing results. You can also run a previously configured analysis using Windows® or Linux® scripts.

To run on a single desktop, you need one or more of these products:

  • Polyspace Bug Finder to find bugs, check for coding standard violations, compute code complexity metrics, and perform other related tasks.

  • Polyspace Code Prover to perform exhaustive checking for certain classes of run-time errors, calculate stack usage, and perform other related tasks.

    Polyspace Code Prover requires Polyspace Bug Finder.

  • Polyspace Test to author and run dynamic tests and calculate code coverage.

Note that the Polyspace Platform user interface is available only if you have a Polyspace Test license. You cannot access this user interface if you have a license of Polyspace Bug Finder only, or Polyspace Bug Finder and Polyspace Code Prover only, even though you can run all products from this user interface. After installing Polyspace Test, you can open the user interface by double-clicking the Polyspace Test R2024b shortcut on your desktop or using the executable polyspaceroot\polyspace\bin\polyspace-desktop-ui, where polyspaceroot is the Polyspace installation folder, for instance, C:\Program Files\Polyspace\R2024b.

Continuous Integration (CI) Server

Polyspace Platform also supports multi-user workflows of various types. In the most common workflow, you can set up a Continuous Integration (CI) server that runs code analysis and tests each time new code changes are submitted to the server.

To perform automated runs on a server, you need one or more of these products:

  • Polyspace Bug Finder Server™, which performs the same tasks as Polyspace Bug Finder, but supports automated runs on a server.

  • Polyspace Code Prover Server, which performs the same tasks as Polyspace Code Prover, but supports automated runs on a server.

    Polyspace Code Prover Server requires Polyspace Bug Finder Server.

  • Polyspace Test, which works both on desktops and servers.

  • Polyspace Access™, which can host results from all Polyspace products for access from a web browser.

Benefits of Polyspace Platform

Polyspace Platform covers most of your code analysis and testing requirements in one common interface. In practice, this means that:

  • For single-user desktop workflows, you can perform all activities related to C/C++ code checking in one interface: find bugs, check against coding standards, run tests, check code coverage, and so on.

  • For multi-user server-based workflows, you can run a script to perform all activities related to code checking.

The next sections describe these benefits with respect to a single-user desktop workflow. You have equivalent benefits in the multi-user server-based workflows.

Shared Project Setup

Workflows in the Polyspace Platform user interface start from a project. Consider this example of a typical project:

Polyspace project structure

You can add C/C++ source files to the project, configure build options, optionally change defaults for static analysis or testing options, and start running static analysis or tests. Adding sources and configuring build options is required only once, irrespective of whether you want to find bugs or write and run tests.

Shared Build Configuration

Consider this example of a build configuration in a Polyspace Platform project:

Build configuration in Polyspace Platform

You can use this build configuration both for static analysis and for running tests:

  • Polyspace Bug Finder and Polyspace Code Prover use the build information to emulate your compiler and check your sources for compliance with the C/C++ language standard, before running static analysis.

  • Polyspace Test uses the build information to build and run your sources and tests using your compiler.

Unified Dashboard for Static Analysis and Test Results

In the Polyspace Platform user interface, you can see an overview of all results on a single dashboard.

Results overview dashboard

Each family of results has its own dashboard. For instance, the dashboard showing defects found with Polyspace Bug Finder looks like this:

Defects dashboard

The dashboards for various families of results (defects, coding standard violations, tests, coverage) follow a similar layout.

Same Layout for Static Analysis and Test Results

Polyspace Platform displays all results in a similar layout, whether or not the results are from static analysis or dynamic tests.

To review results in the Polyspace Platform user interface, you first open a set of results from a project or from a result dashboard. You can see a list of issues on the left side of the results and issue details along with highlighted code on the right side.

Results List, Result Details, and Source code panes of Polyspace showing a Polyspace Bug Finder result.

You can start reviewing results by clicking on items on the Results List pane and drilling down to the details on the Result Details and Source Code pane. Once you review a result, you can add review information, such as the Status, Severity, and optional notes. This workflow is similar for all families of results (defects, coding standard violations, tests, coverage).

Static Analysis Products Complement Dynamic Testing

The static analysis products can provide information that makes the dynamic testing workflow easier. In particular: