Main Content

Treat Simulink logic blocks as short-circuited

Use logical short-circuiting during coverage analysis

Model Configuration Pane: Coverage

Description

The Treat Simulink logic blocks as short-circuited parameter specifies whether coverage takes into account the order of operands in blocks that perform a logical operation, such as Logical Operator blocks.

For example, consider a Logical Operator block with the Operator block parameter set to And. When using logical short-circuiting, if the first input signal is false, then the block output is false and there is no need to evaluate the second input signal. Therefore, in cases where the first input is false, Simulink® Coverage™ does not analyze the block paths that lead to the second input signal.

Note

The C and C++ languages use logical short-circuiting. Clearing this parameter can result in a discrepancy between model and code coverage.

Dependencies

To enable this parameter, select the Enable coverage analysis parameter.

Settings

on (default) | off
on

Use logical short-circuiting during coverage analysis. Coverage analysis does not consider the input to a logical operation that another input makes redundant.

off

Do not use logical short-circuiting during coverage analysis. Coverage analysis considers all inputs to a logical operation during coverage analysis.

Programmatic Use

Parameter: CovLogicBlockShortCircuit
Type: character vector | string
Value: "on" | "off"
Default: "off"

Version History

Introduced in R2016a