Main Content

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

expand all

Constraint setup (-data-range-specifications)Constrain global variables, function inputs and return values of stubbed functions
Functions to stub (-functions-to-stub)Specify functions to stub during analysis
Generate stubs for Embedded Coder lookup tables (-stub-embedded-coder-lookup-table-functions)Stub autogenerated functions that use lookup tables and model them more precisely
Libraries used (-library)Specify libraries that you use in your program

Polyspace Macros

unchecked_assertConstrain variable ranges for static analysis with Polyspace products

Topics

External Constraints

Constrain Code Prover Analysis

Assumptions