-
Notifications
You must be signed in to change notification settings - Fork 71
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
some duplicated statements and variable shadowing #205
Comments
I checked Diamond and see that it has two subclass statements, but that's not an error. SUMO has multiple-inheritance. I checked line 109 of emotion.kif and that line is in the middle of a documentation string. I suspect that the variable issues are likely solved already. Could I suggest that you do a git pull and run your analysis again? |
My duplication mechanism checks if the whole statement is duplicate. The first mineral duplicates were added by me, sorry. I've removed those. I've rerun it on upstream master, not mine master, to get the correct line numbers. |
Now things are updated. There is more coming. |
The problem in Merge.kif is that
should be
|
Thanks for finding this. Fixed just now in 46a8749 |
I didn't understand. In the end, do all the errors reported in the first comment reduced to only one error? |
No. Every line in the output is one separate error. You should reopen until all these are fixed, @apease |
So this issue should not be closed? |
That is correct. Every line in the output above has the format FILE:LINE:COLUMN Each such line indicates a separate error. |
But as @apease said, not all cases are errors! For instance: Food.kif:771:(subclass Cheese PreparedFood)
Economy.kif:4256:;(subclass Cheese DairyProduct) Besides, one statement is already commented. |
Each of these reported duplicate subclass definitions has an equivalent definition somewhere else in SUMO. In the case of
one in In this case I assume the one in Try searching for the whole statement under root directory to find all occurrencies for the rest of the definitions. |
Update: I've added duplicate |
If you need to I can try adding a reference print to the first |
I can remove the duplicates if you want to... |
@nordlow Removing exact textually duplicated statements would be very helpful. So for example at line 1015 in ComputingBrands (subclass WindowsOS95 WindowsOS) The subclass statements were duplicated (not sure what sort of copy-paste thing I did to make that happen!) and could be removed. But in the case of CookedFood I need to change the rules and terms since there's a confusion among cooking with heat and preparing (that may or may not involve heat). Other cases of subclass subsumption may similarly require a more complex fix than simple removal |
See #209 for a more complete list of duplicate definitions with better diagnostics. |
Here are more things detected by my SUO-KIF linter :)
Duplicate
subclass
andinstance
definitions (of the same (super)-class):Problems with unused variables and shadowing of variables:
The text was updated successfully, but these errors were encountered: