Release 2020b adds improvements to many existing Polyspace® product workflows. For instance, you can:

  • Run a Polyspace analysis on C++17 code
  • Use a Polyspace analysis to leverage source and compiler specifications generated in a JSON compilation database format from your build systems 

Learn more about these and other features below.

Faster and Simpler Configuration from Build System

Build systems such as CMake, Ninja, and Bazel, and compilers such as Clang support the generation of a compilation database in JSON format. A compilation database, typically named compile_commands.json, records all compilation options such as source file paths and compile commands with associated arguments. A typical database looks like this:

[

 

  { "directory": "/home/user/llvm/build",

    "command": "/usr/bin/clang++ -Irelative -c -o file.o file.cc",

    "file": "file.cc" },

  ...

 

]

Starting in R2020b, Polyspace products can read the specifications in a JSON compilation database file and generate an options file for the subsequent Polyspace analysis. If your build system supports the creation of a JSON compilation database file, then you do not need further setup for the Polyspace analysis.

Reading the JSON compilation database to generate analysis options is also much faster than the classic workflow that tracks the commands executed in a build and generates equivalent options using Polyspace products.

For more information, see:

Improved AUTOSAR C++14 Support

With R2020b, Polyspace Bug Finder™ supports 61 new AUTOSAR C++14 rules.

What’s New in Polyspace R2020b?

Some examples of new supported rules are:

  • A2-7-2 (sections of code shall not be “commented out”): This rule can help with code cleanup before shipping.
  • A3-1-* (rules on inlining): These rules can help decide which functions are best defined inside a class.
  • A5-1-* (rules on lambda expressions): Lambda expressions are powerful concepts but represent many opportunities for errors. These rules can help avoid those errors.
  • A12-*-* (rules on special member functions): These rules cover common functions associated with a class such as move constructors and comparison operators.
  • A15-*-* (rules on exceptions): These rules cover issues such as how to define noexcept functions and where to use catch-all exceptions.

The new rules supported in R2020b span many other groups.

See also Supported AUTOSAR C++14 Rules.

C++17 Support

R2020b supports the C++17 standard (ISO/IEC 14882:2017). If your code adheres to the C++17 standard (for instance, if you compile in GCC with the flag -std=c++17), Polyspace products can now analyze your code without compilation errors.

What’s New in Polyspace R2020b?

Polyspace products support most features of the C++17 standard. For details, see:

Distributed Workflows from Simulink

In R2020b, you can package Polyspace option files along with code generated from a Simulink® model, and then analyze the code on a different machine. The machine where you perform simulations and code generation need not have Polyspace installed, and the machine where you analyze the code does not require Simulink or Embedded Coder®.

On the first machine, you can package all generated code files with a simple set of commands such as the following shown below. You can also specify additional analysis options when packaging.

 

psOpt = pslinkoptions(mdlName);

psOpt.InputRangeMode = 'FullRange';

psOpt.ParamRangeMode = 'DesignMinMax';

zipFile = polyspacePackNGo(mdlName,psOpt);

 

You can then transfer the packaged archive to another machine. When you unpack the archive on the second machine, you will have all the source files and option files to run a Polyspace analysis.

For more information, see:

Polyspace Access Improvements

In R2020b, Polyspace Access™ products introduce new features to improve installation and review workflows.

  • Easier HTTPS configuration for Polyspace Access:

    When you install Polyspace Access on a single node, the ports of the Polyspace Access services are no longer exposed. You do no need to check the availability of ports or provide SSL private keys and certificates for the HTTPS configuration. For more information, see: Configure Polyspace Access for HTTPS.

  • Integration with JIRA Software Cloud:

    You can now integrate Jira Software Cloud with Polyspace Access. See Configure Issue Tracker.

  • Easier user management:

    The embedded LDAP is replaced with the User Manager internal directory. You no longer need to provide an LDIF file to setup custom login credentials for Polyspace Access. You can create user profiles directly from the User Manager interface.

What’s New in Polyspace R2020b?
  • Comparison with previous runs:

    Compare results from current run to previous runs and determine progress in code quality improvement.

What’s New in Polyspace R2020b?

You can determine which analysis findings from a previous run were solved, which findings remain unresolved, and which findings are new. For more information, see: Compare Analysis Results to Previous Runs.

  • Per-project quality objectives:

    Define custom quality objectives definitions and apply them to specific projects.

What’s New in Polyspace R2020b?

You can customize the thresholds that you use as pass/fail criteria to track the quality of your code and select which custom thresholds you apply to each project. For more information, see: Quality Objectives Dashboard.

Other Features

Apart from these major features, R2020b offers other improvements such as:

  • Support for Renesas SH C compilers
  • Support for additional CERT C++ rules, CERT C recommendations, and MISRA C++ rules
  • Faster project creation from build systems due to improved caching
  • Configuration settings validation on save or on demand for Polyspace Access products

For details, see the following release notes: