Learning a Strategy for Choosing Widening Thresholds from a Large Codebase

In numerical static analysis, the technique of widening thresholds is essential for improving the analysis precision, but blind uses of the technique often significantly slow down the analysis. Ideally, an analysis should apply the technique only when it benefits, by carefully choosing thresholds that contribute to the final precision. However, finding the proper widening thresholds is nontrivial and existing syntactic heuristics often produce suboptimal results. In this paper, we present a method that automatically learns a good strategy for choosing widening thresholds from a given codebase. A notable feature of our method is that a good strategy can be learned with analyzing each program in the codebase only once, which allows to use a large codebase as training data. We evaluated our technique with a static analyzer for full C and 100 open-source benchmarks. The experimental results show that the learned widening strategy is highly cost-effective; it achieves 84 % of the full precision while increasing the baseline analysis cost only by \(1.4{\times }\). Our learning algorithm is able to achieve this performance 26 times faster than the previous Bayesian optimization approach.

[1]  Yassamine Seladji,et al.  Acceleration of the abstract fixpoint computation in numerical program analysis , 2012, J. Symb. Comput..

[2]  Alexander Aiken,et al.  Verification as Learning Geometric Concepts , 2013, SAS.

[3]  Nicolas Halbwachs,et al.  Verification of Real-Time Systems using Linear Relation Analysis , 1997, Formal Methods Syst. Des..

[4]  Patrick Cousot,et al.  Design and Implementation of a Special-Purpose Static Program Analyzer for Safety-Critical Real-Time Embedded Software , 2002, The Essence of Computation.

[5]  Hongseok Yang,et al.  Selective context-sensitivity guided by impact pre-analysis , 2014, PLDI.

[6]  Alexander Aiken,et al.  Interpolants as Classifiers , 2012, CAV.

[7]  Patrick Cousot,et al.  Why does Astrée scale up? , 2009, Formal Methods Syst. Des..

[8]  Hongseok Yang,et al.  Selective X-Sensitive Analysis Guided by Impact Pre-Analysis , 2015, ACM Trans. Program. Lang. Syst..

[9]  Patrick Cousot,et al.  Combination of Abstractions in the ASTRÉE Static Analyzer , 2006, ASIAN.

[10]  Hongseok Yang,et al.  Learning a strategy for adapting a program analysis via bayesian optimisation , 2015, OOPSLA.

[11]  Hongseok Yang,et al.  Abstractions from tests , 2012, POPL '12.

[12]  Alexander Aiken,et al.  A Data Driven Approach for Algebraic Loop Invariants , 2013, ESOP.

[13]  Axel Simon,et al.  Widening as Abstract Domain , 2013, NASA Formal Methods.

[14]  Radu Grigore,et al.  Abstraction refinement guided by a learnt probabilistic model , 2015, POPL.

[15]  Hakjoo Oh,et al.  Widening with thresholds via binary search , 2016, Softw. Pract. Exp..

[16]  Bertrand Jeannet,et al.  Widening with Thresholds for Programs with Complex Control Graphs , 2011, ATVA.

[17]  Christopher K. I. Williams,et al.  Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning) , 2005 .