-
Notifications
You must be signed in to change notification settings - Fork 14
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
Static validator needs some clarification #329
Comments
IMO, the static validator must handle all languages allowed by Note that "handle" could mean, "if C++ just accept". |
This is indeed missing. It should report in the same way as the output validator, with exit codes 42 and 43, using judgemessage.txt, teammessage.txt and score.txt. |
I think it would also be very good if there was an example of a (useful) static validator. I'm a bit unsure when one would use this feature, and I'm also worrying a bit about how robust implementations will be if people actually do (trying to build something that meaningfully and robustly does static analysis (possibly of several languages) from just being given a directory which contains a mix of user submission and compilation artifacts feels a bit non-trivial to me, but I may be missing something here). |
I'll try to provide one for an old problem we had at RU as soon as I can. |
Thank you!
I didn't phrase myself very well. My point was basically that if I wrote a static analyzer, I would much prefer to have its input only be exactly the files submitted by the user, instead of those plus whatever compilation artifacts may have been produced by the compilation process used by a judging system (which an average problem author has little insight into, and which may easily change). |
A few things I found from Fall 2023, where I helped a few teachers use the problem package format. These are 4 different examples: Teacher wanted students to specifically use a for loop to find two digit numbers less than Now I tried to use Another kind of static validation that was desired was more code formatting related. Yet another case was a teacher wanting students to submit a We also use an assignment in another course that was never put into the format. |
I was thinking the same, but @pehrsoderman pointed out that e.g. in Java it could be significantly easier to do some kinds of static validation on the |
(It is: for the multipass problems we implemented using include/ for EGOI we solved the first issue by putting main.py in a subdirectory with unpredictable name, and the second by using |
Further arguments for the existence of static validators: I hosted an April fools contest, where the task was to solve some problem, and the score of a submission was the percentage of the character "a" in the source code (of course, this wasn't specified in the statement, it's April fools). Problem link. Another use would be a code golf contest. In our code golf contests, we usually make \r\n count as a single character, so that windows users aren't punished, an arbitrary decision that requires static validators. |
Comments from @gkreitz:
Thoughts?
The text was updated successfully, but these errors were encountered: