Configure Code Constraints
Constrain elements of your code such as global variables, function inputs, and
stubbed functions
Polyspace® makes assumptions about elements such as variable ranges and allowed buffer sizes for pointers. You can apply constraints on these elements to eliminate irrelevant code paths from the analysis and improve the accuracy of the results:
Global variables
User-defined functions
Stubbed functions
Polyspace Options
Polyspace Macros
unchecked_assert | Constrain variable ranges for static analysis with Polyspace products |
Topics
External Constraints
- 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.
Constrain Code Prover Analysis
- Reduce Orange Checks in Polyspace Code Prover
Improve your coding design or adjust your verification options for more precise verification. - Specify External Constraints for Polyspace Analysis
Constrain variable ranges and pointer specifications for more precise analysis.
- Test Functions and Constrain Polyspace Code Prover Analysis for Ranges of Inputs and Outputs (Polyspace Test)
Test functions over one or more ranges of input and verify if the output is within a valid range using range specification macros. Run static analysis on the function and associated tests using the specified ranges as external constraint. - Constrain Variable Ranges for Polyspace Analysis Using Manual Stubs and Manual main() Function
Improve precision of Polyspace Code Prover™ analysis using your own stubs andmain().
Assumptions
- Code Prover Assumptions About Stubbed Functions
The verification stubs undefined functions or functions that you want stubbed, and makes certain assumptions about their arguments and return values.