Abstract:Traditional program analysis methods, when dealing with large-scale software, often require explicit construction of dependency graphs (such as system dependency graphs and program dependency graphs). However, as the number of program entities and dependency relationships grows exponentially with the scale of software, these methods face performance bottlenecks of “graph construction difficulty” and redundant computation. To address this challenge, this study proposes a parallel program analysis framework based on on-demand slicing computation. The framework integrates symbolic slicing and higher-order function summary techniques, and its core ideas are as follows. (1) By abstracting the impact of function calls into reusable higher-order function summaries and replacing explicit dependency graph storage and traversal with dynamic function evaluation, the graph construction bottleneck is fundamentally avoided. (2) An on-demand instantiation mechanism for higher-order function summaries is designed, which dynamically and lazily instantiates summaries based on user-specified slicing criteria (e.g., key variables), computing only dependencies directly relevant to the analysis target, thereby significantly reducing computational redundancy. Through the independence of sub-analysis summaries and the lazy instantiation feature, this framework enables fine-grained task partitioning, demonstrating good parallelization potential. Experimental results show that the on-demand slicing computation under this framework reduces analysis time by 65.3% and peak memory usage by 68.2% compared to the symbolic slicing tool SymPas. Its parallel version (6 threads) further reduces analysis time by 93.8%, with parallel efficiency approaching 90%. To verify the practicality and effectiveness of the framework in large-scale program analysis, it is applied to out-of-bounds access defect detection, successfully identifying 132 true positive instances, providing a new formal solution for addressing performance bottlenecks in large-scale software analysis.