Polyspace R2021a
Polyspace Access—the web-based review and triage platform—received a redesigned review workflow:
This bridges the gap between analysis results and traceability matrices required for DO-178C certification.
This guide covers the core features and setup of Polyspace R2021a , focusing on its two primary static analysis components: Bug Finder Code Prover 1. New Features in R2021a
The R2021a release introduced several key enhancements to improve code quality and analysis speed: Customizable Guidelines Checkers : New software complexity checkers in Polyspace Bug Finder allow you to monitor quantifiable metrics like cyclomatic complexity and path counts. Mixed Code Analysis : You can now run Polyspace Code Prover on projects that contain a mixture of source files. AUTOSAR Support
: Improved analysis speed and result precision for C/C++ code using the AUTOSAR RTE API IDE Integration : Use Bug Finder checkers directly within your Integrated Development Environment (IDE) to catch bugs earlier in the coding phase. 2. Core Comparison: Bug Finder vs. Code Prover Polyspace Bug Finder Polyspace Code Prover Primary Goal
Fast identification of software defects and security vulnerabilities.
Exhaustive formal verification to prove the absence of run-time errors.
Static analysis and guideline checking (MISRA, AUTOSAR, CERT). Formal methods based on Abstract Interpretation. Typical Use Early development and continuous integration. Safety-critical software verification and certification. 3. Setup and Integration
To get started with R2021a, follow these standard procedures: Installation : You must install Polyspace Bug Finder
and Code Prover separately if you are using the server versions. Each product typically requires its own license run through the MathWorks Installer MATLAB/Simulink Integration
: To link Polyspace with your existing MATLAB environment, use the command polyspacesetup('install') MATLAB command prompt Hardware Requirements
: While 16 GB RAM is often cited as a minimum for MATLAB-based tools, 32 GB or 64 GB
is recommended for large Polyspace simulations to prevent performance bottlenecks. 4. Running Your First Analysis Project Setup
: Create a new project and add your source files (.c, .cpp) and include paths. Configuration polyspace r2021a
: Select your target processor and compiler settings to ensure the analyzer mimics your hardware environment correctly. Check Selection : Enable specific coding standards such as MISRA C:2012 or the new Guidelines category for complexity checking. Review Results
: Use the results list to view defects grouped by category (e.g., numerical issues, memory issues) and mapped to standards like or setting up a CI/CD pipeline for Polyspace? AI responses may include mistakes. Learn more What's New in Polyspace R2021a? - MATLAB & Simulink
Polyspace R2021a is a significant update from that focuses on speed, automated compliance for automotive standards, and improved developer workflows within Key Features & Enhancements Enhanced AUTOSAR Support Polyspace Code Prover
in R2021a delivers faster and more precise analysis for C/C++ code using the AUTOSAR RTE API
. It allows for AUTOSAR standard compliance checks without special setup for compliant code. Mixed-Language Analysis
: Users can now run a single analysis on projects containing a mix of C and C++ source files
. Polyspace automatically compiles each file type and verifies them collectively as a C++ project. Customizable "Guidelines" Checkers : New to the Polyspace Bug Finder , these checkers detect software complexity
metrics—such as cyclomatic complexity and number of paths—early in the development cycle to reduce future refactoring needs. Cross-Release Integration
: This version introduces the ability to analyze code generated in older
releases (R2020b or later) using the newer R2021a Polyspace tools via the pslinkrunCrossRelease Expanded Tool Support : R2021a adds support for Visual Studio 2019 and GCC 8.x compilers, along with updated rules for AUTOSAR C++ 14 Pros & Cons Simultaneous Analysis
: Can check for MISRA compliance and functional defects in a single run
: The Polyspace Code Prover's deep formal methods analysis remains relatively slow
, which can hinder adoption in high-frequency CI environments. IDE Integration : Capabilities are brought directly into the This bridges the gap between analysis results and
, allowing developers to find bugs before code is even committed. Configuration Complexity : Managing detailed configurations
for complex scenarios like multitasking interrupt priorities can be challenging. Mathematical Proof : Unlike standard checkers, it mathematically proves the absence of critical runtime errors. Customization Limits : Some users note limitations in customizing MISRA rule categories (e.g., Mandatory vs. Required).
Polyspace R2021a is an essential upgrade for teams working in safety-critical sectors like automotive (ISO 26262)
or aerospace. While the Code Prover's exhaustive analysis still demands significant time, the addition of IDE plugins automated AUTOSAR support
makes static verification more accessible and less disruptive to the daily development flow. SciEngineer Guidelines checkers
What’s New in Polyspace R2021a? - MATLAB & Simulink - MathWorks
The Polyspace R2021a release from MathWorks introduced significant advancements in handling complex C/C++ projects, particularly for safety-critical and automotive industries. This version focused on speed, mixed-language support, and expanded compliance for international safety standards. Key Features & Major Updates
Mixed C/C++ Analysis: Polyspace Code Prover now supports projects containing both C and C++ source files simultaneously. By using the -lang C-CPP option, the tool compiles and verifies them as a unified C++ project, eliminating the need to separate files.
AUTOSAR Enhancements: Analysis of code using the AUTOSAR RTE API is faster and more precise. New "smart stubs" for AUTOSAR libraries allow users to check for standard compliance without losing precision or needing complex manual setups.
New "Guidelines" Checkers: Polyspace Bug Finder introduced a new category for software complexity. These customizable checkers measure metrics like cyclomatic complexity and the number of execution paths, helping developers identify and refactor overly complex modules early.
Expanded Coding Standards: Support was added for additional rules within AUTOSAR C++14, CERT C++, and MISRA C++.
Cross-Release Workflows: Users can now use Polyspace R2021a to analyze code generated in previous versions of Simulink (starting from R2020b) using the pslinkrunCrossRelease function. Usability and Integration
Compiler Support: Added official support for Visual Studio 2019 and GCC 8.x compilers. automated compliance for automotive standards
Simplified Setup: The integration process between Polyspace and MATLAB/Simulink was streamlined to require fewer steps.
Polyspace Access Improvements: Features enhanced logging for services within the Admin UI, aiding team collaboration and project tracking. Core Tool Comparison Polyspace R2021a continues to rely on two primary engines: What's New in Polyspace R2021a? - MATLAB & Simulink
Polyspace R2021a is a release of the MathWorks Polyspace static analysis tools designed to detect bugs and prove the absence of run-time errors in C and C++ code. The R2021a update focused on improving developer workflows, specifically through the introduction of Polyspace as You Code and enhanced support for automotive standards. Key Features and Enhancements in R2021a Polyspace as You Code
: This feature allows developers to run static analysis on a single file directly within their Integrated Development Environment (IDE), such as Visual Studio Visual Studio Code
. It enables finding bugs at the earliest possible stage of development. Mixed C/C++ Analysis Polyspace Code Prover
now supports projects containing a mix of both C and C++ source files in a single analysis run. AUTOSAR Improvements
: The update provides faster and more precise analysis results for code utilizing the AUTOSAR RTE API Customizable Guidelines
: New customizable guideline checkers were added to help reduce software complexity. MISRA Rule 1.1 Customization
: Users can now change the macro limit for MISRA C:2012 Rule 1.1 using the -code-behavior-specifications
option, helping to reduce false violations based on specific compiler capabilities. Core Products in the R2021a Suite Polyspace Bug Finder
: Used to identify software defects, security vulnerabilities, and compliance issues with coding standards like Polyspace Code Prover
: Uses formal methods (abstract interpretation) to prove that code will not fail due to run-time errors like overflows or divide-by-zeros. Polyspace Access
: A web-based interface for centralizing and reviewing analysis results across a team. Integration and Deployment
What’s New in Polyspace R2021a? - MATLAB & Simulink - MathWorks
Previous versions struggled with modern C++ constructs. R2021a introduced deep semantic analysis for lambda captures, std::move semantics, and variadic templates. For example, false positives related to uninitialized variables in constexpr functions were dramatically reduced.