Introducing Code Adviser: A DFA-driven Electronic Programming Tutor
In this paper, we demonstrate a software system called Code Adviser that attempts to understand and find semantic bugs in student programs written in C++ programming language. To do this, Code Adviser has to take a model solution from a lecturer (or expert), generate many variations of the model solution, and compare student programs to the most similar model solution. The student’s program to be checked for correctness is normalized, granulated and abstracted to a string of semantic tokens — we call this the abstraction stage. Similarly, the model solutions are taken through the abstraction stage and the program strings representing all model solutions are abstracted to deterministic finite automaton (DFA) for the programming problem. Code Adviser then uses some algorithms to make inference on student’s program correctness. If the student’s program string is accepted by the problem’s DFA, it is reported as correct. Else, we make inferences on what the bug could be. Code Adviser is a promising proof of concept, and more work is currently being done to improve its inference and make it available to student programmers.