Specify Polyspace Analysis Options
You can change the default options associated with a Polyspace® analysis. For instance, you can:
Change the set of defects that Bug Finder looks for.
Change the default behavior of run-time checkers in Code Prover.
See, for instance,
Overflow mode for unsigned integer (-unsigned-integer-overflows)
(Polyspace Code Prover).
For the full list of analysis options, see Complete List of Polyspace Bug Finder Analysis Engine 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.
For more information, see the tooltip on each option. Click the More help link for context-sensitive help on the options.
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:
polyspace-code-prover
(Polyspace Code Prover)
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;
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: