一句话:提出基于采样的结构感知统计可达性分析方法,以概率估计目标状态可达性,在精度、效率和规模上优于传统概率可达性分析工具。
给定目标程序状态 s,定量可达性分析要回答输入以多大概率到达 s。传统方法将其转化为形式约束的模型计数问题(概率可达性分析),但在较大程序上现有工具难以扩展。本文探索统计方法估计可达概率:只要程序可执行,程序规模与组成影响不大。针对现有估计器未利用程序结构的问题,作者提出结构感知估计器,在相同样本数下降低估计误差。在已有和新基准程序上的实证评估表明,统计可达性分析在精度、效率和可扩展性上优于当前最佳概率可达性分析工具,结构感知估计器也优于不利用程序结构的黑盒估计器;同时识别出限制现有概率分析技术适用性的若干程序性质。
Given a target program state (or statement) s, what is the probability that an input reaches s? This is the quantitative reachability analysis problem. For instance, quantitative reachability analysis can be used to approximate the reliability of a program (where s is a bad state). Traditionally, quantitative reachability analysis is solved as a model counting problem for a formal constraint that represents the (approximate) reachability of s along paths in the program, i.e., probabilistic reachability analysis. However, in preliminary experiments, we failed to run state-of-the-art probabilistic reachability analysis on reasonably large programs. In this paper, we explore statistical methods to estimate reachability probability. An advantage of statistical reasoning is that the size and composition of the program are insubstantial as long as the program can be executed. We are particularly interested in the error compared to the state-of-the-art probabilistic reachability analysis. We realize that existing estimators do not exploit the inherent structure of the program and develop structure-aware estimators to further reduce the estimation error given the same number of samples. Our empirical evaluation on previous and new benchmark programs shows that (i) our statistical reachability analysis outperforms state-of-the-art probabilistic reachability analysis tools in terms of accuracy, efficiency, and scalability, and (ii) our structure-aware estimators further outperform (blackbox) estimators that do not exploit the inherent program structure. We also identify multiple program properties that limit the applicability of the existing probabilistic analysis techniques.