Main Content

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 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.

Workflow

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:

  1. Triggering Polyspace analysis:

    When developers submit their code, a build automation tool such as Jenkins triggers the Polyspace analysis.

  2. 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.

  3. 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:

For an overview of all Polyspace products, see Polyspace Products for Code Analysis and Verification.

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

  1. 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.

  2. At the end of the installation, start the network license manager. See Start the 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 R2020b is listed here.

Operating SystemDefault Installation Folder
WindowsC:\Program Files\Polyspace Server\R2020b
Linux® (most distributions)/usr/local/Polyspace_Server/R2020b
Mac/Applications/Polyspace_Server/R2020b

Polyspace Products to Review Results

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 Install and Manage Polyspace Access (Polyspace Bug Finder Access). The installation process is the same for Polyspace Bug Finder Access and Polyspace Code Prover Access.

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 R2020b version of Polyspace Access, you must use an R2020b 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:

  1. Open a command window. Navigate to polyspaceserverroot\polyspace\bin. Here, polyspaceserverroot is the Polyspace Bug Finder Server installation folder, for instance, C:\Program Files\Polyspace Server\R2020b.

  2. 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:

  1. Navigate again to polyspaceserverroot\polyspace\bin.

  2. Enter:

    polyspace-access -host hostName -port portNumber -create-project testProject

    Here, hostName is the name of the server hosting the Polyspace Bug Finder Access web server. For a locally hosted server, use localhost. portNumber is the 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.

  3. Open this URL in a web browser:

    https://hostName:portNumber/metrics/index.html
    Here, hostName and portNumber 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 testProject.

Install Polyspace with 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.

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 R2020b installation are:

  • Polyspace desktop products: C:\Program Files\Polyspace\R2020b.

    This folder contains executables to run analysis with Polyspace Bug Finder and Polyspace Code Prover.

  • Polyspace server products: C:\Program Files\Polyspace Server\R2020b.

    This folder contains executables to run analysis with Polyspace Bug Finder Server and Polyspace Code Prover Server.

Update Polyspace Products

To install the most recent update for Polyspace desktop or server products, close all running sessions of Polyspace, then run the update installer binary. The binary is part of your original Polyspace installation. Each update includes all the fixes from previous updates. To update the Polyspace desktop and server products, run the update installer twice, once for each Polyspace base product.

Note

This update procedure is for R2019a and later releases only.

Install Update on Machine Connected to Internet

  1. Open a command-line window and navigate to a folder that corresponds to your platform.

    Windows

    polyspaceroot\bin\win64

    Linux

    polyspaceroot/bin/glnxa64

    macOSpolyspaceroot/bin/maci64

    polyspaceroot is the Polyspace installation folder, for instance C:\Progam Files\Polyspace\R2019a.

  2. At the command line, enter the command that corresponds to your platform.

    Windows
    update_installer.exe
    Linux/macOS
    ./update_installer

    Alternatively, you can open the update installer folder in a file explorer then double-click the update_installer binary.

To complete the update, follow the prompts in the UI.

Install Update on Machine Without Internet

To install a Polyspace update on a machine that is not connected to Internet, download the update package to an online computer. Then, run the update installer binary on the machine that is not connected to the Internet and use the -updatepackage option . You can use this workflow to run the update installer without a UI, for example to install an update on a server machine without a display.

  1. Go to https://www.mathworks.com/downloads/web_downloads/download_update_installers/R20XXy and download the update package that corresponds to your platform to an online computer.

    R20XXy is the release version of the update, for instance R2019a.

  2. Unzip the update package to a location that is accessible from the machine where you want to install the update, for example, a network drive.

  3. On the machine where you want to install the update, open a command-line window and navigate to the folder that corresponds to your platform.

    Windows

    polyspaceroot\bin\win64

    Linux

    polyspaceroot/bin/glnxa64

    macOSpolyspaceroot/bin/maci64

    polyspaceroot is the Polyspace installation folder, for instance C:\Progam Files\Polyspace\R2019a.

  4. At the command line, enter the command that corresponds to your platform.

    Windows
    update_installer.exe -updatepackage package_folder
    Linux/macOS
    ./update_installer -updatepackage package_folder

    package_folder is the full path to the folder where you unzipped the update package. The update installer runs silently and does not output any messages.

Check Update Installer Log and Update Version

To see the installation status if you run the update installer silently, or to check for errors in the installation update process, open the installer log file that is stored in your platform temporary folder.

Windows

\%TEMP%\mathworks_yourusername.log

Linux/macOS

/tmp/mathworks_yourusername.log

To check the version of the Polyspace update that is installed, go to the Polyspace installation folder and open VersionInfo.xml. The update version is listed inside the <description/> tag, for example:

...
  <release>R2019a</release>
  <description>Update 4</description>
...

If no update is installed, the <description/> tag is empty.

Related Topics