2024 6th International Conference on Control Systems, Mathematical Modeling, Automation and Energy Efficiency (SUMMA)(2024)
Institute for Information Technologies MIREA - Russian Technological University
被引用0|浏览1
摘要
Predictive compilation and intelligent source code analysis tasks necessitate the development of practical source code embeddings that preserve the contextual and semantic information of the code, allowing to achieve high quality of predictions made by machine learning algorithms. In this research we propose a novel source code embedding based on a Markov chain model which is constructed for a control flow graph (CFG). The code embedding is assessed on 2 classification problems: a problem of heterogeneous mapping of OpenCL programs to either CPU or GPU; and a problem of determining the type of the task implemented in by a given Python program solving unique programming exercise in a massive open online course. The results show that CFG-based Markov chains can improve the quality of classification results when compared to abstract syntax tree (AST)-based Markov chains, histogram-based embeddings and embeddings that are based on complex neural networks. In addition., we show that the use of term frequency-inverse document frequency (TF-IDF) model does not improve the quality of classification results when compared to simple histograms of AST node types or opcodes.