Multi-stage On-Demand Program Slicing for Modular Analysis of Multi-threaded Programs
Jiawei Yang, Xiao Cheng, Jiawei Wang, Xiapu Luo, Yulei Sui
Abstract
Precise analysis of multi-threaded programs requires combining flow-sensitive pointer analysis (FSPTA) with interleaving and lock analysis (ILA) to reason about cross-thread value flows under feasible concurrent executions. ILA computes may-happen-in-parallel (MHP) relations and lock-release spans to determine when shared accesses can occur concurrently. Unfortunately, these analyses are both expensive and tightly coupled: FSPTA needs ILA to rule out infeasible inter-thread def-use relations, while ILA needs alias information to identify interference-relevant interactions. As a result, whole-program analyses often spend most of their time on code that is irrelevant to the client query. We present MSli, an on-demand slicing framework for modular analysis of multi-threaded programs. It extracts compact, query-relevant program slices while preserving the answers of downstream analyses. Unlike single-pass slicing over a unified dependence graph, MSli performs multi-stage slicing with analysis-specific criteria. Concretely, a lightweight pre-analysis establishes an overapproximation of inter-thread value flows and performs ILA slicing source extraction to identify the MHP and lock-span queries required later for ILA slicing. The refined main-phase ILA results then enable reconstruction of a thread-aware value-flow graph to guide FSPTA slicing, supporting modular analysis and downstream clients. We implement MSli in SVF and evaluate it on ten large real-world projects with data race detection as a representative client. Compared with the unsliced baseline (FSAM), MSli reduces the analyzed ICFG to 5.4% (ILA) and 25.7% (FSPTA), reduces ILA/FSPTA runtimes to 4.7%/18.3%, and cuts total analysis time to 20.8% on average, while producing identical query outcomes and race alarms.
CCS Concepts: • Software and its engineering → Automated static analysis; Multithreading; • Theory of computation → Program analysis.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f8870490-80e6-4da0-b946-35d70b3fa272Builds on11
- Canary: practical static detection of inter-thread value-flow bugsYuandao Cai, Peisen Yao, Charles ZhangPLDI 2021 · 25 citations
- OMPRacer: a scalable and precise static race detector for OpenMP programsBradley Swain, Yanze Li, Peiming Liu, Ignacio Laguna et al.SC 2020 · 22 citations
- Peahen: fast and precise static deadlock detection via context reductionYuandao Cai, Chengfeng Ye, Qingkai Shi, Charles ZhangFSE 2022 · 16 citations
- A Learning-Based Approach to Static Program SlicingAashish Yadavally, Yi Li, Shaohua Wang, Tien N. NguyenOOPSLA 2024 · 15 citations
- Accelerating JavaScript static analysis via dynamic shortcutsJoonyoung Park, Jihyeok Park, Dongjun Youn, Sukyoung RyuFSE 2021 · 15 citations
Related papers
- Accurate Static Data Race Detection for CEmerson Sales, Omar Inverso, Emilio TuostoFM 2024 · 1 citation
- Falcon: A Fused Approach to Path-Sensitive Sparse Data Dependence AnalysisPeisen Yao, Jinguo Zhou, Xiao Xiao, Qingkai Shi et al.PLDI 2024 · 11 citations
- Exploiting the Sparseness of Control-Flow and Call Graphs for Efficient and On-Demand Algebraic Program AnalysisGiovanna Kobus Conrado, Amir Kafshdar Goharshady, Kerim Kochekov, Yun Chen Tsai et al.OOPSLA 2023 · 12 citations
- SPONGE: Adaptive Boundary-Anchored Indexing for Online Value-Flow QueriesSixiang Peng, Chenyang Sun, Wei Chen, Bowen Zhang et al.OOPSLA 2026
- Conquering the extensional scalability problem for value-flow analysis frameworksQingkai Shi, Rongxin Wu, Gang Fan, Charles ZhangICSE 2020 · 15 citations
