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

Python3 syntactically incorrect programs are not included #80

Closed
tskowal opened this issue Apr 8, 2020 · 2 comments
Closed

Python3 syntactically incorrect programs are not included #80

tskowal opened this issue Apr 8, 2020 · 2 comments
Labels

Comments

@tskowal
Copy link

tskowal commented Apr 8, 2020

A Python3 program with any syntactical error is not included in comparisons which is very annoying. If you have a class in which some students attempted to copy and modify programs, but made some mistake, it might not be detected.

As a matter of fact, if syntactically incorrect programs were included, the same front end would work reasonably well for Python2 programs.

@tskowal
Copy link
Author

tskowal commented Jul 12, 2021

I understand it won't be fixed? Pity! It's a very common problem.

@tsaglam
Copy link
Member

tsaglam commented Jul 12, 2021

The problem lies in how JPlag works at its core. It detects plagiarism based on parsed tokens of the code. The problem is, if a parser for a language cannot parse the code, it cannot work. If the code has syntax errors, the parser will probably fail. In JPlag, the Python parser is based on a ANTLR grammar (see https://github.com/jplag/jplag/tree/master/jplag.frontend.python-3). This grammar is responsible for what can be parsed and what can't. If you want, you can contribute to that language frontend end improve its parsing capabilities. We, however, cannot rewrite how JPlag works at its core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants