Install Polyspace Server and Access Products
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 finding bugs and coding rule violations
Polyspace Code Prover™ Server for exhaustive code verification
Polyspace Access™ for web browser based review of analysis results (from either Polyspace Bug Finder Server or Polyspace Code Prover Server)
By using these products with a build automation tool, you can incorporate a Polyspace analysis into continuous integration systems.
What You Need to Install
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 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.
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 and Software Development Workflows.
Product Installation
For this workflow, you must install the following products on the computer or computers that act as the server.
Polyspace Products to Run Analysis
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 and Licensing.
Along with the Polyspace Server products, install the network license manager to manage licenses (unless it is already installed). Configure the license manager to start automatically on reboot. For instance, in Windows®, you can configure the license manager to start as a service.
At the end of the installation, start the network license manager. See Start Network License Manager.
To install the products non-interactively or silently at the command line, see Install Noninteractively.
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 R2024b is listed here.
Operating System | Default Installation Folder |
---|---|
Windows | C:\Program Files\Polyspace Server\R2024b |
Linux® (most distributions) | /usr/local/Polyspace_Server/R2024b |
Mac | /Applications/Polyspace_Server/R2024b |
Note that all Polyspace commands are available in the folder
,
where polyspaceroot
\polyspace\bin
is the
Polyspace Server installation folder. To avoid typing the full path to the
commands, add this location to the polyspaceroot
PATH
environment variable
in your operating system.
Polyspace Products to Review Results
Install the components to host the web interface of Polyspace Access.
Each reviewer must have a Polyspace Access license to view the results on the web interface.
Installation. See Install Polyspace Access for Web Reviews.
Products to Schedule Polyspace Analysis
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.
Release Compatibility
When you upload Polyspace analysis results to Polyspace Access, you must use a version of Polyspace Server that is the same as or older than the version of Polyspace Access. For instance, if you upload a result to an R2024b version of Polyspace Access, you must use an R2024b or earlier version of Polyspace Server.
More specifically, when you upload an analysis result to Polyspace Access:
The analysis must have run using the same or an older version of Polyspace Server.
The upload command must come from the same an older version of Polyspace Server.
The same considerations apply to:
Exporting results and report generation from Polyspace Access.
Uploading results to Polyspace Access from a Polyspace desktop product.
Check Polyspace Installation
To check if the installation of Polyspace Bug Finder Server was successful:
Open a command window. Navigate to
. Here,polyspaceserverroot
\polyspace\bin
is the Polyspace Bug Finder Server installation folder, for instance,polyspaceserverroot
C:\Program Files\Polyspace Server\R2024b
.Enter:
polyspace-bug-finder-server -help
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 polyspace-bug-finder-server
with
polyspace-code-prover-server
.
To check if the Polyspace Access web interface is set up for upload:
Navigate again to
.polyspaceserverroot
\polyspace\binEnter:
polyspace-access -host hostName -port portNumber -create-project testProject
Here,
is the name of the server hosting the Polyspace Access web server. For a locally hosted server, usehostName
localhost
.
is the optional port number of the server. If you omit the port number,portNumber
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:
Here,https://hostName:portNumber/metrics/index.html
andhostName
are the host name and port number from the previous step.portNumber
In the Project Explorer pane on the Polyspace Access web interface, you should see the newly created project
testProject
.
Install Polyspace with Other MathWorks Products
Install Other Polyspace Products
To install additional Polyspace base products, run the MathWorks installer again for each base product.
The Polyspace Test and the Bug Finder desktop and server products are base products. You typically install the Code Prover desktop and server products as part of the Bug Finder desktop and server product installations.
For instance, to install Polyspace Test, Polyspace Bug Finder, and Polyspace Bug Finder Server, run the installer three time. In each run, select the appropriate license and follow the prompts. You cannot install Bug Finder and Code Prover server products in the same installation folder as the other Polyspace products.
Install Other MathWorks Products
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. If you are installing multiple Polyspace base products, see Install Other 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 with MATLAB and Simulink.