-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Bogus error with mutual recursive operators #2204
Comments
Right. In this case, it is not the parser issue. What would be an optimal message in your opinion? |
"Apalache does not support recursive operators" |
The current error message both indicates where Apalache fails (we detect cyclic dependencies in Apalache's parser pass), and gives a witness for the mutual recursion. @lemmy Is your concern that the existing error message is too detailed, or that users might confuse the language fragment accepted by Apalache with SANY's capabilities? |
The point is that this is not a "TLA+ parser" (SANY) error, because (mutual) recursion in TLA+ is perfectly fine. |
I asked because other constructs, such as Apalache's overrides, can cause cyclic dependencies that Apalache rejects in the same way. IIUC, simply dropping the |
Based on the critique TLC receives for its poor error messages, I suggest telling Apalache's overrides apart from recursively declared operators in Apalache's error reporting. |
That's good input, improving Apalache's output is something we take very serious! In the current case, the example you reported is at the intersection of two language fragments that Apalache rejects: (1) cyclic use-defs and (2) recursion. It is simply a matter of what is checked first. I also understood that this issue is really about identifying "TLA+ parser" with SANY, to which I offered a pragmatic solution above. I'd still appreciate your feedback there:
|
In #2242, these errors will instead be prefixed with |
Closing this as fixed by #2242. If not, please reopen. |
Apalache claims that TLA+ parser rejects (
Error by TLA+ parser: Found a cyclic dependency among operators: IsEven, IsOdd
) a spec that it doesn't:The text was updated successfully, but these errors were encountered: