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
VerCors-2.0.0-alpha-8 scoping errors when let-expression-defined variables are used inside triggers. #749
Comments
The viper equivalent is the following:
Syntactically it makes sense why this is not allowed in viper. But from vercors point of view it makes sense. I think we need to inline let bindings if we want to support this... |
I verified the following repro using my fork of VerCors-1.4.0 (with automatic quantifier trigger generation disabled):
Silver encoding:
This silver file also verifies successfully with the Viper VSCode extension. Looking at the generated silver code, I think this means that VerCors-1.4.0 ignores the trigger entirely? If that is the case I can just remove these triggers from my main pvl file when using VerCors 2.0.0. |
Nice that it's not a blocker for you! We'll keep this issue open for further discussion. |
I think there is nothing to support here, but I'm happy to consider explicitly inlining let expressions (I don't think it will have a big impact once on the smt level) On the topic of the error message, I'm still thinking about how to generalize this kind of error.
For the true part of this, the check is thus simply to see if an extracted node contains a reference to a declaration in a declarator below the place where the node is to be placed. For the false part, I guess there is always a defined scope but it's detached from the |
We just inline let bindings in patterns now. For now we are not dealing with the validity of declaration references generally. My plan for that is that I think |
Repro file:
Expected output: Pass
Actual output:
The text was updated successfully, but these errors were encountered: