padv.builtin.task.DetectDesignErrors Class
Namespace: padv.builtin.task
Superclasses: padv.Task
Task for detecting design errors with Simulink Design Verifier
Description
The padv.builtin.task.DetectDesignErrors class provides a task that can
detect design errors in your models by using Simulink®
Design Verifier™. Design error detection can identify dead logic, integer overflow, division by
zero, and violations of design properties and assertions. By default, the
DetectDesignErrors task outputs a design error detection report and data
file.
You can add the task to your process model by using the
method addTask. After you add the task to your process model, you can run the
task from the Process Advisor app or by using the function
runprocess.
To view the source code for this built-in task, in the MATLAB® Command Window, enter:
open padv.builtin.task.DetectDesignErrorsThe padv.builtin.task.DetectDesignErrors class is a handle class.
Creation
Description
creates a task for detecting design errors with Simulink
Design Verifier.task = padv.builtin.task.DetectDesignErrors()
sets certain properties using one or more name-value arguments. For example, task = padv.builtin.task.DetectDesignErrors(PropertyName=Value)task
= padv.builtin.task.DetectDesignErrors(Name = "MyDetectDesignErrors") creates
a task with the specified name.
You can use this syntax to set property values for InputQueries,
Name, IterationQuery,
InputDependencyQuery, Licenses,
LaunchToolAction, and LaunchToolText.
The padv.builtin.task.DetectDesignErrors class also has other properties, but you cannot set
those properties during task creation.
Properties
The DetectDesignErrors class inherits properties from padv.Task. The properties listed in
Specialized Inherited Properties are padv.Task
properties that the DetectDesignErrors task overrides.
The task also has properties for specifying Simulink Design Verifier Options for creating a design
verification options object by using sldvoptions (Simulink Design Verifier) and generating a report by using sldvreport (Simulink Design Verifier).
Specialized Inherited Properties
Unique identifier for task in process, specified as a string.
Example: "MyDetectDesignErrors"
Data Types: string
Human-readable name that appears in Process Advisor app, specified as a string.
Example: "Detect Run-Time Errors"
Data Types: string
Task description, specified as a string.
When you point to a task in Process Advisor and click the information icon, the tooltip shows the task description.
Example: "This task uses Simulink Design Verifier to detect design errors or
dead logic for your models."
Data Types: string
Path to task documentation, specified as a string.
When you point to a task in Process Advisor, click the ellipsis (...), and click Help, Process Advisor opens the task documentation.
Example: fullfile(pwd,"taskHelpFiles","myTaskDocumentation.pdf")
Data Types: string
Type of artifact, specified as one or more of the values listed in this table. To specify multiple values, use an array.
| Category | Artifact Type | Description |
|---|---|---|
MATLAB | "m_class" | MATLAB class |
"m_file" | MATLAB file | |
"m_func" | MATLAB function | |
"m_method" | MATLAB class method | |
"m_property" | MATLAB class property | |
Model Advisor | "ma_config_file" | Model Advisor configuration file |
"ma_justification_file" | Model Advisor justifications file | |
Model Finder | "mf_database" | Model Finder database file |
Process Advisor | "padv_dep_artifacts" | Related artifacts that current artifact depends on |
"padv_output_file" | Process Advisor output file | |
Project | "project" | Current project file |
Requirements | "mwreq_file" | Requirement file (since R2024b) |
"mwreq_item" | Requirement (since R2024b) | |
| Requirement (for R2024a and earlier) | |
"sl_req_file" | Requirement file (for R2024a and earlier) | |
"sl_req_table" | Requirements Table | |
Stateflow® | "sf_chart" | Stateflow chart |
"sf_graphical_fcn" | Stateflow graphical function | |
"sf_group" | Stateflow group | |
"sf_state" | Stateflow state | |
"sf_state_transition_chart" | Stateflow state transition chart | |
"sf_truth_table_chart" | Stateflow truth table (since R2024a) | |
Simulink | "sl_block_diagram" | Block diagram |
"sl_data_dictionary_file" | Data dictionary file | |
"sl_embedded_matlab_fcn" | MATLAB function | |
"sl_block_diagram" | Block diagram | |
"sl_library_file" | Library file | |
"sl_model_file" | Simulink model file | |
"sl_protected_model_file" | Protected Simulink model file | |
"sl_subsystem" | Subsystem | |
"sl_subsystem_file" | Subsystem file | |
System Composer™ | "zc_activity_diagram" | System Composer architecture (since R2026a) |
"zc_block_diagram" | System Composer architecture (for R2025b and earlier) | |
"zc_component" | System Composer architecture component | |
"zc_file" | System Composer architecture file | |
| Tests | "harness_info_file" | Harness info file |
"sl_harness_block_diagram" | Harness block diagram | |
"sl_harness_file" | Test harness file | |
"sl_test_case" | Simulink Test™ case | |
"sl_test_case_result" | Simulink Test case result | |
"sl_test_file" | Simulink Test file | |
"sl_test_iteration" | Simulink Test iteration | |
"sl_test_iteration_result" | Simulink Test iteration result | |
"sl_test_report_file" | Simulink Test result report (before R2024b) | |
"sl_test_result_file" | Simulink Test result file | |
"sl_test_resultset" | Simulink Test result set | |
"sl_test_seq" | Test Sequence | |
"sl_test_suite" | Simulink Test suite | |
"sl_test_suite_result" | Simulink Test suite result |
Example: "sl_model_file"
Example: ["sl_model_file "zc_file"]
Query that finds the artifacts that the task iterates over, specified as a
padv.Query object or the name of a padv.Query
object. When you specify IterationQuery, the task runs one time
for each artifact returned by the query. In the Process
Advisor app, the artifacts returned by IterationQuery
appear under task title.
For more information about task iterations, see Overview of Process Model.
Query that finds artifact dependencies for task inputs, specified as a
padv.Query object or the name of a padv.Query
object.
The build system runs the query specified by
InputDependencyQuery to find the dependencies for the task
inputs, since those dependencies can impact if task results are up-to-date.
For more information about task inputs, see Overview of Process Model.
Example: padv.builtin.query.GetDependentArtifacts
List of licenses that the task requires, specified as a string.
Data Types: string
Function that launches a tool, specified as the function handle.
When you point to a task in the Process Advisor app, you can click the ellipsis (...) to see more options. For built-in tasks, you have the option to launch a tool associated with the task.
For the task DetectDesignErrors, you can launch the Design
Verifier app.
Data Types: function_handle
Description of the action that the LaunchToolAction property
performs, specified as a string.
Data Types: string
Inputs to the task, specified as:
a
padv.Queryobjectthe name of
padv.Queryobjectan array of
padv.Queryobjectsan array of names of
padv.Queryobjects
By default, the task DetectDesignErrors gets the current model that
the task is iterating over by using the built-in query
padv.builtin.query.GetIterationArtifact.
Location for standard task outputs, specified as a string.
The built-in tasks use tokens, like $DEFAULTOUTPUTDIR$, as
placeholders for dynamic path resolution during run-time. For more information, see
Dynamically Resolve Paths with Tokens.
Data Types: string
Simulink Design Verifier Options
Folder and or file name for the MAT file that contains the data generated during the
analysis, specified as a string. The data is stored in an sldvData
structure.
The built-in tasks use tokens, like $ITERATIONARTIFACT$, as
placeholders for dynamic path resolution during run-time. For more information, see
Dynamically Resolve Paths with Tokens.
Example: "myModel_sldvdata"
Data Types: string
Check that the intermediate and output signals in models are within the range of
specified minimum and maximum constraints, specified as "on" or
"off".
Example: "on"
Analyze models for active logic, specified as "on" or
"off". Note that this parameter is enabled only if
DetectDeadLogic is "on".
Example: "on"
Analyze models for block input range violations, specified as
"on" or "off".
Example: "on"
Analyze models for dead logic, specified as "on" or
"off".
Example: "on"
Analyze models for division-by-zero errors, specified as "on" or
"off".
Example: "off"
Analyze models for data store access violations, specified as
"on" or "off".
Example: "on"
Check the usage of rem and reciprocal
operations that cause non-finite results, specified as "on" or
"off".
Example: "off"
Check the usage of Square Root (Sqrt) operations with inputs that
can be negative, specified as "on" or
"off".
Example: "off"
Check the usage of log and log10 operations
that cause non-finite results, specified as "on" or
"off".
Example: "off"
Check the usage of Reciprocal Square Root (rSqrt) blocks with
inputs that can go zero or negative, specified as "on" or
"off".
Example: "off"
Analyze models for non-finite and NaN floating-point values, specified as
"on" or "off".
Example: "on"
Analyze models for integer and fixed-point data overflow errors, specified as
"on" or "off".
Example: "off"
Analyze models for out of bounds array access errors, specified as
"on" or "off".
Example: "off"
Analyze models for subnormal floating-point values, specified as
"on" or "off".
Example: "on"
After analysis, display the report that Simulink
Design Verifier generates, specified as "on" or
"off".
Example: "on"
Generate design error detection report, specified as a numeric or logical
1 (true) or 0
(false).
Example: false
Data Types: logical
Maximum time (in seconds) that Simulink Design Verifier spends analyzing a model, specified as a double.
Example: 120
Data Types: double
Options for the generated report, specified as "summary",
"objectives", "objects", or a combination of
these options in an array.
Example: "summary"
Format of the generated report, specified as either:
"HTML"— HTML format"PDF"— PDF format
Example: "PDF"
Folder and or file name for the analysis report, specified as a string.
The built-in tasks use tokens, like $DEFAULTOUTPUTDIR$, as
placeholders for dynamic path resolution during run-time. For more information, see
Dynamically Resolve Paths with Tokens.
Example: "myModel_report"
Data Types: string
Display messages in the log window, specified as a numeric or logical
1 (true) or 0
(false). When ShowUI is specified as
0, messages appear in the MATLAB Command Window.
Example: true
Data Types: logical
Methods
This class overrides the following inherited methods.
run | Detect design errors using Simulink Design Verifier Note You do not need to manually invoke this method. When you run a task using
the Process Advisor app or the
The function taskResult = run(obj,input) ... end |
dryRun |
Dry run the task to validate task inputs and generate
representative task outputs without actually running the task. The function taskResult = dryRun(obj, input) ... end |
launchToolAction | Launch the Design Verifier app. Process Advisor uses this method when you open the tool associated with a task. |
Examples
Add a task that can detect design errors by using Simulink Design Verifier.
Open the process model for your project. If you do not have a process model, open the Process Advisor app to automatically create a process model.
In the process model file, add the DetectDesignErrors task to your
process model by using the addTask method.
dedObj = pm.addTask(padv.builtin.task.DetectDesignErrors);
You can reconfigure the task behavior by using the task properties. For example, to detect dead logic:
dedObj.DetectDeadLogic = "on";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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)