首页> 外文期刊>Applied Sciences >Source Code Assessment and Classification Based on Estimated Error Probability Using Attentive LSTM Language Model and Its Application in Programming Education
【24h】

Source Code Assessment and Classification Based on Estimated Error Probability Using Attentive LSTM Language Model and Its Application in Programming Education

机译:基于估计误差概率的源代码评估和分类,基于估计的LSTM语言模型及其在编程教育中的应用

获取原文
       

摘要

The rate of software development has increased dramatically. Conventional compilers cannot assess and detect all source code errors. Software may thus contain errors, negatively affecting end-users. It is also difficult to assess and detect source code logic errors using traditional compilers, resulting in software that contains errors. A method that utilizes artificial intelligence for assessing and detecting errors and classifying source code as correct (error-free) or incorrect is thus required. Here, we propose a sequential language model that uses an attention-mechanism-based long short-term memory (LSTM) neural network to assess and classify source code based on the estimated error probability. The attentive mechanism enhances the accuracy of the proposed language model for error assessment and classification. We trained the proposed model using correct source code and then evaluated its performance. The experimental results show that the proposed model has logic and syntax error detection accuracies of 92.2% and 94.8%, respectively, outperforming state-of-the-art models. We also applied the proposed model to the classification of source code with logic and syntax errors. The average precision, recall, and F-measure values for such classification are much better than those of benchmark models. To strengthen the proposed model, we combined the attention mechanism with LSTM to enhance the results of error assessment and detection as well as source code classification. Finally, our proposed model can be effective in programming education and software engineering by improving code writing, debugging, error-correction, and reasoning.
机译:软件开发速度急剧增加。传统编译器无法评估和检测所有源代码错误。因此,软件可能包含错误,对最终用户产生负面影响。使用传统编译器也难以评估和检测源代码逻辑错误,从而产生包含错误的软件。因此,因此需要一种利用人工智能来评估和检测错误和分类源代码的方法,因此需要正确(无差错)或不正确。在这里,我们提出了一种顺序语言模型,该模型使用基于注意机制的长短期存储器(LSTM)神经网络来基于估计的误差概率来评估和分类源代码。细心机制提高了拟议语言模型的误差评估和分类的准确性。我们使用正确的源代码培训了所提出的模型,然后评估其性能。实验结果表明,拟议的模型具有92.2%和94.8%的逻辑和语法误差检测精度,优异的最先进的模型。我们还将提出的模型应用于逻辑和语法错误的源代码分类。这种分类的平均精度,召回和F测量值远比基准模型更好。为了加强拟议的模型,我们将注意机制与LSTM相结合,以增强误差评估和检测结果以及源代码分类。最后,我们提出的模型可以通过改进代码编写,调试,纠错和推理来有效地在编程教育和软件工程方面是有效的。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号