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

Pass location of source code in oracle context #527

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

niknetniko
Copy link
Member

This is a small change/experiment:

  • allowing limiting which languages a custom check oracle supports
  • if this list of languages is present, pass the location of the source code to the custom check functions of the programmed oracles.

The intended use of this would be to provide a semi-supported way of doing static analysis of the code of the submission. The reasons for doing this are:

  • We do have demand for this (and other, proper, solutions is long-term research: Support custom static analysis #392 )
  • We do not have to point people wanting to do this to the Python judge if this is implemented.
  • The maintenance burden and backwards compatibility story for us is very minimal: we just pass the path to the submission in the oracle context. We are not committing to allowing static checks specifically.

An alternative, doing this in the language-specific oracles forces the use of language-specific oracles, which are much harder to properly implement than the programmed ones.

I would certainly not include an example of using this for static checks in the documentation: we do not want to encourage this. The main question is thus do we actually want to make this possible or not?

Base automatically changed from feature/better-validation to master June 14, 2024 12:02
@niknetniko niknetniko marked this pull request as ready for review June 25, 2024 13:18
@niknetniko
Copy link
Member Author

I am inclined to merge this, as it introduces almost no maintenance overhead for us, and allows researching a better solution in peace (as this is provides a non-horrible workaround).

@niknetniko niknetniko merged commit c3b2080 into master Jun 25, 2024
8 checks passed
@niknetniko niknetniko deleted the feature/include-source-in-oracle branch June 25, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant