SCG_FBS: A Code Grading Model for Students’ Program in Programming Education

2021 
With the development of computer science and technology, programming has become one of the college students’ essential abilities. The increasing number of students brings a big challenge to evaluating students’ programs. For saving human resources in checking code, most works attempt to design software to judge code automatically. However, these works focus on the best way to extract the semantic and syntax features of the correct programs, ignoring that judging for wrong programs is equally important to students. We design a grading model named SCG_FBS (Students’ Code Grading model, based on semantic Features analysis and Black-box testing, with a Select function) to extract semantic features of the code and evaluate codes based on the semantic features and black-box testing. We standardize the source code and translate it into a vector sequence by a pre-trained instruction embedding. Then we extract semantic features by a neural network with the attention method and concatenate semantic features with black-box testing results as the dependence for grading. Furthermore, we propose a select function to pick up significant sentences in each code, which can reduce the length of the input sequence and accelerate training. We gather two data sets from the OJ (Online Judge) platform, which is widely used in colleges to test students’ programs as a black-box. Our SCG_FBS model gets 87.92% accuracy on one data set and gets 84.28% accuracy on another. Meanwhile, our SCG_FBS model reduces 53.7% training time compared with baseline, significantly improving efficiency.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    7
    References
    0
    Citations
    NaN
    KQI
    []