Assert Operator – Block Diagram Editor for SWCs

Note

Only available in the block diagram editor for software components.

The Assert operator allows to specify lower and upper bound of an interval. This interval is then used by the code generator as the result interval of the Assert operator; the calculated interval of the operand is overwritten. It is possible to use the Assert operator with only one boundary; in that case, the other boundary is specified as -oo or +oo.

The result type of the assert operator is the same type as the operand, with the interval replaced by the interval specified on the assert operator.

The assert operator conveys user-defined interval information to the code generator. The Assert option in the operator's context menu opens the Assert Attributes dialog window, where you can enter min and max values for the operand interval. The code generator can use this information to generate more efficient code. However, the correctness of the assertion must be reviewed manually; this is supported by the semantic analysis.

In addition, the assert operator is suitable to replace implementation casts with deactivated Limit Assignments option (see also Setting the Limitation).

The following semantic checks are performed:

See also Example: Assert Operator.

See also

Using the Assert Operator (SWC Editors)

Assert Attributes Dialog Window

Context Menu – Operators: Assert Operator

Example: Assert Operator

Setting the Limitation

Promoting Messages