Contenuto principale

sldvoptions

Create Simulink Design Verifier options object

Description

options = sldvoptions returns an object options that contains the default values for the Simulink® Design Verifier™ parameters.

example

options = sldvoptions(model) returns the object options that references model configuration set.

Examples

collapse all

Create an options object and set several parameters for the sldvdemo_cruise_control model:

opts = sldvoptions;
opts.Mode = "TestGeneration";
opts.ModelCoverageObjectives = "MCDC";
opts.ReportIncludeGraphics = "on";
opts.SaveHarnessModel = "off";
opts.SaveReport = "off";
opts.TestSuiteOptimization = "LongTestcases";

Get the options object for the sldvdemo_cruise_control model. Use the deepCopy method to create a standalone version of sldvoptions starting with copy of options from the model configuration set.

Open the model sldvdemo_cruise_control in command prompt:

openExample("sldv/CruiseControlTestGenerationExample', ...
'supportingFile','sldvdemo_cruise_control");
optsModel = sldvoptions(bdroot);
optsCopy = optsModel.deepCopy;
optsCopy.MaxProcessTime = 120;

Input Arguments

collapse all

Model name or handle, specified as a character vector or string scalar.

Output Arguments

collapse all

This table lists the parameters that comprise a Simulink Design Verifier options object. The parameters are grouped by specific workflow and location in the Simulink Design Verifier options dialog box.

Note

When you set or retrieve parameters with set_param or get_param, prefix the option listed in this table with DV. For example, to set option for test generation analysis, use this command:

set_param("model_name","DVMode","TestGeneration")

Pane

Parameter

Description

Values

Design VerifierMode

Specify the analysis mode.

'TestGeneration' (default)
'PropertyProving'
'DesignErrorDetection'
MaxProcessTime

Specify the maximum time (in seconds) that Simulink Design Verifier spends analyzing a model.

You can set the value of maximum analysis time to the value that you are willing to provide to the analysis. You can also stop the analysis at any time.

int32

300 (default)
OutputDirSpecify a path name to which the Simulink Design Verifier software writes its output. It also specifies a directory in Simulink cache where Simulink Design Verifier write its output. For example, you can use tokens such as '$CacheFolder$' to represent the Simulink Design Verifier cache folder.
'sldv_output/$ModelName$'(default)
'$CacheFolder$'/$ModelName$'
MakeOutputFilesUnique

Specify whether the software makes its output file names unique by appending a numeric suffix.

'on' (default)
'off'
RebuildModelRepresentation

Specify whether to rebuild the model representation for Simulink Design Verifier analysis.

'Always'
'IfChangeIsDetected' (default)
DesignMinMaxConstraints

Specify whether Simulink Design Verifier software generates test cases that consider specified minimum and maximum values as constraints for input signals in your model.

'on' (default)
'off'
ReduceRationalApprox

Specify whether to run additional analysis to reduce instances of rational approximation.

'on' (default)
'off'
UseParallel

Specify whether to validate test cases or counterexamples with parallel computing. This option requires a Parallel Computing Toolbox™ license.

'on'
'off' (default)
CovFilter

Specify whether to ignore objectives specified by coverage filter file for test generation and dead logic analysis.

When set to on, this parameter enables CovFilterFileName.

'on'
'off' (default)
CovFilterFileNameSpecify the name of the folder and file name(s) that contain the objectives that you want to ignore from test generation and design error detection analysis.

character array

' ' (default)
SFcnSupport

Specify to enable support for S-functions that have been compiled to be compatible with Simulink Design Verifier.

'on' (default)
'off'
CodeAnalysisIgnoreVolatileSpecify to ignore volatile qualifier for the variables in S-Function.
'on'(default)
'off'
CodeAnalysisExtraOptions

Specify extra options to analyze S-functions that have been compiled to be compatible with Simulink Design Verifier. See Simulink Design Verifier Limitations and Considerations for S-Functions and C/C++ Code.

character array

' ' (default)
Block ReplacementsBlockReplacement

Specify whether the software replaces blocks in a model before its analysis.

When set to 'on', this parameter enables BlockReplacementModelFileName and BlockReplacementRulesList.

'on'
'off' (default)
BlockReplacementRulesList

Specify a list of block replacement rules that execute before its analysis.

This parameter is enabled when BlockReplacement is set to 'on'.

character array

'<FactoryDefaultRules>' (default)
BlockReplacementModelFileName

Specify a folder and file name for the model that is the result after applying block replacement rules.

This parameter is enabled when BlockReplacement is set to 'on'.

character array

'$ModelName$_replacement' (default)
Parameters and VariantsParameterConfiguration

Specify how to configure parameters during Simulink Design Verifier analysis. You can select the parameters manually to configure or let Simulink Design Verifier automatically detect and configure these parameters.

'None'(default)
'Auto'
'DetermineFromGeneratedCode'
'UseParameterTable'
'UseParameterConfigFile'
ParameterNames

Specify parameter names in the Parameter Table.

double array

'[]' (default)
ParameterConstraints

Specify parameter constraints in the Parameter Table.

double array

'[]' (default)
ParameterUseInAnalysisSpecify parameters for which the parameter configuration is enabled in the Parameter Table.

cell array

'[]' (default)
ParametersConfigFileName

Specify a MATLAB® function that defines parameter configurations for a model.

This parameter is enabled when Parameters is set to 'on'. This parameter is disabled when ParametersUseConfig is set to 'on'.

character array

'sldv_params_template.m' (default)
AnalyzeAllStartupVariantsSpecify to analyze all variant blocks in the model in a single analysis where the Variant activation time parameter is set to startup.
'on'(default)
'off'
Test GenerationTestgenTarget

Specify the test generation target as model which can be either Model, code generated as top model or code generated as model reference.

'Model'(default)
'GenCodeTopModel'
'GenCodeModelRef'

ModelCoverageObjectives

Specify the type of model coverage to achieve.

When ModelCoverageObjectives is set to 'MCDC', the Simulink Design Verifier software enables every coverage objective for decision coverage and condition coverage. Enabling coverage for condition coverage causes every decision and condition coverage outcome to be enabled.

This parameter is enabled when Mode is set to Test Generation.

'None'
'Decision'
'ConditionDecision' (default)
'MCDC'
'EnhancedMCDC'
TestConditions

Specify whether Test Condition blocks in your model are enabled or disabled.

This parameter is enabled when Mode is set to 'TestGeneration'.

'EnableAll'
'DisableAll'
'UseLocalSettings' (default)
TestObjectives

Specify whether Test Objective blocks in your model are enabled or disabled.

This parameter is enabled when Mode is set to 'TestGeneration'.

'EnableAll'
'DisableAll'
'UseLocalSettings' (default)
MaxTestCaseSteps

Specify the maximum number of simulation steps when attempting to satisfy a test objective.

The analysis uses the MaxTestCaseSteps parameter during certain parts of the test generation analysis to bound the number of steps that test generation uses. When you set a small value for this parameter, the parts of the analysis that are bounded completes in less time. When you set a larger value, the bounded parts of the analysis take longer, but it is possible for these parts of the analysis to generate longer test cases.

To achieve the best performance, set the MaxTestCaseSteps parameter to a value large enough to bound the longest required test case, even if the test cases that are ultimately generated are longer than this value.

When you set the TestSuiteOptimization parameter to 'LongTestcases', the analysis uses successive passes of test generation to extend a potential test case so that it satisfies more objectives. The analysis applies the MaxTestCaseSteps parameter to each individual iteration of test generation.

This parameter is enabled when Mode is set to 'TestGeneration'.

int32

10000 (default)
TestSuiteOptimization

Specify the optimization strategy to use when generating test cases.

This parameter is enabled when Mode is set to 'TestGeneration'.

'Auto' (default)
'IndividualObjectives'
'LongTestcases'
IncludeRelationalBoundarySpecify generation of test cases that satisfy relational boundary objectives.
'on'
'off' (default)
AbsoluteTolerance

Specify an absolute value for the tolerance that is applied for signal or parameter values in relational boundary tests.

double

{'1.0e-05'} (default)
RelativeTolerance

Specify a relative value for tolerance to be applied for signal or parameter values in relational boundary tests.

cell array

{'0.01'} (default)
StrictEnhancedMCDC

Specify whether to use strict propagation conditions for Enhanced Modified Condition Decision Coverage analysis.

This parameter is enabled when Mode is set to 'TestGeneration' and ModelCoverageObjectives is set to 'EnhancedMCDC'.

'on'
'off' (default)
IgnoreCovSatisfied

Specify to analyze the model, ignoring satisfied coverage objectives, as specified in CoverageDataFile.

'on'
'off' (default)
CoverageDataFile

Specify a folder and file name for the file that contains data about satisfied coverage objectives.

This parameter is enabled when IgnoreCovSatisfied is set to 'on'.

character array

' '(default)
ExtendExistingTests

Extend the Simulink Design Verifier analysis by importing test cases logged from a harness model or a closed-loop simulation model.

When set to 'on', this parameter enables ExistingTestFile and IgnoreExistTestSatisfied.

This parameter is enabled when Mode is set to 'TestGeneration'.

'on'
'off' (default)
ExistingTestFile

Specify a folder and file name for the MAT file that contains the logged test case data.

This parameter is enabled when Mode is set to 'TestGeneration' and ExtendExistingTests is set to 'on'.

character array

' '(default)
IgnoreExistTestSatisfied

Ignore the coverage objectives satisfied by the logged test cases in ExistingTestFile.

This parameter is enabled when Mode is set to 'TestGeneration'.

'on' (default)
'off'
Design Error DetectionDefectChecker

Specify to check for common and critical design errors such as division by zero, integer overflow, dead logic, and array out of bounds. The analysis detects only violations and does not report valid results.

'on' (default)
'off'
DetectDeadLogic

Specify whether to analyze your model for dead logic.

'on'
'off' (default)
DetectActiveLogic

Specify whether to analyze your model for active logic.

This parameter is enabled only if DetectDeadLogic is set to 'on'.

'on'
'off' (default)
DeadLogicObjectivesSpecify the type of coverage objectives to be analyzed for dead logic in the model.
'ConditionDecision' (default)
'Decision'
MCDC
DetectOutOfBounds

Specify whether to analyze your model for out of bounds array access errors.

'on' (default)
'off'
DetectDSMAccessViolations

Specify whether to analyze your model for data store access violations.

'on'
'off' (default)
DetectDivisionByZero

Specify whether to analyze your model for division-by-zero errors.

'on' (default)
'off'
DetectIntegerOverflow

Specify whether to analyze your model for integer and fixed-point data overflow errors.

'on' (default)
'off'
DetectInfNaN

Specify whether to analyze your model for non-finite and NaN floating-point values.

'on'
'off'(default)
DetectSubnormal

Specify whether to analyze your model for subnormal floating-point values.

'on'
'off'(default)
DesignMinMaxCheck

Specify whether to check that the intermediate and output signals in your model are within the range of specified minimum and maximum constraints.

'on'
'off' (default)
DetectBlockInputRangeViolations

Specify whether to analyze your model for block input range violations.

'on'
'off' (default)
DetectHISMViolationsHisl_0002

Specify whether to check the usage of rem and reciprocal operations that cause non-finite results.

'on'
'off' (default)
DetectHISMViolationsHisl_0003

Specify whether to check the usage of sqrt operations with inputs that can be negative.

'on'
'off' (default)
DetectHISMViolationsHisl_0004

Specify whether to check the usage of log and log10 operations that cause non-finite results.

'on'
'off' (default)
DetectHISMViolationsHisl_0028

Specify whether to check the usage of Reciprocal sqrt blocks with inputs that can go zero or negative.

'on'
'off' (default)
Property ProvingAssertions

Specify whether Assertion blocks in your model are enabled or disabled.

'EnableAll'
'DisableAll'
'UseLocalSettings' (default)
ProofAssumptions

Specify whether Proof Assumption blocks in your model are enabled or disabled.

'EnableAll'
'DisableAll'
'UseLocalSettings' (default)
ProvingStrategy

Specify the strategy for proving properties.

'FindViolation'
'Prove' (default)
'ProveWithViolationDetection'
MaxViolationSteps

Specify the maximum number of simulation steps over which the software searches for property violations.

This parameter is enabled whenMode is set to 'PropertyProving' and when ProvingStrategy is set to 'FindViolation' or 'ProveWithViolationDetection'.

int32

20 (default)
ResultsDataFileName

Specify a folder and file name for the MAT file that contains the data generated during the analysis, stored in an sldvData structure.

character array

'$ModelName$_sldvdata' (default)
SaveExpectedOutput

Specify to simulate the model by using test case signals and include the output values in the Simulink Design Verifier data file.

'on'
'off' (default)
RandomizeNoEffectData

Specify whether to use random values instead of zeros for input signals that have no impact on test or proof objectives.

'on'
'off' (default)
SaveHarnessModel

Specify to create a harness model generated by the Simulink Design Verifier analysis.

When SaveReport is set to 'on', this parameter must also be set to 'on'.

When set to 'on', this parameter enables HarnessModelFileName.

'on'
'off' (default)
HarnessSource

Specify the type of the Inputs block for the harness model.

This parameter is enabled when SaveHarnessModel is set to 'on'.

'Signal Editor' (default)
'Signal Builder'

Note

'Signal Builder' will be removed in future. Software issues warnings if you use 'Signal Builder' as the value for HarnessSource option.

HarnessModelFileName

Specify a folder and file name for the harness model.

This parameter is enabled when SaveHarnessModel is set to 'on'.

character array

'$ModelName$_harness' (default)
ModelReferenceHarness

Use a Model block to reference the model to run in the harness model.

'on'
'off' (default)
SlTestFileNameSpecify name and path for test file name in Simulink Test™.

character array

'$ModelName$_test' (default)
SlTestHarnessNameSpecify the name of the test harness in Simulink Test

character array

'$ModelName$_sldvharness' (default)
ReportSaveReport

Specify to generate and save a Simulink Design Verifier report.

When this parameter is set to 'on', SaveHarnessModel must also be set to 'on'.

When set to 'on', this parameter enables ReportFileName, ReportIncludeGraphics, and DisplayReport.

'on'
'off' (default)
ReportPDFFormatSpecify to generate additional report in PDF format.
'on'
'off' (default)
ReportFileName

Specify a folder and file name for the analysis report.

This parameter is enabled when SaveReport is set to 'on'.

character array

'$ModelName$_report' (default)
ReportIncludeGraphics

Specify to include screen shots of properties in the report. This is applicable only in property proving analysis mode.

This parameter is enabled when SaveReport is set to 'on' and Mode is set to 'PropertyProving'.

'on'
'off' (default)
DisplayReport

Specify to display the report that Simulink Design Verifier analysis generates after completing its analysis.

This parameter is enabled when SaveReport is set to 'on'.

'on' (default)
'off'

Alternatives

Use the Configuration Parameters dialog box to set Simulink Design Verifier options. On the Design Verifier tab of the Simulink Toolstrip, click Test Generation Settings > Settings. Set analysis parameters in the Design Verifier pane of the Configuration Parameters dialog box. For more information, see Set Design Verifier Options Using the Configuration Parameters Dialog Box.

Version History

Introduced in R2007a

expand all