You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
saw-core: Fix handling of atWithDefault for infinite bit sequences
When calling `atWithDefault n d v i`, `d` should be returned if `i` is less
than `n`. `atWithDefault` is implemented as a primitive, so we must ensure that
this is done in `saw-core`'s `atWithDefaultOp` function. While
`atWithDefaultOp` was handling this correctly for generic infinite sequences, it
was _not_ correctly handling the special case of infinite bit sequences. This
led to the issues reported in #1768.
This patch fixes#1768 by introducing a `bpBvAtWithDefault` combinator that
implements the defaulting behavior above in terms of `bpBvAt`. I've added a test
case to demonstrate that the test case from #1768 now works as expected.
0 commit comments