Follow one or more of these steps until you determine a fix
for the Correctness condition check.
There are multiple ways to fix a red or orange check. For a description
of the check and code examples, see Correctness condition.
Sometimes, especially for an orange check, you can determine that the check does not represent a real error but a Polyspace® assumption that is not true for your code. If you can use an analysis option to relax the assumption, rerun the verification using that option. Otherwise, you can add a comment and justification in your result or code.
For the general workflow that applies to all checks, see Interpret Code Prover Results in Polyspace Access Web Interface.
On the Results List pane, select the check. View the cause of check on the Result Details pane. The following list shows some of the possible causes:
An array is converted to another array of larger size.
In the following example, a red check occurs because an array is converted to another array of larger size.
![]()
When dereferenced, a function pointer has value NULL.
In the following example, a red check occurs because, when dereferenced,
a function pointer has value NULL.

When dereferenced, a function pointer does not point to a function.
In the following example, an orange check occurs because Polyspace cannot determine if a function pointer points to a function when dereferenced. This situation can occur if, for instance, you assign an absolute address to the function pointer.

A function pointer points to a function, but the argument types of the pointer and the function do not match. For example:
typedef int (*typeFuncPtr) (complex*); int func(int* x); . . typeFuncPtr funcPtr = &func;
In the following example, a red check occurs because:
The function pointer points to a function func.
func expects an argument of type int,
but the corresponding argument of the function pointer is a structure.

A function pointer points to a function, but the argument numbers of the pointer and the function do not match. For example:
typedef int (*typeFuncPtr) (int, int); int func(int); . . typeFuncPtr funcPtr = &func;.
In the following example, a red check occurs because:
The function pointer points to a function func.
func expects one argument but the
function pointer has two arguments.

A function pointer points to a function, but the return types of the pointer and the function do not match. For example:
typedef double (*typeFuncPtr) (int); int func(int); . . typeFuncPtr funcPtr = &func;
In the following example, a red check occurs because:
The function pointer points to a function func.
func returns an int value,
but the return type of the function pointer is double.

The value of a variable falls outside the range that you specify through the Global Assert mode. See the documentation for Polyspace Code Prover™ or Polyspace Code Prover Server™.
In the following example, a red check occurs because:
You specify a range 0...10 for the variable
glob.
The value of the variable falls outside this range.
![]()
Based on the check information on the Result Details pane, perform further steps to determine the root cause. You can perform the following steps in the Polyspace user interface only.
| Check Information | How to Determine Root Cause |
|---|---|
An array is converted to another array of larger size. |
|
Issues when dereferencing a function pointer:
|
|
The value of a variable falls outside the range that you specify through the Global Assert mode. | Browse through all previous instances of the global variable. Identify a suitable point to constrain the variable.
|
See if you can trace the orange check to a Polyspace assumption that occurs earlier in the code. If the assumption does not hold true in your case, add a comment or justification in your result or code. See Address Results in Polyspace Access Through Bug Fixes or Justifications.