arrow
返回

Identifying algorithm in program code based on structural features using CNN classification model

delete2022-09-23
delete17
delete
OA
AI
Y
Yutaka Watanobe
M
Md. Mostafizer Rahman *
M
Md Faizul Ibne Amin
R
Raihan Kabir
DOI:10.1007/s10489-022-04078-ydelete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
In software, an algorithm is a well-organized sequence of actions that provides the optimal way to complete a task. Algorithmic thinking is also essential to break-down a problem and conceptualize solutions in some steps. The proper selection of an algorithm is pivotal to improve computational performance and software productivity as well as to programming learning. That is, determining a suitable algorithm from a given code is widely relevant in software engineering and programming education. However, both humans and machines find it difficult to identify algorithms from code without any meta-information. This study aims to propose a program code classification model that uses a convolutional neural network (CNN) to classify codes based on the algorithm. First, program codes are transformed into a sequence of structural features (SFs). Second, SFs are transformed into a one-hot binary matrix using several procedures. Third, different structures and hyperparameters of the CNN model are fine-tuned to identify the best model for the code classification task. To do so, 61,614 real-world program codes of different types of algorithms collected from an online judge system are used to train, validate, and evaluate the model. Finally, the experimental results show that the proposed model can identify algorithms and classify program codes with a high percentage of accuracy. The average precision, recall, and F-measure scores of the best CNN model are 95.65%, 95.85%, and 95.70%, respectively, indicating that it outperforms other baseline models.
Keyword:
Program code classification
Structural features
Algorithm identification
Program code
Programming education
Software engineering
Convolutional neural network

期刊

Applied Intelligence 封面图
Applied Intelligence
IF:
3.5
论文数:
7.6K
被引数:
1.7W

机构

U
University of Aizu
学者数:
768
论文数: 1.0K
被引数: 302
引用论文

引用论文

Neural representation of goal direction in the monarch butterfly brain
err
IF0
err2022-10-18
err0
errOAAI
errM. Jerome Beetz; Christian Kraus; Basil el Jundi
err分享
err收藏
Testing and validating machine learning classifiers by metamorphic testing通过变形测试测试和验证机器学习分类器
err2011-04-01
err251
errOAAI
errXie, Xiaoyuan; Ho, Joshua W. K.; Murphy, Christian; Kaiser, Gail; Xu, Baowen; Chen, Tsong Yueh
err分享
err收藏
Curriculum, Teaching and Learning, and Assessments for Introductory Programming Course
err2020-01-01
err20
errOAAI
errMehmood, Erum; Abid, Adnan; Farooq, Muhammad Shoaib; Nawaz, Naeem A.
err分享
err收藏
SoCodeCNN: Program Source Code for Visual CNN Classification Using Computer Vision Methodology
err2019-01-01
err14
errOAAI
errDey, Somdip; Singh, Amit Kumar; Prasad, Dilip Kumar; Mcdonald-Maier, Klaus Dieter
err分享
err收藏
学者 查看更多内容