pslinkoptions
Properties
Properties for the pslinkoptions
object
You can create a pslinkoptions
object to customize your analysis in the MATLAB® Command Window. Use these properties to specify configuration options,
where and how to store results, additional files to include, and data range
modes.
Configuration Options
VerificationSettings
— Option to set coding rule and configuration settings for C code
'PrjConfig'
(default) | 'PrjConfigAndMisraAGC'
| 'PrjConfigAndMisra'
| 'PrjConfigAndMisraC2012'
| 'MisraAGC'
| 'Misra'
| 'MisraC2012'
Coding rule and configuration settings for C code specified as:
'PrjConfig'
– Inherit options from the project configuration.'PrjConfigAndMisraAGC'
– Inherit options from the project configuration and enable MISRA™ AC AGC rule checking.'PrjConfigAndMisra'
– Inherit options from the project configuration and enable MISRA C™:2004 rule checking.'PrjConfigAndMisraC2012'
– Inherit options from the project configuration and enable MISRA C:2012 guideline checking.'MisraAGC'
– Enable MISRA AC AGC rule checking. This option runs only compilation and rule checking.'Misra'
– Enable MISRA C:2004 rule checking. This option runs only compilation and rule checking.'MisraC2012'
– Enable MISRA C:2012 rule checking. This option runs only compilation and guideline checking.
Example: opt.VerificationSettings =
'PrjConfigAndMisraC2012'
VerificationMode
— Option to set Polyspace analysis mode
'CodeProver'
(default) | 'BugFinder'
Polyspace® mode specified as 'BugFinder'
, for a Bug
Finder analysis, or 'CodeProver'
, for a Code Prover
verification.
Example: opt.VerificationMode =
'BugFinder';
EnablePrjConfigFile
— Option to allow a custom configuration file
false
(default) | true
Allows a custom configuration file instead of the default configuration
specified as true or false. Use the PrjConfigFile
option to specify the configuration file.
Example: opt.EnablePrjConfigFile = true;
PrjConfigFile
— Option to set custom configuration file
''
(default) | full path to a .psprj
file
Custom configuration file to use instead of the default configuration
specified by the full path to a .psprj
file. Use the
EnablePrjConfigFile
option to use this
configuration file during your analysis.
Example: opt.PrjConfigFile =
'C:\Polyspace\config.psprj';
CheckConfigBeforeAnalysis
— Option to check configuration before analysis
'OnWarn'
(default) | 'OnHalt'
| 'Off'
This property sets the level of configuration checking done before the analysis starts. The configuration check before analysis is specified as:
'Off'
— Checks only for errors. Stops if errors are found.'OnWarn'
— Stops for errors. Displays a message for warnings.'OnHalt'
— Stops for errors and warnings.
Example: opt.CheckConfigBeforeAnalysis =
'OnHalt';
Results
ResultDir
— Option to set results folder name and location
'C:\Polyspace_Results\results_$ModelName$'
(default) | folder name | folder path
Results folder name and location specified as the local folder name or the
folder path. This folder is where Polyspace writes the analysis results. This folder name can be either an
absolute path or a path relative to the current folder. The text
$ModelName$
is replaced with the name of the original
model.
Example: opt.ResultDir =
'\results_v1_$ModelName$';
AddSuffixToResultDir
— Option to add unique number to the results folder name
false
(default) | true
Add unique number to the results folder name specified as true or false. If true, a unique number is added to the end of every new result. Using this option helps you avoid overwriting the previous results folders.
Example: opt.AddSuffixToResultDir = true;
OpenProjectManager
— Option to open the Polyspace environment
false
(default) | true
Open the Polyspace environment to monitor the progress of the analysis, specified as true or false. Afterward, you can review the results.
Example: opt.OpenProjectManager = true;
AddToSimulinkProject
— Option to add results to the open Simulink® project
false
(default) | true
Add your results to the currently open Simulink project, if any, specified as true or false. This option allows you to keep your Polyspace results organized with the rest of your project files. If a Simulink project is not open, the results are not added to a Simulink project.
Example: opt.AddToSimulinkProject = true;
Additional Files
EnableAdditionalFileList
— Option to allow an additional file list
false
(default) | true
Allow an additional file list to be analyzed, specified as true or false.
Use with the AdditionalFileList
option.
Example: opt.EnableAdditionalFileList =
true;
AdditionalFileList
— Option specifying list of additional files to be analyzed
{0x1 cell}
(default) | cell array of files
List of additional files to be analyzed specified as a cell array of
files. Use with the EnableAdditionalFileList
option to
add these files to the analysis.
Example: opt.AdditionalFileList = {'sources\file1.c',
'sources\file2.c'};
Data Types: cell
Data Ranges
InputRangeMode
— Option to enable design range information
'DesignMinMax'
(default) | 'FullRange'
Enable design range information specified as
'DesignMinMax'
, to use data ranges defined in blocks
and workspaces, or 'FullRange'
, to treat inputs as
full-range values.
Example: opt.InputRangeMode =
'FullRange';
ParamRangeMode
— Option to enable constant parameter values
'None'
(default) | 'DesignMinMax'
Enable constant parameter values, specified as 'None'
,
to use constant parameters values specified in the code, or
'DesignMinMax'
to use a range defined in blocks and
workspaces. If your model uses
ImportedExtern
look-up tables, setting
ParamRangeMode
to 'DesignMinMax'
includes the ranges of the tables in the data range specification of the
model.
Example: opt.ParamRangeMode =
'DesignMinMax';
OutputRangeMode
— Option to enable output assertions
'None'
(default) | 'DesignMinMax'
Enable output assertions specified by 'None'
, to not
apply assertions, or 'DesignMinMax'
to apply assertions
to outputs using a range defined in blocks and workspace.
Example: opt.ParamRangeMode =
'DesignMinMax';
Embedded Coder Only
EnableModelRefIgnoreList
— Option to enable ignoring model references
false
(default) | true
Allow Polyspace analysis to ignore specified model references.
For Embedded Coder® only
Example: opt.EnableModelRefIgnoreList =
1;
ModelRefIgnoreList
— Option to list model references to be ignored
{0x1 cell}
(default) | cell array of model names
List of model references to be ignored, specified as a cell array of model
names. Each model name is a string. Use with the
EnableModelRefIgnoreList
option to ignore the
listed models in a Polyspace analysis.
For Embedded Coder only
Example: opt.ModelRefIgnoreList = {'modelRef1',
'modelRef2'};
ModelRefVerifDepth
— Option to set depth of verification
'Current model only'
(default) | '1'
| '2'
| '3'
| 'All'
Specify the depth for analyzing the models that are referenced by the current model.
'Current Model Only'
: Analyze only the top model without analyzing the referenced models. For instance, you might use this option when the referenced models are library models.'1'
,'2'
, or'3'
: Analyze referenced models up to the specified depth in the reference hierarchy. For instance, to analyze the models that are referenced by the top model, specify the propertyModelRefVerifDepth
as'1'
. To analyze models that are referenced by the first level of references, specify this property as'2'
. If referenced models up to the specified depth is specified in the optionModelRefIgnoreList
, Polyspace ignores the models.'All'
: Analyze all referenced models with the current model, except the ignored referenced models specified in the optionModelRefIgnoreList
.
For Embedded Coder only
Example: opt.ModelRefVerifDepth = '3';
ModelRefMinMaxVerif
— Option to verify that input and output of model references are within specifiedvalues
'CheckAndConstrain'
(default) | 'Check'
| 'None'
Specify how Polyspace checks if the inputs and outputs of the model reference step functions in the generated code are within the specified range. The range is determined by the values you specify for Minimum and Maximum in the Signal Attribute tab in the Block Parameters dialog box of the inport and outport blocks.
'CheckAndConstrain'
— Polyspace verifies whether the inputs and outputs of model reference step functions are within the range specified by theMinimum
andMaximum
signal attributes of the inports and outports. If an input or output value is outside of the specified range, Polyspace discards the out-of-range value in subsequent analysis.'Check'
— Polyspace verifies whether the inputs and outputs of model reference step functions are within the range specified by theMinimum
andMaximum
signal attributes of the inports and outports. If an input or output value is outside of the specified range, Polyspace does not discard the out-of-range value in subsequent analysis.'None'
— Polyspace does not verify the inputs and outputs of model reference step functions.
For Embedded Coder only
If you perform a model-by-model verification, Polyspace checks the input of model references and in the subsequent analysis assumes that the output is within the specified range.
Example: opt = pslinkoptions(modelname); opt.ModelRefMinMaxVerif =
'Check';
ModelRefByModelRefVerif
— Option to set model reference analysis mode
false
(default) | true
Specify whether you want to analyze all referenced models together, or analyze the models individually.
false
: Analyze the top model and the referenced models together. For instance, you might want to use this option to check for integration or scaling issues.true
: Analyze the top model and the referenced models individually.
For Embedded Coder only
Example: opt.ModelRefByModelRefVerif =
true;
CxxVerificationSettings
— Option to set coding rule and configuration settings for C++ code
'PrjConfig'
(default) | 'PrjConfigAndMisraCxx'
| 'PrjConfigAndJSF'
| 'MisraCxx'
| 'JSF'
Coding rule and configuration settings for C++ code specified as:
'PrjConfig'
– Inherit options from project configuration and run complete analysis.'PrjConfigAndMisraCxx'
– Inherit options from project configuration, enable MISRA C++ rule checking, and run complete analysis.'PrjConfigAndJSF'
– Inherit options from project configuration, enable JSF® rule checking, and run complete analysis.'MisraCxx'
– Enable MISRA C++ rule checking, and run compilation phase only.'JSF'
– Enable JSF rule checking, and run compilation phase only.
Only for Embedded Coder
Example: opt.CxxVerificationSettings =
'MisraCxx';
TargetLink Only
AutoStubLUT
— Option to set lookup Table code usage
false
(default) | true
Lookup Table code usage, specified as true or false.
true
— use Lookup Table code during the analysis.false
— stub Lookup Table code.
Only for TargetLink®
Example: opts.AutoStubLUT = true;
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)