Main Content

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

Set the option using one of these methods:

  • Polyspace® user interface (desktop products only): In your project configuration, select the Check Behavior node and then select this option.

  • Polyspace Platform user interface (desktop products only): In your project configuration, on the Static Analysis tab, select the Run Time Errors > Check Behavior node and then select this option.

  • 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.

Command-Line Information

Parameter: -impact-analysis
Default: Off
Example (Code Prover): polyspace-code-prover -sources file_name -impact-analysis -impact-specifications sourcesAndSinks.xml
Example (Code Prover Server): polyspace-code-prover-server -sources file_name -impact-analysis -impact-specifications sourcesAndSinks.xml

Version History

Introduced in R2023b