The control flow graph (CFG) representation of a procedure used by virtually all flow-sensitive program analyses, admits a large number of infeasible control flow paths i.e., these paths do not occur in any execution of the program. Hence the information reaching along infeasible paths in an analysis is spurious. This affects the precision of the conventional maximum fixed point (MFP) solution of the data flow analysis, because it includes the information reaching along all control flow paths. The existing approaches for removing this imprecision are either specific to a data flow problem with no straightforward generalization or involve control flow graph restructuring which may exponentially blow up the size of the CFG. We lift the notion of MFP solution to define the notion of feasible path MFP (FPMFP) solutions that exclude the data flowing along known infeasible paths. The notion of FPMFP is generic and does not involve CFG restructuring. Instead, it takes externally supplied information about infeasible paths and lifts any data flow analysis to an analysis that maintains the distinctions between different paths where these distinctions are beneficial, and ignores them where they are not. Thus it gets the benefit of a path-sensitive analysis where it is useful without performing a conventional path-sensitive analysis. We evaluated the proposed feasible path MFP solutions for reaching definitions analysis and potentially uninitialized variable analysis on 30 benchmarks. The evaluation results indicate that precision improvement in these two analyses respectively reduce the number def-use pairs by up to 13.6% (average 2.87%, geometric mean 1.75%), and reduce the potentially uninitialized variable alarms by up to 100% (average 18.5%, geo. mean 3%). We found that the FPMFP computation time was 2.9X of MFP computation time on average.
翻译:控制流程图(CFG) 代表了几乎所有对流敏感的程序分析所使用的程序。 控制流程图(CFG) 代表了几乎所有对流敏感的程序分析所使用的程序, 承认了大量不可行的控制流程路径, 也就是说, 这些路径不会在程序的任何执行中出现。 因此, 在一个分析中, 沿着不可行的路径传递信息是荒谬的。 这影响了数据流程分析中常规最高固定点(MFP) 解决方案的精确性, 因为它包括了所有控制流程路径上的信息。 消除这种不精确的现有方法要么是针对数据流程问题的, 没有直接的概括化, 或涉及控制流程图重组, 这可能使CFCG的大小发生巨大反弹。 我们提升了MFP解决方案的理念概念, 将MFP(FP) 的可行路径(FP) 的计算方法概念排除了已知的不可行的路径, 并且我们从外部提供的关于不可靠的路径的信息, 将任何数据流分析提升到不透明的路径上, 将不同路径上的区别化, 忽略了这些路径上的路径, 3 。 因此, 将分析会降低了它们的位置 。