Main Content

Bug Finder Analysis in Polyspace Platform User Interface

Check C/C++ code for defects in the Polyspace Platform user interface

Polyspace Platform is an integrated environment that supports static analysis and dynamic testing of C/C++ code with Polyspace® products. In the Polyspace Platform user interface, you can create a project, add source files, configure checkers, and run a Bug Finder analysis.

Polyspace Options

expand all

Basic Info

NameSee name of Polyspace Platform project (Since R2024a)
AuthorSpecify author name for Polyspace Platform project (Since R2024a)
CreatedSee date and time when Polyspace Platform project was created (Since R2024a)
Last modifiedSee date and time when Polyspace Platform project was last modified (Since R2024a)
Source code encoding (-sources-encoding)Specify the encoding of source files

Source Files and Include Folders

Application source foldersAdd source folders to Polyspace Platform project (Since R2024a)
Application source filesAdd source files to Polyspace Platform project (Since R2024a)
Include pathsSpecify paths to folders containing include files (Since R2023b)

File Inclusions and Exclusions

Include file name patternsSpecify patterns for file names to be included in Polyspace Platform project (Since R2024a)
Exclude pathsSpecify folders or files to be excluded from static analysis or testing (Since R2024a)

Environment Variables

Project variablesDefine environment variables for use as shorthands in Polyspace Platform project (Since R2024a)

Target & Compiler

Source code language (-lang)Specify language of source files
C standard version (-c-version)Specify C language standard followed in source code
C++ standard version (-cpp-version)Specify C++ language standard followed in source code
ProcessorSelect the processor for the current build configuration
Compilation toolchain (Static Analysis)Specify the compiler that you use to build your source code for static analysis
Round down results of negative integer division (-div-round-down)Specify that your compiler rounds down a negative quotient from dividing two integers (Since R2023b)
Pack alignment value (-pack-alignment-value)Specify default structure packing alignment for code developed in Visual C++
Shift right on signed integers as arithmetic shift (-logical-signed-right-shift)Specify that your compiler implements right shifts on signed integers as arithmetic shifts (Since R2023b)
Preprocessor definitions (-D)Replace macros in preprocessed code
Disabled preprocessor definitions (-U)Undefine macros in preprocessed code
Forced includes (-include)Specify files to be #include-d by every source file. (Since R2023b)
Additional include paths (-I)Specify build-specific include paths in addition to project-wide include paths (Since R2024a)

Environment Settings

Stop analysis if a file does not compile (-stop-if-compile-error)Specify that a compilation error must stop the analysis
Command/script to apply to preprocessed files (-post-preprocessing-command)Specify command or script to run on source files after preprocessing phase of analysis
Code from DOS or Windows file system (-dos)Consider that file paths are in MS-DOS style

Inputs & Stubbing

Constraint setup (-data-range-specifications)Constrain global variables, function inputs and return values of stubbed functions
Ignore default initialization of global variables (-no-def-init-glob)Consider global variables as uninitialized unless explicitly initialized in code
Functions to stub (-functions-to-stub)Specify functions to stub during analysis
Libraries used (-library)Specify libraries that you use in your program (Since R2021a)

Multitasking

Specify multitasking configuration using fileSpecify if you want to setup multitasking configuration by using an external file. (Since R2023b)
External file for multitaskingSpecify which supported external file format you want to use to set up your multitasking configuration. (Since R2023b)
Configure multitasking manuallyConsider that code is intended for multitasking
Tasks (-entry-points)Specify functions that serve as tasks to your multitasking application
Cyclic tasks (-cyclic-tasks)Specify functions that represent cyclic tasks
Interrupts (-interrupts)Specify functions that represent nonpreemptable interrupts
Disabling all interrupts (-routine-disable-interrupts -routine-enable-interrupts)Specify routines that disable and reenable interrupts.
Critical section details (-critical-section-begin -critical-section-end)Specify functions that begin and end critical sections
Temporally exclusive tasks (-temporal-exclusions-file)Specify entry point functions that cannot execute concurrently

Defects and Coding Standards

Use custom checkers fileSpecify that checkers must be specified using a checkers activation XML file. (Since R2023b)
Checkers activation file (-checkers-activation-file)Activate a custom combination of defects and coding rules for a Polyspace Bug Finder analysis (Since R2021a)
Use generated code requirements (-misra3-agc-mode)Check for violations of MISRA C:2012 rules and directives that apply to generated code
Use generated code requirements (-misra-c-2023-agc-mode)Check for violations of MISRA C:2023 rules and directives that apply to generated code (Since R2024a)
Calculate code metrics (-code-metrics)Compute and display code complexity metrics
Generate results for sources and (-generate-results-for)Specify files on which you want analysis results
Do not generate results for (-do-not-generate-results-for)Specify files on which you do not want analysis results

Checkers Behavior

Effective boolean types (-boolean-types)Specify data types that coding rule checker must treat as effectively Boolean
Allowed pragmas (-allowed-pragmas)Specify pragma directives that are documented
Run stricter checks considering all values of system inputs (-checks-using-system-input-values)Enable stricter checks and provide examples of values that lead to detected defect (Since R2020a)

Reporting

Generate reportSpecify whether to generate a report after the analysis
Report template (Code Prover or Bug Finder)Specify template for generating analysis report
Output format (-report-output-format)Specify output format of generated report

Computing Settings

Verification time limit (-timeout)Specify a time limit on your analysis

Advanced

Command/script to apply after the end of the code verification (-post-analysis-command)Specify command or script to be executed after analysis
OtherSpecify additional command-line flags for static analysis

Topics

Getting Started

Create and Update Project

Configure Project

Check for Coding Standard Violations

File Storage