Enable impact analysis (-impact-analysis
)
Check for presence or absence of impact between program elements designated as sources and sinks
Since R2023b
Description
This option affects a Code Prover analysis only.
Enable an analysis mode that determines if two objects in your program have an impact on each other. In this mode, if you designate a pair of objects as source and sink, Code Prover can prove if the source has no impact on the sink.
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
- On
In addition to checking for run-time errors, a Code Prover analysis checks for the presence or absence of impact between sources and sinks in your program. Depending on your source-sink specifications, you see the results of one or more of these checks:
The impact analysis mode takes additional time on top of the regular Code Prover analysis. If you want to perform impact analysis only and leave the regular Code Prover analysis for a separate run, enable the option
Show impact analysis results only (-impact-analysis)
.- Off (default)
The impact analysis mode is disabled. A Code Prover analysis performs the default checks for run-time errors.
Dependencies
If you enable impact analysis, you must also define source-sink pairs using the option Specify sources and sinks (-impact-specifications)
.
Command-Line Information
Parameter:
-impact-analysis |
Default: Off |
Example (Code Prover):
polyspace-code-prover -sources |
Example (Code Prover Server):
polyspace-code-prover-server -sources |
Version History
Introduced in R2023b