Polyspace Code Prover 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 Code Prover 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 Code Prover analysis options are distributed over two 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 Run Time Errors node and the nodes below contain options that are specific to a Code Prover analysis. See Static Analysis.
Project
This table shows the options in the Project tab that are relevant to Polyspace Code Prover 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 General 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. 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 |
---|---|---|
Enable automatic concurrency detection for Code Prover | Automatically detect certain families of multithreading functions | See |
Specify multitasking configuration | Specify if you want to setup multitasking configuration by using an external file. | |
External multitasking configuration | 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 | |
Critical section details | Specify functions that begin and end critical sections | See |
Temporally exclusive tasks | Specify entry point functions that cannot execute concurrently |
Run Time Errors
The options on the Run Time Errors node are listed below.
Option | Description | More Information |
---|---|---|
Verify whole application | Stop verification if sources files are incomplete and do not contain a main function | |
Show global variable sharing and usage only | Compute global variable sharing and usage without running full analysis | See |
Verify initialization section of code only | Check initialization code alone for run-time errors and other issues | See |
Verify module or library | Generate a main function if source files are modules or libraries that do not contain a main | |
Class | Specify classes that you want to verify | |
Functions to call within the specified classes | Specify class methods that you want to verify | See |
Analyze class contents only | Do not analyze code other than class method | |
Skip member initialization check | Do not check if class constructor initializes class members | See |
Variables to initialize | Specify global variables that you want the generated main to initialize | see |
Initialization functions | Specify functions that you want the generated main to call ahead of other functions | See |
Functions to call | Specify functions that you want the generated main to call after the initialization functions |
Verification Assumption
The options on the Verification Assumption node are listed below.
Option | Description | More Information |
---|---|---|
Float rounding mode | Specify rounding modes to consider when determining the results of floating point arithmetic | |
Consider volatile qualifier on fields | Assume that volatile qualified structure fields can have all possible values at any point in code | See |
Consider environment pointers as unsafe | Specify that environment pointers can be unsafe to dereference unless constrained otherwise | See |
Ignore assembly code | Specify that assembly instructions in C/C++ code cannot modify C/C++ variables |
Check Behavior
The options on the Check Behavior node are listed below.
Option | Description | More Information |
---|---|---|
Allow negative operand for left shifts | Allow left shift operations on a negative number | See |
Overflow mode for signed integer | Specify whether result of overflow is wrapped around or truncated | See |
Overflow mode for unsigned integer | Specify whether result of overflow is wrapped around or truncated | See |
Consider non finite floats | Enable an analysis mode that incorporates infinities and NaNs | |
Infinities | Specify how to handle floating-point operations that result in infinity | |
NaNs | Specify how to handle floating-point operations that result in NaN | See |
Subnormal detection mode | Detect operations that result in subnormal floating-point values | |
Disable checks for non-initialization | Disable checks for non-initialized variables and pointers | See |
Detect stack pointer dereference outside scope | Find cases where a function returns a pointer to one of its local variables | See |
Allow incomplete or partial allocation of structures | Allow a pointer with insufficient memory buffer to point to a structure | See |
Detect uncalled functions | Detect functions that are not called directly or indirectly from main or another entry point function | |
Enable impact analysis | Check for presence or absence of impact between program elements designated as sources and sinks | |
Specify sources and sinks | Specify XML file that identifies program elements as sources and sinks for impact analysis | |
Show impact analysis results only | Skip regular Code Prover checks for run-time errors and perform impact analysis only | See |
Calculate stack usage | Compute and display the estimates of stack usage |
Precision
The options on the Precision node are listed below.
Option | Description | More Information |
---|---|---|
Precision level | Specify a precision level for the verification | |
Verification level | Specify number of times the verification process runs on your code | |
Sensitivity context | Store call context information to identify function call that caused errors | |
Improve precision of interprocedural analysis | Avoid certain verification approximations for code with fewer lines | See |
Specific precision | Specify source files you want to verify at higher precision than the remaining verification | See Specific precision (-modules-precision) . |
Scaling
The options on the Scaling node are listed below.
Option | Description | More Information |
---|---|---|
Inline | Specify functions that must be cloned internally for each function call | See |
Set depth of verification inside structures | Specify that depth of verification inside structures must be specified | |
Depth of verification inside structures | Limit the depth of analysis for nested structures |
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 (Code Prover) | 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 |