arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1611.01752cs.PLcs.LG
收藏

从数据中学习静态分析器

Learning a Static Analyzer from Data

ETH Zürich(苏黎世联邦理工学院)

Pavol Bielik, Veselin Raychev, Martin Vechev

摘要:

为了实用,现代静态分析器必须精确地模拟程序设计语言中的语句以及被分析的程序所使用的框架两者的效果。虽然重要,但手动解决这些挑战是困难的,原因至少有两个:(i)对整体分析的影响可能是重要的,以及(ii)随着现代库的大小和复杂性的增加,分析必须处理的案例数量也会增加。在本文中,我们提出了一种新的,自动化的方法来创建静态分析器:而不是手动提供的分析器的各种推理规则,关键的想法是从程序的数据集学习这些规则。我们的方法由两个成分组成:(i)能够从给定数据集中学习候选分析器的合成算法,以及(ii)反例指导学习过程,该过程生成超出初始数据集中的新程序,对于发现角落案例并确保学习的分析推广到看不见的程序至关重要。我们实现并实例化了学习JavaScript静态分析规则的任务方法,这些规则用于指向分析的子集和分配站点分析。这些都是具有挑战性的,但重要的问题,已收到显着的研究关注。我们证明了我们的方法是有效的:我们的系统自动发现了许多情况下的实用和有用的推理规则,这些情况很难手动识别,并且被最先进的手动调整的分析仪所遗漏。

英文摘要:

To be practically useful, modern static analyzers must precisely model the effect of both, statements in the programming language as well as frameworks used by the program under analysis. While important, manually addressing these challenges is difficult for at least two reasons: (i) the effects on the overall analysis can be non-trivial, and (ii) as the size and complexity of modern libraries increase, so is the number of cases the analysis must handle. In this paper we present a new, automated approach for creating static analyzers: instead of manually providing the various inference rules of the analyzer, the key idea is to learn these rules from a dataset of programs. Our method consists of two ingredients: (i) a synthesis algorithm capable of learning a candidate analyzer from a given dataset, and (ii) a counter-example guided learning procedure which generates new programs beyond those in the initial dataset, critical for discovering corner cases and ensuring the learned analysis generalizes to unseen programs. We implemented and instantiated our approach to the task of learning JavaScript static analysis rules for a subset of points-to analysis and for allocation sites analysis. These are challenging yet important problems that have received significant research attention. We show that our approach is effective: our system automatically discovered practical and useful inference rules for many cases that are tricky to manually identify and are missed by state-of-the-art, manually tuned analyzers.

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

↑