-
Notifications
You must be signed in to change notification settings - Fork 34
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
Cannot assert wildcard permission that was in contract #539
Comments
Interesting example! The observed behaviour may be surprising, but can be explained. Before we go into specifics, a bit of background: when inhaling an accessibility predicate In your example, this yields For the Does that make sense to you? Also, would you mind asking this on StackOverflow? |
Okay, I see how this can happen. So the problem is:
I guess to reflect my use case I'll have to be more explicit to viper that I don't mind if the wildcard is zero (since I'm assuming you are not going to include a
Thanks for your explanation, I think I have enough now to continue. |
I probably know too little about your use case, but I would either require |
I'm looking into formalising/checking rewrite rules in vercors that simplify the wildcard (partially) away, and this was an edge case I was running into. So in the case of those rewrite rules going for a permission-typed parameter might not be possible, but I'll have to look into it to be sure. In any case, it's good to know about the implicit requirements of |
The following program fails to verify:
I first stumbled upon this where
i
was a more complex expression (specifically, an abstract function). When you turn i into a constant, it verifies. Carbon reports the error reported in viperproject/carbon#376. I might've reported the root cause of this error once before, but I wasn't sure, so I thought I'd file an issue. Is there a chance this is a bug, or is it an (expected) incompleteness?Adding "i > 0" as a requires clause causes the example to verify, which I don't really understand. I would either expect a well-formedness error if i needed to be bigger than 0, or a pass without the "i > 0" clause...?
The text was updated successfully, but these errors were encountered: