# Memory¶

This section of the library includes components for manipulating values that change over time. The components in this section are implemented by using simple Boolean or switching logic together with a One Frame Delay component to obtain the value that a variable had on the previous frame of execution.

## Is First Frame¶

The Is First Frame component outputs True on the first frame of execution and False on every subsequent frame. The example implementation simply feeds a literal Boolean value into a One Frame Delay.

## Held and Transitioned¶

These components are similar to the standard Transition primitive in CertSAFE, except that they do not have a specific literal value that they are looking for. The Held component outputs True if the input value was the same on the previous frame as on this frame. The Transitioned component outputs True if the input value was different on the previous frame than on this frame. Internally, these components use the Is First Frame component so that they never output True on the first frame of execution, regardless of the input value.

## Hysteresis¶

This component takes a numeric input and compares it against lower and upper bound values. The component has a Boolean state output, which starts out initialized to False. If the input goes above the on limit (upper bound), the output changes to True. If the input drops below the off limit (lower bound), the output changes to False. Internally, this component uses an E Latch so that, if the input is simultaneously above the on limit and below the off limit, the output retains its previous value. (This can only happen if the off limit is greater than or equal to the on limit.)