当前位置: X-MOL 学术ACM Trans. Program. Lang. Syst. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Adaptive Static Analysis via Learning with Bayesian Optimization
ACM Transactions on Programming Languages and Systems ( IF 1.5 ) Pub Date : 2018-11-16 , DOI: 10.1145/3121135
Kihong Heo 1 , Hakjoo Oh 2 , Hongseok Yang 3 , Kwangkeun Yi 1
Affiliation  

Building a cost-effective static analyzer for real-world programs is still regarded an art. One key contributor to this grim reputation is the difficulty in balancing the cost and the precision of an analyzer. An ideal analyzer should be adaptive to a given analysis task and avoid using techniques that unnecessarily improve precision and increase analysis cost. However, achieving this ideal is highly nontrivial, and it requires a large amount of engineering efforts. In this article, we present a new learning-based approach for adaptive static analysis. In our approach, the analysis includes a sophisticated parameterized strategy that decides, for each part of a given program, whether to apply a precision-improving technique to that part or not. We present a method for learning a good parameter for such a strategy from an existing codebase via Bayesian optimization. The learnt strategy is then used for new, unseen programs. Using our approach, we developed partially flow- and context-sensitive variants of a realistic C static analyzer. The experimental results demonstrate that using Bayesian optimization is crucial for learning from an existing codebase. Also, they show that among all program queries that require flow- or context-sensitivity, our partially flow- and context-sensitive analysis answers 75% of them, while increasing the analysis cost only by 3.3× of the baseline flow- and context-insensitive analysis, rather than 40× or more of the fully sensitive version.

中文翻译:

通过贝叶斯优化学习的自适应静态分析

为实际程序构建具有成本效益的静态分析器仍然被认为是一门艺术。造成这种严峻声誉的一个关键因素是难以平衡分析仪的成本和精度。理想的分析仪应该适应给定的分析任务,避免使用不必要地提高精度和增加分析成本的技术。然而,实现这一理想并非易事,并且需要大量的工程努力。在本文中,我们提出了一种新的基于学习的自适应静态分析方法。在我们的方法中,分析包括一个复杂的参数化策略,该策略针对给定程序的每个部分决定是否对该部分应用精度改进技术。我们提出了一种通过贝叶斯优化从现有代码库中为这种策略学习良好参数的方法。然后将学习到的策略用于新的、看不见的程序。使用我们的方法,我们开发了一个真实的 C 静态分析器的部分流和上下文敏感的变体。实验结果表明,使用贝叶斯优化对于从现有代码库中学习至关重要。此外,他们还表明,在所有需要流或上下文敏感的程序查询中,我们的部分流和上下文敏感分析回答了其中的 75%,而分析成本仅增加了基线流和上下文的 3.3 倍不敏感分析,而不是完全敏感版本的 40 倍或更多。我们开发了一个真实的 C 静态分析器的部分流和上下文敏感的变体。实验结果表明,使用贝叶斯优化对于从现有代码库中学习至关重要。此外,他们还表明,在所有需要流或上下文敏感的程序查询中,我们的部分流和上下文敏感分析回答了其中的 75%,而分析成本仅增加了基线流和上下文的 3.3 倍不敏感分析,而不是完全敏感版本的 40 倍或更多。我们开发了一个真实的 C 静态分析器的部分流和上下文敏感的变体。实验结果表明,使用贝叶斯优化对于从现有代码库中学习至关重要。此外,他们还表明,在所有需要流或上下文敏感的程序查询中,我们的部分流和上下文敏感分析回答了其中的 75%,而分析成本仅增加了基线流和上下文的 3.3 倍不敏感分析,而不是完全敏感版本的 40 倍或更多。
更新日期:2018-11-16
down
wechat
bug