polyspace.ModelLinkOptions Class
R2026bNamespace: polyspace
Create a project configuration object for running Polyspace analysis on generated code
Description
Run a Polyspace® analysis from MATLAB® by using a project configuration object. To specify source files and customize analysis options, change the object properties.
This class supports code generated from Simulink® models, MATLAB
Coder™ output, and S-Function or custom code. If you are analyzing handwritten
code, use polyspace.Options instead.
Note
Before you run Polyspace from MATLAB, you must link your Polyspace and MATLAB installations. See Integrate Polyspace with MATLAB and Simulink.
Construction
psprjConfig = polyspace.ModelLinkOptions creates a project
configuration object that is configured for running a Polyspace analysis on generated code.
psprjConfig = polyspace.ModelLinkOptions(
creates a project configuration object that is configured to run analysis on code
generated in the language lang)lang.
psprjConfig = polyspace.ModelLinkOptions(
creates a project configuration object that is configured by using model specific
information from the Simulink model target)target. Prior to extracting options from
target, you must load the model and generate code from
it.
psprjConfig = polyspace.ModelLinkOptions(
creates a model-specific project configuration object that is configured by using the
Polyspace analysis options specified in target, psOpt)psOpt.
psprjConfig = polyspace.ModelLinkOptions(
creates a project configuration object that uses target, psOpt, asModelRef)asModelRef to
specify which type of generated code to analyze—standalone code or model reference
code.
psprjConfig = polyspace.ModelLinkOptions('-slcc',
creates a project configuration object for S-Function or custom code verification of the
Simulink model target)target.
psprjConfig = polyspace.ModelLinkOptions('-slcc',
creates a project configuration object for S-Function or custom code verification of the
Simulink model target, psOpt)target using the Polyspace analysis options specified in psOpt.
psprjConfig = polyspace.ModelLinkOptions('-codegenfolder',
creates a project configuration object from MATLAB Coder-generated code in the folder
codegenFolder)codegenFolder.
psprjConfig = polyspace.ModelLinkOptions('-codegenfolder',
creates a project configuration object from MATLAB Coder-generated code in the folder codegenFolder, psOpt)codegenFolder
using the Polyspace analysis options specified in psOpt.
Input Arguments
Properties
The object properties correspond to the configuration options for Polyspace projects. The properties are organized in the same categories as the Polyspace interface. The property names are a shortened version of the DOS command-line name. For syntax details, see polyspace.ModelLinkOptions Properties.
Methods
| copyTo | Copy common settings between Polyspace options objects |
| generateProject | Generate psprj project from options object |
| toScript | Add Polyspace options object definition to a script |
Examples
Alternatives
If you are analyzing handwritten code, use a polyspace.Project object
directly. Alternatively, use a polyspace.Options object.