Deep NLP-Based Co-Evolvement for Synthesizing Code Analysis from Natural Language
Deep NLP-Based Co-Evolvement for Synthesizing Code Analysis from Natural Language
复制标题
基于深度 NLP 的协同进化,用于从自然语言综合代码分析
DOI:
10.1145/3446804.3446852
复制
发表时间:
2021
期刊:
影响因子:
--
通讯作者:
Liao, Chunhua
中科院分区:
文献类型:
--
作者:
Nan, Zifan;Guan, Hui;Shen, Xipeng;Liao, Chunhua
This paper presents Deepsy, a Natural Language-based synthesizer to assist source code analysis. It takes English descriptions of to-be-found code patterns as its inputs, and automatically produces ASTMatcher expressions that are directly usable by LLVM/Clang to materialize intended code analysis. The code analysis domain features profuse complexities in data types and operations, which make it elusive for prior rule-based synthesizers to tackle. On the other hand, machine learning-based solutions are neither applicable due to the scarcity of well labeled examples. This paper presents how Deepsy addresses the challenges by leveraging deep Natural Language Processing (NLP) and creating a new technique named dependency tree-based co-evolvement.Deepsy features an effective design that seamlessly integrates Natural Language dependency analysis into code analysis and meanwhile synergizes it with type-based narrowing and domain-specific guidance. Deepsy achieves over 70.0% expression-level accuracy and 85.1% individual API-level accuracy, significantly outperforming previous solutions.