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
Fix passing of warnings #3302
Fix passing of warnings #3302
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3302 +/- ##
============================================
- Coverage 37.98% 37.98% -0.01%
+ Complexity 17024 17019 -5
============================================
Files 2059 2059
Lines 126029 126045 +16
Branches 21282 21283 +1
============================================
+ Hits 47874 47875 +1
- Misses 72272 72284 +12
- Partials 5883 5886 +3 ☔ View full report in Codecov by Sentry. |
Why does the example
generate >9 warnings? I would expect at most 4. |
The line is produced here: I guess we declare the sort multiple times. |
Hi, I get an NPE with the example:
Best regards, |
The problem is that generic sorts of the same name are declared several times. I think we should do something about it as otherwise one could rely on '\generic G extends X' but has actually '\generic G extends Y;' or '\generic G;' which would introduce subtle soundness problems. This means we should either use a different name in each file or limit the scope of generic sorts to the file itself. |
@unp1 Maybe we should solve this at a larger scale. We had sometimes the discussion for theory support in KeY. I copied my old notes but I need to sort them, then we would have local namespace by default. |
1259916
to
a6af031
Compare
Thanks. I agree that we should introduce proper theories with local namespaces. |
@unp1 @mattulbrich |
Hi, yes I would say so. Otherwise can one just not collect the warnings in the parser for sorts with the generic modifier, for now? But I am also fine with not showing warnings for sorts for the moment. |
After discussion in KeY meeting: Program variable and function of same name should not only be a warning but an actual error. |
@unp1 @mattulbrich The discussion of the KaKeY meeting is implemented. Error on shadowing of functions, and no warning on sort duplication. Both places are commented in the source code. |
Thanks. The code changes look good. I assume the failing tests is because of the stricter check for duplicate function names and we need to fix our test suite? |
@wadoon @mattulbrich: // Input file for KeY standalone prover version 0.497 \predicates { \problem { |
I too would say that function and predicate symbols are to be treated equally here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR seems to be ready to go now and I approved it. @wadoon: I did not click on "Merge when ready" in case you have some commits pending. Thanks a lot!
No warning was shown if a name collision happens in the signature of a problem. Program variables take preceding on the evaluation. The check was present in the code, but the generated warning did not bubble up to the
ProblemInitializer
.For example, consider following input file:
that loading ends up into a warning message now: