Adaptive Static Analysis via Learning with Bayesian Optimization
Autor: | Kwangkeun Yi, Kihong Heo, Hongseok Yang, Hakjoo Oh |
---|---|
Rok vydání: | 2018 |
Předmět: |
021103 operations research
business.industry Computer science Bayesian optimization 0211 other engineering and technologies Parameterized complexity 020207 software engineering Static program analysis 02 engineering and technology Static analysis Machine learning computer.software_genre Task (project management) 0202 electrical engineering electronic engineering information engineering Key (cryptography) Artificial intelligence business Global optimization computer Software Codebase |
Zdroj: | ACM Transactions on Programming Languages and Systems. 40:1-37 |
ISSN: | 1558-4593 0164-0925 |
DOI: | 10.1145/3121135 |
Popis: | 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. |
Databáze: | OpenAIRE |
Externí odkaz: |