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
期刊:
Compiler Construction
影响因子:
--
通讯作者:
Liao, Chunhua
Liao, Chunhua
中科院分区:
--
文献类型:
--
作者:
Nan, Zifan;Guan, Hui;Shen, Xipeng;Liao, Chunhua

文献摘要

相似文献

本文介绍了Deepsy,一个基于自然语言的合成器,以协助源代码分析。它以待发现的代码模式的英文描述作为输入,并自动生成可直接由LLVM/Clang使用的ASTMatcher表达式,以实现预期的代码分析。代码分析领域在数据类型和操作方面具有丰富的复杂性,这使得先前基于规则的合成器难以处理。另一方面,基于机器学习的解决方案由于缺乏标记良好的示例而不适用。本文介绍了Deepsy如何通过利用深度自然语言处理(NLP)和创建一种名为基于依赖树的协同进化的新技术来解决这些挑战。Deepsy具有一种有效的设计,将自然语言依赖分析无缝集成到代码分析中,同时将其与基于类型的收缩和特定于域的指导相协同。Deepy实现了超过70.0%的表达水平准确率和85.1%的单个API水平准确率,显著优于以前的解决方案。
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.