SAW's simulator doesn't short-circuit evaluation like Cryptol does #1820
Labels
subsystem: saw-core
Issues related to the saw-core representation or the saw-core subsystem
type: bug
Issues reporting bugs or unexpected/unwanted behavior
Milestone
Consider the following Cryptol property:
Cryptol's evaluation order allows proving this property without ever triggering the
error
:SAW's simulator, on the other hand, will not short-circuit during evaluation, and as a result, it will trigger this
error
:This is something that I originally discovered while investigating #1807. While the example above is somewhat contrived, my proposed fix for #1807 would cause SAW to eagerly evaluate
error
s in more places, such as in the following property:Note that array indexing (
@
) callserror
under the hood when the index value exceeds the length of the array. Due to #1807, SAW's simulator will effectively "clamp" the index value to be less than the length of the array, which means that SAW's simulator never even considers the cases wherei = 2
ori = 3
. But if I implement my proposed fix, then SAW does consider these cases, and due the aforementioned differences in short-circuiting behavior between Cryptol and SAW, adding(i < 2) ==> ...
isn't enough to avoid out-of-bounds indexes.To put it more directly: this issue is a blocker for fixing #1807.
The text was updated successfully, but these errors were encountered: