Automating Program Structure Classification

被引:1
作者
Crichton, Will [1 ]
Sampaio, Georgia Gabriela [1 ]
Hanrahan, Pat [1 ]
机构
[1] Stanford Univ, Stanford, CA 94305 USA
来源
PROCEEDINGS OF THE 52ND ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, SIGCSE 2021 | 2021年
关键词
Program classification; machine learning; neural networks;
D O I
10.1145/3408877.3432358
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
When students write programs, their program structure provides insight into their learning process. However, analyzing program structure by hand is time-consuming, and teachers need better tools for computer-assisted exploration of student solutions. As a first step towards an education-oriented program analysis toolkit, we show how supervised machine learning methods can automatically classify student programs into a predetermined set of high-level structures. We evaluate two models on classifying student solutions to the Rainfall problem: a nearest-neighbors classifier using syntax tree edit distance and a recurrent neural network. We demonstrate that these models can achieve 91% classification accuracy when trained on 108 programs. We further explore the generality, tradeoffs, and failure cases of each model.
引用
收藏
页码:1177 / 1183
页数:7
相关论文
共 29 条
[1]  
Ahmed Umair Z., 2019, P 34 IEEE ACM INT C
[2]   Getafix: Learning to Fix Bugs Automatically [J].
Bader, Johannes ;
Scott, Andrew ;
Pradel, Michael ;
Chandra, Satish .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA)
[3]   Consciousness is not a property of states: A reply to Wilberg [J].
Berger, Jacob .
PHILOSOPHICAL PSYCHOLOGY, 2014, 27 (06) :829-842
[4]  
Bowyer Kevin W, 1999, FIE 99 FRONT ED 29 A, V3, p13B3
[5]  
Bui NDQ, 2019, 2019 IEEE 26TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER), P422, DOI [10.1109/saner.2019.8667995, 10.1109/SANER.2019.8667995]
[6]  
Cho K., 2014, P 8 WORKSH SYNT SEM, P103
[7]  
Fisler K., 2014, P 10 ANN C INT COMP, P35, DOI [10.1145/2632320.2632346, DOI 10.1145/2632320.2632346]
[8]   OverCode: Visualizing Variation in Student Solutions to Programming Problems at Scale [J].
Glassman, Elena L. ;
Scott, Jeremy ;
Singh, Rishabh ;
Guo, Philip J. ;
Miller, Robert C. .
ACM TRANSACTIONS ON COMPUTER-HUMAN INTERACTION, 2015, 22 (02)
[9]  
Gulwani Sumit, 2018, SIGPLAN Not
[10]  
Hochreiter S, 1997, NEURAL COMPUT, V9, P1735, DOI [10.1162/neco.1997.9.8.1735, 10.1162/neco.1997.9.1.1, 10.1007/978-3-642-24797-2]