International Journal of Information Technology and Applications, Vol. 1, No. 4, pp. 154-166, December 2024.
Abstract: The aim is to accelerate the compilation of programmers, reduce the error codes in the program, and accurately locate the semantic errors. The deep learning neural networks and Quantum Intelligence Algorithm (QIA) encode the information hidden in the code. Then, a localization-repairing model for semantic errors is constructed based on a deep quantum neural network. This model locates the code semantics through the deep neural attention mechanism and repairs the erroneous codes through QIA. Furthermore, the model's performance is tested and verified in Online Judge (OJ). Other algorithms are also tested for performance comparison. The effectiveness of the proposed localization-repairing model is proven. The results suggest that introducing the attention mechanism to neural networks can improve the model accuracy to 70.91%; meanwhile, introducing QIA can accelerate the convergence and increase the recognition rate of the model. Compared to traditional semantic localization models, the positioning accuracy of the proposed model is increased to 85.24%. Besides, its capability of semantic repairing is significantly improved compared to single algorithm models, and the proportion of program repairing is 89.27%. Tests on the system also prove the advantages of the proposed model in precise localization and excellent repairing. The above results can provide more ideas for the localization and repair of semantic errors in computer programs.