Specify sources and sinks (-impact-specifications
)
Specify XML file that identifies program elements as sources and sinks for impact analysis
Since R2023b
Description
This option affects a Code Prover analysis only.
Specify source-sink pairs in XML format for impact analysis in Code Prover. If you designate a pair of objects as source and sink and enable impact analysis, Code Prover can prove if the source has no impact on the sink.
The XML file for specifying sources and sinks assigns ID-s to variables or function arguments or function parameters, and then lists impact expectations using a pair of ID-s. For instance:
<no-impact source="air_density_calibration" sink="display_x_pos" />
air_density_calibration
is not expected to impact another variable with an ID of display_x_pos
.For more information on how to assign id
-s, see the sample specification file
.polyspaceroot
\polyspace\verifier\cxx\impact-specifications-template.xml
Set Option
User interface (desktop products only): In your project configuration, the option is on the Check Behavior node.
User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Run Time Errors > Check Behavior node.
Command line and options file: Use the option -impact-analysis
. See Command-Line Information.
Why Use This Option
If you want certain variables in your program to be unrelated to certain other variables, you can enable impact analysis in Code Prover. For instance, you might want outputs from certain AUTOSAR software components to be completely unrelated to certain inputs. You can list all input/output pairs where you expect no impact between the inputs and outputs and check if your program meets this design specification.
Settings
Enter the path to the XML file that specifies the sources and sinks for impact analysis.
Dependencies
This option is available only if you enable impact analysis using the option Enable impact analysis (-impact-analysis)
.
Command-Line Information
Parameter:
-impact-specifications |
Value: Path to
|
Default: Off |
Example (Code Prover):
polyspace-code-prover -sources |
Example (Code Prover Server):
polyspace-code-prover-server -sources |
Version History
Introduced in R2023b
See Also
Enable impact analysis (-impact-analysis)
| Show impact analysis results only (-impact-analysis-only)
| Expected impact
| Expected absence of impact
Topics
- Prove Absence of Impact Between Objects in C/C++ Program
- Source and Sink Specifications for Impact Analysis in Polyspace Code Prover
- Event and Memory Zone Specifications for Impact Analysis in Polyspace Code Prover
- Review Results of Impact Analysis in Polyspace Code Prover
- Specify Polyspace Analysis Options