arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1906.00307cs.SEcs.LGcs.NE
收藏

神经缺陷发现:机遇与挑战的研究

Neural Bug Finding: A Study of Opportunities and Challenges

TU Darmstadt(达姆施塔特工业大学)

Andrew Habib, Michael Pradel

摘要:

静态分析是在代码投入生产之前发现软件缺陷的最广泛采用的技术之一。设计和实现有效和高效的静态分析是困难的,需要很高的专业知识,这导致只有少数专家能够编写这样的分析。本文探讨了创建静态bug检测器的另一种方法的机遇和挑战:神经bug发现。其基本思想是将错误检测公式化为一个分类问题,并使用在错误和非错误代码示例上训练的神经网络来解决这个问题。我们系统地研究了这种方法的有效性的基础上标记的一个国家的最先进的,静态的错误检测器的代码示例。我们的研究结果表明,神经缺陷发现对某些缺陷模式非常有效,有时达到80%以上的精确度和召回率,但它也很难理解传统分析中明显的一些程序属性。对结果的定性分析提供了关于为什么神经bug查找器有时工作,有时不工作的见解。我们还确定了在选择用于训练和验证神经缺陷发现器的代码示例时的陷阱,并提出了一种用于选择有效训练数据的算法。

英文摘要:

Static analysis is one of the most widely adopted techniques to find software bugs before code is put in production. Designing and implementing effective and efficient static analyses is difficult and requires high expertise, which results in only a few experts able to write such analyses. This paper explores the opportunities and challenges of an alternative way of creating static bug detectors: neural bug finding. The basic idea is to formulate bug detection as a classification problem, and to address this problem with neural networks trained on examples of buggy and non-buggy code. We systematically study the effectiveness of this approach based on code examples labeled by a state-of-the-art, static bug detector. Our results show that neural bug finding is surprisingly effective for some bug patterns, sometimes reaching a precision and recall of over 80%, but also that it struggles to understand some program properties obvious to a traditional analysis. A qualitative analysis of the results provides insights into why neural bug finders sometimes work and sometimes do not work. We also identify pitfalls in selecting the code examples used to train and validate neural bug finders, and propose an algorithm for selecting effective training data.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑