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
My best guess about this is the following:
Oh this ones a real doozy; here's what happened
Enter function
Explode struct - only left with Owned<int[1]>
Explode array - left with take A = each (..) { .. }
Use extract - left with Owned<int>, no empty each (..) { .. } because guard is empty
Exit function
Request struct
Request field of struct (Owned<int[1]>)
Request each (..) {..}
Move Owned<int> into a newtake A2 = each (..) { .. }
Continue wrapping up resource
Now try to prove constraint, which involves two different arrays A1 == A2. Though this err doesn't produce one, the counter-example should be something out of range.
Cry because we're fundamentally dealing with finite maps and SMT maps are total/infinite.
The worst part about this is that even the usual approach of defining a (hypothetical Rocq provable) lemma for is not available to us because the it's the same resources used at two different times producing different SMT values, rather than two each resources defined over the same range.
This suggests (a) we need to be able to pass ghost arguments to lemmas (#540) and (b) the export from CN to Rocq should track and tag every ghost SMT value with its range to get around this.
Of course, even with a lemma, calling it here would be silly, so if possible, alternatives to the above proposal are welcome.
The text was updated successfully, but these errors were encountered:
dc-mak
changed the title
[CN] Figure out how to prove this example.
[CN] Destroying and recreating an iterated Owned loses self-equality / Lemma backend should export range constraints for all SMT arrays
Nov 29, 2024
@septract shared this surprisingly interesting example of failed verification:
My best guess about this is the following:
Oh this ones a real doozy; here's what happened
Owned<int[1]>
take A = each (..) { .. }
Owned<int>
, no emptyeach (..) { .. } because guard is empty
each (..) {..}
Owned<int>
into a newtake A2 = each (..) { .. }
A1 == A2
. Though this err doesn't produce one, the counter-example should be something out of range.The worst part about this is that even the usual approach of defining a (hypothetical Rocq provable) lemma for is not available to us because the it's the same resources used at two different times producing different SMT values, rather than two
each
resources defined over the same range.This suggests (a) we need to be able to pass ghost arguments to lemmas (#540) and (b) the export from CN to Rocq should track and tag every ghost SMT value with its range to get around this.
Of course, even with a lemma, calling it here would be silly, so if possible, alternatives to the above proposal are welcome.
The text was updated successfully, but these errors were encountered: