Specify Code Behavior
To reduce false-positive and false-negative results, provide additional information about your code. For example:
Specify the constraints on elements such as variable ranges and allowed buffer sizes for pointers by using the option
Constraint setup (-data-range-specifications).Map the functions in your code to known standard library functions using
-code-behavior-specifications.Specify forbidden identifiers or macros in your code by using
-code-behavior-specifications.Specify the boundaries of assembly code using the option
-asm-begin -asm-end.Specify code that needs to be analyzed differently by using the option
-code-behavior-specifications. For example, you can specify code that contains real-time functions, memory management functions, exception handling functions, or critical data members.When analyzing code generated from Simulink® models, specify the parameters, inputs, and step functions to accurately model the data flow.
Use the analysis options listed here to describe your code to Polyspace Bug Finder with greater detail, which can result in improved precision and faster analysis.
Polyspace Options
Topics
Provide Additional Information
- Modify Bug Finder Checkers Through Code Behavior Specifications
Change Polyspace interpretation of code elements such as functions by assigning code behaviors in XML or Datalog format. - Flag Deprecated or Unsafe Functions, Keywords, or Macros Using Bug Finder Checkers
Create a blocklist of functions, keywords and macros, and check for use of items from the list. - Extend Bug Finder Checkers for Standard Library Functions to Custom Libraries
Map custom library functions to equivalent Standard Library functions so that domain errors and other issues can be detected. - Extend Concurrency Defect Checkers to Unsupported Multithreading Environments
Find data races and other concurrency issues in multithreading environments that are not supported by default. - Extend Data Race Checkers to Atomic Operations
Find data races in operations that are assumed to be atomic by Bug Finder.
Specify External Constraints
- Specify External Constraints for Polyspace Analysis
Constrain variable ranges and pointer specifications for more precise analysis. - External Constraints for Polyspace Analysis
Look up constraints that you can apply on global variables, function inputs and stubbed functions. - XML File Format for Polyspace Analysis Constraints
Look up specifications of the XML file for constraint specification, if you are editing the XML directly.