No last without default#
No last without default
Description#
An assignment just as (last ‘variable -> (L)variable) shall not be used. Only if a default value is assigned such an statement is necessary. Implicit behaviour of SCADE
Rationale#
This improves model readability by ensuring that redundant assignments are avoided.
In this case, using the SCADE IDE to set “Last” to “True” on a variable or signal ensures that the previous value is used.
There is no need to add an equation writing last 'variable
into it.
Verification#
The rule registers to equations and raises a violation when the right side of the equation is a variable or signal with “Last” set to “True” and the left side is the same variable or signal.
Message:
Assignment (last 'variable -> (L)variable) found (<right_side> -> <left_side>)
Resolution#
Remove the redundant equation.
Customization#
N/A.