Main Content

Install Polyspace Desktop Products

Polyspace® checks C/C++ code for bugs, run-time errors, coding standard violations, and other issues by using static analysis. With the desktop products, Polyspace Bug Finder™ and Polyspace Code Prover™, you can perform the checks on individual desktops prior to code submission.

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

Workflow

Using the Polyspace desktop products, individual developers can check their code for bugs and run-time errors during development.

For uniform standards across a project or team, all developers in the project or team can use a predefined set of checks. Developers can qualify their code for submission based on these predefined checks. After code submission to a shared repository, a more extensive post-submission analysis can run on a server by using the Polyspace server products.

The workflow consists of these steps:

  • Running Polyspace analysis:

    During development, individual developers start the analysis from their IDEs by using scripts or from the user interface of the desktop products.

    For code generated from:

    • Simulink® models, you can start the analysis directly from Simulink after code generation.

    • MATLAB® code, you can start the analysis directly in the MATLAB Coder App after code generation.

    To save processing power on the developer's desktop, you can offload the analysis to a server. After analysis, the results are downloaded to the desktop for review.

  • Reviewing Polyspace results:

    After analysis, developers review the results (bugs, run-time errors, coding standard violations, and so on) in the desktop product user interface.

    If using Eclipse™ or an IDE based on Eclipse, developers can review the results directly in the IDE.

These steps describe a workflow prior to code submission. After code submission, a build automation tool can run a Polyspace analysis on a server. The tool can also upload the analysis results to a web browser for collaborative review by developers or quality engineers. See Install Polyspace Server and Access Products (Polyspace Bug Finder Server).

Product Installation

For this workflow, you must install the following products on individual desktops.

Polyspace Products to Run Analysis

Install Polyspace Bug Finder or Polyspace Code Prover to run the analysis.

Installation.  Run the MathWorks® installer. Choose a license for Polyspace desktop products. You can get the installer and license by purchasing the product or requesting a trial. For detailed instructions, see Installation and Licensing.

To install the products non-interactively or silently at the command line, see Install Noninteractively.

You require Polyspace Bug Finder to install Polyspace Code Prover.

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 R2021a is listed here.

Operating SystemDefault Installation Folder
Windows®C:\Program Files\Polyspace\R2021a
Linux® (most distributions)/usr/local/Polyspace/R2021a
Mac/Applications/Polyspace/R2021a

Post-Installation Steps.  After you install a Polyspace desktop product, you can open the Polyspace user interface or run command-line executables. You can start an analysis in the user interface or from the Windows or Linux command line.

To start the analysis from other environments, perform these post-installation steps:

Polyspace Products to Review Results

The Polyspace Bug Finder or Polyspace Code Prover installation is sufficient to review the results.

You can review Bug Finder and Code Prover results with only Bug Finder desktop. For instance, if you offload the analysis to a server and only review the downloaded analysis results on your desktop, you require Bug Finder only.

In Eclipse or IDEs based on Eclipse, if you install the Polyspace plugin, you can see the results directly in the IDE.

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

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

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

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

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

Configure License Borrowing

If your Polyspace product uses a license that requires a license manager, for example a Commercial Concurrent license, you can enable license borrowing and borrow a license.

Borrow a license for up to 720 hours (30 days) to continue using your Polyspace product even after you disconnect your machine from the license manager server.

Licenses that support borrowing include the keyword BORROW on the INCREMENT lines for products, for example:

INCREMENT Polyspace_BF MLM 40 01-jan-000 5 BORROW=720 \
	AE3FC254020DE6A3C24A
You must be an administrator to enable license borrowing. See Enable License Borrowing.

Borrow a Polyspace License

Note

This workflow applies to R2019a and later releases. For R2018b and earlier releases, see Borrow Licenses.

To borrow a license, use the lmutil binary that is available with the license manager installation.

The binary is in the same folder as the lmgrd and MLM binaries, for instance installFolder\win64\etc, where installFolder is the license manager installation folder. If you do not know the location of this folder contact your Polyspace license administrator.

To borrow a license:

  1. Copy the lmutil binary from the license server machine to the machine from which you want to borrow a license.

  2. Run the following command by using this format to specify the borrow period end date, and optionally, the end time:

    lmutil lmborrow MLM dd-Mmm-YYYY hh:mm
    For instance, to borrow a license until January 20, 2021 a 1pm, enter:
     lmutil lmborrow MLM 20-Jan-2021 13:00

  3. Run the product whose license you want to borrow. For instance, use the Polyspace Bug Finder desktop product to analyze a small source file.

    Run this command to check the borrow status of your license:

    lmutil lmborrow -status

  4. Disconnect your machine from the network and continue using your Polyspace product.

So that you do not borrow licenses for other products, after step 3, run this command:

lmutil lmborrow -clear

Return Polyspace License

To return your borrowed license before the end of the borrow period:

  1. Connect your machine to the network of the license manager.

  2. Enter the following command by using this format to specify the license server port and host name, and the name of the feature whose license you are returning:

    lmutil lmborrow -return -c serverPort@serverHostname featureName
    For instance, to return a Polyspace Bug Finder desktop license (Polyspace_BF), enter:
    lmutil lmborrow -return -c 27000@licenseMgrHostName Polyspace_BF
    Contact your Polyspace license administrator for the license server port and host name.

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