Main Content

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.

OptionDescriptionMore Information
NameSee name of Polyspace Platform project.See Name.
AuthorSpecify author name for Polyspace Platform project.See Author.
CreatedSee date and time when Polyspace Platform project was created.See Created.
Last modifiedSee date and time when Polyspace Platform project was last modified.See Last modified.
Source code encodingSpecify the encoding of your source files.See Source code encoding (-sources-encoding)
Application source filesAdd source files to Polyspace Platform project.See Application source files.
Application source foldersAdd source folders to Polyspace Platform project.See Application source folders.
Include pathsSpecify paths to folders containing include files.

See Include paths (-I).

Include file name patternsSpecify patterns for file names to be included in Polyspace Platform project.See Include file name patterns.
Exclude pathsSpecify folders or files to be excluded from static analysis.See Exclude paths.
Project variablesDefine 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.

OptionDescriptionMore Information
Source code languageSpecify language of source files

See Source code language (-lang).

C standard versionSpecify C language standard followed in source code

See C standard version (-c-version).

C++ standard versionSpecify C++ language standard followed in source code

See C++ standard version (-cpp-version).

ProcessorSelect the processor for the current build configuration

See Processor.

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)'

See Compilation toolchain (Static Analysis).

Round down results of negative integer divisionSpecify that your compiler rounds down a negative quotient from dividing two integers

See Round down results of negative integer division (-div-round-down).

Pack alignment valueSpecify default structure packing alignment for code developed in Visual C++®

See Pack alignment value (-pack-alignment-value).

Shift right on signed integers as arithmetic shiftSpecify that your compiler implements right shifts on signed integers as arithmetic shifts

See Shift right on signed integers as arithmetic shift (-logical-signed-right-shift).

Preprocessor definitionsReplace macros in preprocessed code

See Preprocessor definitions (-D).

Disabled preprocessor definitionsUndefine macros in preprocessed code

See Disabled preprocessor definitions (-U).

Forced includesSpecify files to be #include-d by every source file.

See Forced includes (-include).

Additional include pathsSpecify build-specific include paths in addition to project-wide include paths

See Additional include paths (-I).

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.

OptionDescriptionMore Information
Stop analysis if a file does not compileSpecify that a compilation error must stop the analysis

See Stop analysis if a file does not compile (-stop-if-compile-error).

Command/script to apply to preprocessed filesSpecify command or script to run on source files after preprocessing phase of analysis

See Command/script to apply to preprocessed files (-post-preprocessing-command).

Code from DOS or Windows file systemConsider that file paths are in MS-DOS style

See Code from DOS or Windows file system (-dos).

Inputs & Stubbing

The options on the Inputs & Stubbing node are listed below.

OptionDescriptionMore Information
Constraint setupConstrain global variables, function inputs and return values of stubbed functions

See Constraint setup (-data-range-specifications).

Ignore default initialization of global variablesConsider global variables as uninitialized unless explicitly initialized in code

See Ignore default initialization of global variables (-no-def-init-glob).

Functions to stubSpecify functions to stub during analysis

See Functions to stub (-functions-to-stub).

Libraries usedSpecify libraries that you use in your program

See Libraries used (-library).

Multitasking

The options on the Multitasking node are listed below.

OptionDescriptionMore Information
Specify multitasking configuration using fileSpecify if you want to setup multitasking configuration by using an external file.

See Specify multitasking configuration using file.

External file for multitaskingSpecify which supported external file format you want to use to set up your multitasking configuration.

See External file for multitasking.

Configure multitasking manuallyConsider that code is intended for multitasking

See Configure multitasking manually.

TasksSpecify functions that serve as tasks to your multitasking application

See Tasks (-entry-points).

Cyclic tasksSpecify functions that represent cyclic tasks

See Cyclic tasks (-cyclic-tasks).

InterruptsSpecify functions that represent nonpreemptable interrupts

See Interrupts (-interrupts).

Disabling all interruptsSpecify routines that disable and reenable interrupts.

See Disabling all interrupts (-routine-disable-interrupts -routine-enable-interrupts).

Critical section detailsSpecify functions that begin and end critical sections

See Critical section details (-critical-section-begin -critical-section-end).

Temporally exclusive tasksSpecify entry point functions that cannot execute concurrently

See Temporally exclusive tasks (-temporal-exclusions-file).

Defects and Coding Standards

The options on the Defects and Coding Standards node are listed below.

OptionDescriptionMore Information
Use custom checkers fileSpecify that checkers must be specified using a checkers activation XML file

See Use custom checkers file.

Checkers activation fileSelect checkers (defects and coding rules) for Polyspace Bug Finder analysis

See Checkers activation file (-checkers-activation-file).

Use generated code requirements for MISRA C™: 2012Check for violations of MISRA C:2012 rules and directives that apply to generated code

See Use generated code requirements (-misra3-agc-mode).

Use generated code requirements for MISRA C: 2023Check for violations of MISRA C:2023 rules and directives that apply to generated code

See Use generated code requirements (-misra-c-2023-agc-mode).

Calculate code metricsCalculate code metrics (-code-metrics)

See Calculate code metrics (-code-metrics).

Generate results for sources andSpecify files on which you want analysis results

See Generate results for sources and (-generate-results-for).

Do not generate results forSpecify files on which you do not want analysis results

See Do not generate results for (-do-not-generate-results-for).

Checkers Behavior

The options on the Checkers Behavior node are listed below.

OptionDescriptionMore Information
Effective boolean typesSpecify data types that coding rule checker must treat as effectively BooleanSee Effective boolean types (-boolean-types).
Allowed pragmasSpecify pragma directives that are documented

See Allowed pragmas (-allowed-pragmas).

Run stricter checks considering all values of system inputsEnable stricter checks and provide examples of values that lead to detected defect

See Run stricter checks considering all values of system inputs (-checks-using-system-input-values).

Reporting

The options on the Reporting node are listed below.

OptionDescriptionMore Information
Generate ReportSpecify whether to generate a report after the analysis

See Generate report.

Report template (Bug Finder)Specify template for generating analysis report

See Report template (Code Prover or Bug Finder).

Output formatSpecify output format of generated report

See Output format (-report-output-format).

Computing Settings

The options on the Computing Settings node are listed below.

OptionDescriptionMore Information
Verification time limitSpecify a time limit on your verification

See Verification time limit (-timeout).

Advanced

The options on the Advanced node are listed below.

OptionDescriptionMore Information
Command/script to apply after the end of the code verificationSpecify a time limit on your verification

See Command/script to apply after the end of the code verification (-post-analysis-command).

OtherSpecify additional flags for analysis

See Other.

Related Topics