Polyspace Bug Finder Options in Polyspace Platform User Interface
You can run static analysis on C/C++ code in the Polyspace Platform user interface:
Using Polyspace® Bug Finder™, you can check C/C++ code for defects and coding standard violations.
Using Polyspace Code Prover™, you can prove the absence of certain types of run-time errors in C/C++ code.
For more information, see Run Static Analysis in Polyspace Platform User Interface.
You can customize the options used to run a Polyspace Bug Finder or Polyspace Code Prover analysis. This topic lists Bug Finder analysis options that are available in the Polyspace Platform user interface.
To configure options, double-click the Configuration node of a Polyspace Platform project. On the Configuration pane, the Bug Finder analysis options are distributed over these tabs:
Project — This tab contains project-wide options that are relevant to both static analysis and dynamic testing using Polyspace products. See Project.
Build — This tab contains options that are applicable to both static analysis and dynamic testing using Polyspace products. See Build.
Static Analysis — This tab contains options that are applicable to the static analysis products, Bug Finder and Code Prover. The Defects and Coding Standards node and the nodes below contain options that are specific to a Bug Finder analysis. See Static Analysis.
Project
This table shows the options in the Project tab that are relevant to Polyspace Bug Finder analysis.
Option | Description | More Information |
---|---|---|
Name | See name of Polyspace Platform project. | See Name . |
Author | Specify author name for Polyspace Platform project. | See Author . |
Created | See date and time when Polyspace Platform project was created. | See Created . |
Last modified | See date and time when Polyspace Platform project was last modified. | See Last modified . |
Source code encoding | Specify the encoding of your source files. | See Source code encoding (-sources-encoding) |
Application source files | Add source files to Polyspace Platform project. | See Application source files . |
Application source folders | Add source folders to Polyspace Platform project. | See Application source folders . |
Include paths | Specify paths to folders containing include files. | See |
Include file name patterns | Specify patterns for file names to be included in Polyspace Platform project. | See Include file name patterns . |
Exclude paths | Specify folders or files to be excluded from static analysis. | See Exclude paths . |
Project variables | Define environment variables for use as shorthands in Polyspace Platform project. | See Project variables . |
Build
The Target & Compiler node on the Build tab is equivalent to the Target & Compiler node in a standard Polyspace configuration (that is, one created in the standard Polyspace user interface), with some minor differences. For more information on the differences, see Differences in Configuration Options Between Polyspace Projects and Polyspace Platform Projects.
Target & Compiler
The options on the Target & Compiler node are listed below.
Option | Description | More Information |
---|---|---|
Source code language | Specify language of source files | |
C standard version | Specify C language standard followed in source code | |
C++ standard version | Specify C++ language standard followed in source code | |
Processor | Select the processor for the current build configuration | See |
Compilation toolchain (Static analysis) | Specify the compiler that you use to build your source code. The option applies to static analysis only. To specify a compilation toolchain for testing, specify the option 'Compilation toolchain (Testing)' | |
Round down results of negative integer division | Specify that your compiler rounds down a negative quotient from dividing two integers | See |
Pack alignment value | Specify default structure packing alignment for code developed in Visual C++® | |
Shift right on signed integers as arithmetic shift | Specify that your compiler implements right shifts on signed integers as arithmetic shifts | See |
Preprocessor definitions | Replace macros in preprocessed code | |
Disabled preprocessor definitions | Undefine macros in preprocessed code | |
Forced includes | Specify files to be #include-d by every source file. | |
Additional include paths | Specify build-specific include paths in addition to project-wide include paths |
In projects created from a build command, you also see these additional read-only options:
Static Analysis
The nodes on the Static Analysis tab are equivalent to the nodes with the same name in a standard Polyspace configuration (that is, one created in the standard Polyspace user interface), with some minor differences. The only exceptions are the Defects and Coding Standards and Checkers Behavior nodes. These nodes are equivalent to the following nodes in a standard Polyspace configuration with some major differences:
Coding Standards & Code Metrics
Bug Finder Analysis
For more information on the differences, see Differences in Configuration Options Between Polyspace Projects and Polyspace Platform Projects.
Environment Settings
The options on the Environment Settings node are listed below.
Option | Description | More Information |
---|---|---|
Stop analysis if a file does not compile | Specify that a compilation error must stop the analysis | See |
Command/script to apply to preprocessed files | Specify command or script to run on source files after preprocessing phase of analysis | See |
Code from DOS or Windows file system | Consider that file paths are in MS-DOS style |
Inputs & Stubbing
The options on the Inputs & Stubbing node are listed below.
Option | Description | More Information |
---|---|---|
Constraint setup | Constrain global variables, function inputs and return values of stubbed functions | |
Ignore default initialization of global variables | Consider global variables as uninitialized unless explicitly initialized in code | See |
Functions to stub | Specify functions to stub during analysis | |
Libraries used | Specify libraries that you use in your program |
Multitasking
The options on the Multitasking node are listed below.
Option | Description | More Information |
---|---|---|
Specify multitasking configuration using file | Specify if you want to setup multitasking configuration by using an external file. | |
External file for multitasking | Specify which supported external file format you want to use to set up your multitasking configuration. | |
Configure multitasking manually | Consider that code is intended for multitasking | |
Tasks | Specify functions that serve as tasks to your multitasking application | |
Cyclic tasks | Specify functions that represent cyclic tasks | |
Interrupts | Specify functions that represent nonpreemptable interrupts | |
Disabling all interrupts | Specify routines that disable and reenable interrupts. | See |
Critical section details | Specify functions that begin and end critical sections | See |
Temporally exclusive tasks | Specify entry point functions that cannot execute concurrently |
Defects and Coding Standards
The options on the Defects and Coding Standards node are listed below.
Option | Description | More Information |
---|---|---|
Use custom checkers file | Specify that checkers must be specified using a checkers activation XML file | |
Checkers activation file | Select checkers (defects and coding rules) for Polyspace Bug Finder analysis | |
Use generated code requirements for MISRA C™: 2012 | Check for violations of MISRA C:2012 rules and directives that apply to generated code | |
Use generated code requirements for MISRA C: 2023 | Check for violations of MISRA C:2023 rules and directives that apply to generated code | See |
Calculate code metrics | Calculate code metrics (-code-metrics) | |
Generate results for sources and | Specify files on which you want analysis results | See |
Do not generate results for | Specify files on which you do not want analysis results | See |
Checkers Behavior
The options on the Checkers Behavior node are listed below.
Option | Description | More Information |
---|---|---|
Effective boolean types | Specify data types that coding rule checker must treat as effectively Boolean | See Effective boolean types (-boolean-types) . |
Allowed pragmas | Specify pragma directives that are documented | |
Run stricter checks considering all values of system inputs | Enable stricter checks and provide examples of values that lead to detected defect | See |
Reporting
The options on the Reporting node are listed below.
Option | Description | More Information |
---|---|---|
Generate Report | Specify whether to generate a report after the analysis | See |
Report template (Bug Finder) | Specify template for generating analysis report | |
Output format | Specify output format of generated report |
Computing Settings
The options on the Computing Settings node are listed below.
Option | Description | More Information |
---|---|---|
Verification time limit | Specify a time limit on your verification |
Advanced
The options on the Advanced node are listed below.
Option | Description | More Information |
---|---|---|
Command/script to apply after the end of the code verification | Specify a time limit on your verification | See |
Other | Specify additional flags for analysis | See |