I am engaged in my thesis work, the essence of which is as follows: there is some kind of web application in Java, which is a system for testing tasks (similar to the system for testing olympiad tasks).

In more detail about this: the user visits the site he is presented with a list of tasks (simple C programs, for example, to find the n Fibonacci member, etc.) and a test list of input and output data for the program, all this is loaded from the database. The user solves the task and sends the text of the program to the server and there should be a check (by the gcc compiler) of this task.

How to make a correct job check? There is an idea to start the gcc process with a task sent from the user, read the compiler output to the terminal, if there is rubbish, give the user a compilation error, if not, load just such test input data for the program and check the output and then output the user solved problem or not. But there is a problem with this, the user can simply write printf(...) according to the test data without the implementation of the algorithm and the answer will come to him that everything is correct. So can someone tell me how to eliminate this?

I was told to put a neuron in place, then what would it be like and what parameters would it check the program for?

  • 3
    I did not understand why there is a neuron and what problems it solves. Usually there are several tests in testing systems and only a part of them is available to the user. Thus, the user will almost never be able to make a ready output of results without solving the problem directly - Viktorov
  • Rather, I would worry that the user program would not do anything extra. I couldn’t work with the file system or the network, I couldn’t suspend the whole system and so on - Viktorov
  • And by what means can this security be implemented? - QuickDzen

1 answer 1

Well, actually, a neural network is not needed here at all. Just do a few repeated tests, for example: to find the n-th Fibonacci number - and so 50 times. It will be harder to cheat here than to write a similar program. Input and output to send through the files and compare the output file of the user with the standard (data in it). That's all.