谷歌浏览器插件
订阅小程序
在清言上使用

Code Semantic Detection

2021 Asian Conference on Innovation in Technology (ASIANCON)(2021)

引用 2|浏览3
暂无评分
摘要
Code semantics play a crucial part in code classification, code summarization, code search, and code optimization. This tool has been developed to classify programs based on the high-level logic of the programs. The developed solution uses the idea of supervised learning classification for a set of a labeled dataset of code snippets. The code is vectorized using two novel techniques based on dynamic and static analysis. The former uses a new technique to generate a code vector by approximating the given function using a neural network. The weights of the neural network being the heart of the neural network are used to generate the final vector, which represents the code/function snippet. The latter, i.e. Static Analysis uses the structural information of code to generate the representation. Our two new techniques perform better than the state-of-the-art systems code2vec and neural code comprehension. The obtained accuracies for dynamic and static analysis-based techniques are 98% and 80% respectively. The dynamic model decides the semantics only on the basis of input and output of the programs, hence it can be easily extended to support multiple languages. The dynamic model has been implemented for C++ programs and gives an accuracy of 99% highlighting the easily extendible and language-agnostic feature.
更多
查看译文
关键词
Code Semantics,Universal Approximation Theorem,Neural Network,Abstract Syntax Tree,Byte Code
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要