[Paper Review] SymPas: Symbolic Program Slicing
SymPas introduces a lightweight, symbolic approach to static program slicing that operates on LLVM's intermediate representation (IR) using symbolic execution to generate parameterized slices. By avoiding repeated re-analysis of procedures, SymPas achieves a 6x speedup and 4x space reduction over SDG-IFDS, demonstrating high scalability on large programs up to 336,800 IR instructions.
Program slicing is a technique for simplifying programs by focusing on selected aspects of their behaviour. Current mainstream static slicing methods operate on the PDG (program dependence graph) or SDG (system dependence graph), but these friendly graph representations may be expensive and error-prone for some users. We attempt in this paper to study a light-weight approach of static program slicing, called Symbolic Program Slicing (SymPas), which works as a dataflow analysis on LLVM (Low-Level Virtual Machine). In our SymPas approach, slices are stored symbolically rather than procedure being re-analysed (cf. procedure summaries). Instead of re-analysing a procedure multiple times to find its slices for each callling context, SymPas calculates a single symbolic (or parameterized) slice which can be instantiated at call sites avoiding re-analysis; it is implemented in LLVM to perform slicing on its intermediate representation (IR). For comparison, we systematically adapt IFDS (Interprocedural Finite Distributive Subset) analysis and the SDG-based slicing method (SDG-IFDS) to statically IR slice programs. Evaluated on open-source and benchmark programs, our backward SymPas shows a factor-of-6 reduction in time cost and a factor-of-4 reduction in space cost, compared to backward SDG-IFDS, thus being more efficient. In addition, the result shows that after studying slices from 66 programs, ranging up to 336,800 IR instructions in size, SymPas is highly size-scalable.
Motivation & Objective
- To address the performance and scalability limitations of traditional static slicing methods based on PDG or SDG representations.
- To develop a lightweight, efficient alternative to existing slicing techniques that avoids repeated procedure re-analysis.
- To enable scalable slicing for large programs by symbolically encoding slices rather than computing them per call site.
- To evaluate the performance and size scalability of symbolic slicing in practice using real-world and benchmark programs.
Proposed method
- SymPas performs dataflow analysis on LLVM’s intermediate representation (IR) to compute symbolic slices.
- It represents slices symbolically using parameters for calling contexts, eliminating the need for repeated re-analysis of procedures.
- The method leverages IFDS (Interprocedural Finite Distributive Subset) analysis principles to propagate symbolic dependencies across program points.
- Slices are instantiated at call sites using symbolic parameters, enabling efficient on-demand slicing without recomputation.
- The approach is implemented as an extension to the LLVM compiler infrastructure to support IR-level slicing.
- It compares performance against SDG-IFDS, a standard SDG-based slicing method, using backward slicing on real-world and benchmark programs.
Experimental results
Research questions
- RQ1Can symbolic program slicing reduce the time and space overhead of traditional slicing techniques?
- RQ2How does SymPas perform in comparison to SDG-IFDS in terms of execution time and memory usage?
- RQ3To what extent is SymPas scalable for large programs with up to 336,800 IR instructions?
- RQ4Can symbolic slicing avoid repeated re-analysis of procedures while maintaining correctness and precision?
- RQ5What is the practical performance gain of using symbolic parameterization in slicing across diverse program workloads?
Key findings
- SymPas achieves a 6-fold reduction in time cost compared to backward SDG-IFDS slicing.
- It reduces memory usage by a factor of 4 compared to backward SDG-IFDS.
- The method scales effectively to large programs, successfully analyzing programs with up to 336,800 IR instructions.
- The symbolic representation enables efficient slice instantiation at call sites without re-analyzing procedures.
- Evaluation on 66 real-world programs confirms the practical efficiency and robustness of SymPas.
- SymPas outperforms SDG-IFDS in both time and space efficiency while maintaining correctness through symbolic dependency tracking.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.