-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verus panic when checking termination on a Seq
of recursive enums
#1222
Comments
I can fix the mutual recursion issue so that the decreases check generates valid AIR for mixtures of datatypes and integers, like
|
Thanks very much for looking into this issue! Here is a version that verifies:
I'm not sure if this is what you meant, but it seems to me that the |
Originally discovered in #1195.
As a minimal example, I want to write a recursive enum, like the following:
I then want to write a function (eventually an
impl DeepView
) to convertFoo
toSpecFoo
. I've tried various versions of this based on suggestions from @parno and @jaybosamiya, and the one that seems to work best uses two mutually recursive functions, as follows:Playground link here
However, this panics:
Notably, if I make either of
blah
orrecurse_foo
aclosed spec fn
with no body, the panic goes away and it verifies. So I guess the error must be to do with the mutual recursion?It turns out this is something of a blocker for our project, so it would be nice to know if this is just a bug that can be fixed, or if there's a fundamental issue with this kind of construction that would necessitate an alternative approach.
The text was updated successfully, but these errors were encountered: