Main Content

Specify Polyspace Analysis Options

You can change the default options associated with a Polyspace® analysis. For instance, you can:

For the full list of analysis options, see Complete List of Polyspace Code Prover Analysis Options.

Depending on how you run Polyspace, you can configure the analysis options accordingly.

Polyspace User Interface

In the Polyspace user interface, you create a project for the analysis. The project can have one or more modules. Click the Configuration node in a module. On the Configuration pane, change options as needed.

A snapshot of a Polyspace configuration

For more information, see the tooltip on each option. Click the More help link for context-sensitive help on the options.

A typical tooltip that appears on a Polyspace option.

For more information, see Run Static Analysis in Polyspace User Interface.

Windows or Linux Scripts

Provide the options to the polyspace-bug-finder or polyspace-code-prover command. See also:

For instance:

polyspace-code-prover -sources file_name -main-generator -main-generator-calls unused -main-generator-writes-variables all

You can also provide the options in a text file. See Run Polyspace Analysis from Command Line.

MATLAB Scripts

Create a polyspace.Project object and set the options through the Configuration property of the object. See also:

For instance:

proj = polyspace.Project;
proj.Configuration.CodingRulesCodeMetrics.EnableMisraC3 = true;
proj.Configuration.BugFinderAnalysis.EnableCheckers = false;

See also Run Polyspace Analysis by Using MATLAB Scripts.

Simulink

In your Simulink® model, specify the basic options through Simulink Configuration Parameters. On the Apps tab, select Polyspace and then on the Polyspace tab, select Settings.

To navigate to Polyspace analysis options related to the generated code, on the Polyspace tab, see Settings > Project Settings.

See:

MATLAB Coder App

In the MATLAB® Coder™ app, after code generation, specify the basic options through the Polyspace pane. From this window, you can navigate to the full set of Polyspace analysis options.

See: