Semantic similarity based evaluation for C programs through the use of symbolic execution

Automatic grading of programs has existed in various fields for many years ago. Within this paper, we propose a method for evaluating C programs. Two approaches are distinguished in this context: static and dynamic analysis methods. Unlike the dynamic analysis that requires an executable program to be evaluated, static analysis could evaluate a program even if it is not totally correct. The proposed method is based on static analysis of programs. It consists of comparing the evaluated program with the evaluator-provided program through their Control Flow Graphs. Here, the great challenge is to deal with the multiplicity of solutions that exists for the same programming problem. As a solution to this weakness, we propose an innovative similarity measure that compares two programs according to their semantic executions. In fact, the evaluated program is compared to the evaluator-provided program called model program by using the symbolic execution technique. The experimentations presented in this work are performed by using a basic implementation of the proposed method. The obtained results reveal a promising realization in the field of automated evaluation of programs. They also show that the proposed method guarantees a considerable approximation to the human program evaluation.