Common source files (-unit-by-unit-common-source
)
Specify files that you want to include with each source file during a file by file verification
Description
This option affects a Code Prover analysis only.
This option is not available for code generated from MATLAB® code or Simulink® models.
For a file by file verification, specify files that you want to include with each source file verification. These files are compiled once, and then linked to each verification.
Set Option
User interface (desktop products only): In your project configuration, the option is on the Code Prover Verification node. See Dependencies for other options that you must also enable.
User interface (Polyspace Platform, desktop products only): Polyspace Platform does not support a file by file verification.
Command line and options file: Use the option
-unit-by-unit-common-source
. See Command-Line Information.
Why Use This Option
There are many reasons you might want to verify each source file independently of other files. For instance, if verification of a project takes very long, you can perform a file by file verification to identify which file is slowing the verification.
If you perform a file by file verification, some of your files might be missing information present in the other files. Place the missing information in a common file and use this option to specify the file for verification. For instance, if multiple source files call the same function, use this option to specify a file that contains the function definition or a function stub. Otherwise, Polyspace® uses its own stubs for functions that are called but not defined in the source files. The assumptions behind the Polyspace stubs can be broader than what you want, leading to orange checks.
Settings
No Default
Click to add a field. Enter the full path to a file. Otherwise, use the button to navigate to the file location.
Dependencies
This option is enabled only if you select Verify files independently (-unit-by-unit)
.
Command-Line Information
Parameter: -unit-by-unit-common-source |
Value:
|
No Default |
Example (Code Prover): polyspace-code-prover
-sources |
Example (Code Prover
Server):
polyspace-code-prover-server -sources
|