Skip to content
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

[Isabelle] "test" as an identifier leads to surprising errors #30

Open
wimmers opened this issue May 11, 2020 · 0 comments
Open

[Isabelle] "test" as an identifier leads to surprising errors #30

wimmers opened this issue May 11, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@wimmers
Copy link
Collaborator

wimmers commented May 11, 2020

Problem description:
If "test" is used in Submission.thy we get surprising errors.

Example (Submission.thy):

...

lemma test: True
 by simp

...

Output:

...
Draft.Submission | Outer syntax error\<^here>: proposition expected, but end-of-input\<^here> was found
-- | --
Draft.Submission | Outer syntax error\<^here>: term expected, but keyword :\<^here> was found
Draft.Submission | Bad context for command "apply"\<^here> -- using reset state
...

Expected behavior: The system should accept the submission.

Analysis:
In OK_Test.thy, we define the command test and thus reserve it as a keyword.

Solution proposals:

  • Warn user if "test" is used as an identifier
  • Find a less common name, and hope it will not be used
  • Find a way to register the command in the proper context but to bind the command only later. This would also be the preferred solution for other commands defined in OK_Test.thy.
@wimmers wimmers added the bug Something isn't working label May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant