Polyspace® checks C/C++ code for bugs, run-time errors, coding standard violations, and other issues by using static analysis. You can run a Polyspace analysis on server class machines and review the analysis results on a web browser with these products:
Polyspace Bug Finder Server for execution on servers and Polyspace Bug Finder Access for web browser based review of results
Polyspace Code Prover Server for execution on servers and Polyspace Code Prover Access for web browser based review of results
By using these products with a build automation tool, you can incorporate a Polyspace analysis into continuous integration systems.
In a continuous integration process, developers submit code to a shared repository. An automated build system builds and tests each code submission at regular intervals or based on predefined triggers, and then integrates the code. You can run a Polyspace analysis as part of this process.
The workflow consists of three steps:
Triggering Polyspace analysis:
When developers submit their code, a build automation tool such as Jenkins triggers the Polyspace analysis.
Running Polyspace analysis:
The analysis is run by using the products, Polyspace Bug Finder™ Server™ or Polyspace Code Prover™ Server. The results are uploaded to a server that hosts the Polyspace Access web interface. The same computer can act as the server that runs the analysis and hosts the uploaded results.
Reviewing analysis results:
To see the uploaded results, each reviewer must have a Polyspace Bug Finder Access™ or Polyspace Code Prover Access license to login to the Polyspace Access web interface.
These steps describe a workflow after code submission. Before code submission, individual developers can:
Run a Polyspace analysis and review the results on their desktops. See Install Polyspace Desktop Products (Polyspace Bug Finder).
Offload a Polyspace analysis from their desktops to a remote server and review the downloaded results on their desktops. See Install Products for Submitting Polyspace Analysis from Desktops to Remote Server.
For an overview of all Polyspace products, see Polyspace Products for Code Analysis and Verification.
For this workflow, you must install the following products on the computer or computers that act as the server.
Install Polyspace Bug Finder Server or Polyspace Code Prover Server to run the analysis and upload results to a web interface for review.
Installation. Run the MathWorks® installer. Choose a license for Polyspace server products. You can get the installer and license by purchasing the product or requesting a trial. For detailed instructions, see Installation, Licensing, and Activation.
You require Polyspace Bug Finder Server to install Polyspace Code Prover Server. For more efficient analysis, the computer that runs the analysis should have at least four physical cores, with at least 4 GB of memory per core. Beyond four cores, a Code Prover analysis cannot be further parallelized. A Bug Finder analysis can use the maximum number of available cores.
Installation Folder. A default installation folder is used based on your operating system and the release version. During installation, you can change this default folder if needed.
For instance, the default installation folder for release R2019a is listed here.
|Operating System||Default Installation Folder|
|Linux® (most distributions)|
Install the components to host the web interface of Polyspace Access.
Each reviewer must have a Polyspace Bug Finder Access and/or Polyspace Code Prover Access license to view the results on the web interface.
Each reviewer with a Polyspace Bug Finder Access license can review the dashboard with an overview of analysis results and Bug Finder result details.
Each reviewer with a Polyspace Bug Finder Access and Polyspace Code Prover Access license can review the Code Prover result details (in addition to the dashboard and Bug Finder result details).
Note that a Polyspace Code Prover Access license requires a Polyspace Bug Finder Access license.
Installation. See Manage Polyspace Bug Finder Access Software (Polyspace Bug Finder Access). The installation process is the same for Polyspace Bug Finder Access and Polyspace Code Prover Access.
In a continuous integration workflow, a build automation tool schedules the Polyspace analysis as part of a build process. The tool is not needed to run the Polyspace analysis or review the results but only to integrate the analysis into an overall software build and test workflow.
For instance, Jenkins is a popular open source tool that can execute build scripts. For scripting convenience, a Polyspace plugin, available in Jenkins, provides a build environment for automation of Polyspace static analysis and simplifies post-analysis e-mail notification with Polyspace results.
Installation. Install a tool for continuous integration or build automation.
For instance, to install Jenkins, see the Jenkins website. In the Jenkins interface, select Manage Jenkins on the left. Select Manage Plugin. Search for the Polyspace plugin, and then download and install the plugin.
To check if the installation of Polyspace Bug Finder Server was successful:
Open a command window. Navigate to
Bug Finder Server installation folder, for instance,
You should see the list of options allowed for a Bug Finder analysis. To
check if the installation of Polyspace
Code Prover Server was successful, you can perform the same steps for Polyspace
Code Prover Server. Replace
To check if the Polyspace Access web interface is set up for upload:
Navigate again to
polyspace-access -host hostName -port portNumber -create-project testProject
is the name
of the server hosting the Polyspace
Bug Finder Access web server. For a locally hosted server, use
optional port number of the server. If you omit the port number,
9443 is used.
If the connection is successful, a project called
testProject should be created in the Polyspace Access web interface.
Open this URL in a web browser:
are the host name and port number from the previous step.
In the PROJECT EXPLORER pane on the Polyspace Access web interface, you should see the newly created project
To install Polyspace with other MathWorks products such as MATLAB®, run the MathWorks installer twice.
In the first run, choose the license that corresponds to the other MathWorks products, such as MATLAB, Simulink®, or Embedded Coder®.
In the second run, choose the license that corresponds to the Polyspace products.
In this workflow, products such as MATLAB and Simulink are installed in a different root folder than the Polyspace products. You can link the two installations and use MATLAB scripts to run Polyspace. See Integrate Polyspace Server Products with MATLAB and Simulink.
If you install the Polyspace desktop and server products, you also have to run the installer twice with separate licenses. The desktop and server products are installed in separate root folders. For instance, in Windows, the default root folders for an R2019a installation are:
Polyspace desktop products:
This folder contains executables to run analysis with Polyspace Bug Finder and Polyspace Code Prover.
Polyspace server products:
This folder contains executables to run analysis with Polyspace Bug Finder Server and Polyspace Code Prover Server.