SLICEMATE: Accurate and Scalable Static Program Slicing via LLM-Powered Agents

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Chang, Jianming, Shi, Jieke, Lyu, Yunbo, Zhou, Xin, Wang, Lulu, Yang, Zhou, Li, Bixin, Lo, David
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913959668350976
author Chang, Jianming
Shi, Jieke
Lyu, Yunbo
Zhou, Xin
Wang, Lulu
Yang, Zhou
Li, Bixin
Lo, David
author_facet Chang, Jianming
Shi, Jieke
Lyu, Yunbo
Zhou, Xin
Wang, Lulu
Yang, Zhou
Li, Bixin
Lo, David
contents Static program slicing, which extracts the executable portions of a program that affect the values at a specific location, supports many software analysis tasks such as debugging and security auditing. However, traditional slicing tools rely on computationally expensive reachability analysis over dependency graphs, which struggle to scale to large programs and often fail to handle code with incomplete syntax. Recently emerged learning-based methods, while more robust to such cases, still fall short of achieving comparable performance to traditional methods on well-formed code. In this work, we propose SliceMate, a novel static program slicing solution powered by Large Language Model (LLM) agents. It bypasses the need for explicit dependency graph construction and achieving superior slicing accuracy. Concretely, SliceMate integrates three specialized agents: (1) a synthesis agent that produces candidate slices by incrementally expanding the scan scope across functions and files guided by LLM-inferred dependencies; (2) a verification agent that performs conciseness and completeness checks of the candidate slices, detecting missing or irrelevant statements; and (3) a refinement agent that repairs the slices with minimal edits in accordance with the verification results. These agents are orchestrated by a control module that ensures timely convergence and outputs high-quality slices without manual intervention. For rigorous evaluation, we construct a new and high-quality benchmark, SliceBench, comprising 2,200 manually annotated Java and Python programs, with program lengths ranging from 5 to 8,577 lines, significantly larger than those in existing slicing benchmarks. Experimental results show that SliceMate greatly outperforms both traditional and learning-based slicing tools.
format Preprint
id arxiv_https___arxiv_org_abs_2507_18957
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SLICEMATE: Accurate and Scalable Static Program Slicing via LLM-Powered Agents
Chang, Jianming
Shi, Jieke
Lyu, Yunbo
Zhou, Xin
Wang, Lulu
Yang, Zhou
Li, Bixin
Lo, David
Software Engineering
Static program slicing, which extracts the executable portions of a program that affect the values at a specific location, supports many software analysis tasks such as debugging and security auditing. However, traditional slicing tools rely on computationally expensive reachability analysis over dependency graphs, which struggle to scale to large programs and often fail to handle code with incomplete syntax. Recently emerged learning-based methods, while more robust to such cases, still fall short of achieving comparable performance to traditional methods on well-formed code. In this work, we propose SliceMate, a novel static program slicing solution powered by Large Language Model (LLM) agents. It bypasses the need for explicit dependency graph construction and achieving superior slicing accuracy. Concretely, SliceMate integrates three specialized agents: (1) a synthesis agent that produces candidate slices by incrementally expanding the scan scope across functions and files guided by LLM-inferred dependencies; (2) a verification agent that performs conciseness and completeness checks of the candidate slices, detecting missing or irrelevant statements; and (3) a refinement agent that repairs the slices with minimal edits in accordance with the verification results. These agents are orchestrated by a control module that ensures timely convergence and outputs high-quality slices without manual intervention. For rigorous evaluation, we construct a new and high-quality benchmark, SliceBench, comprising 2,200 manually annotated Java and Python programs, with program lengths ranging from 5 to 8,577 lines, significantly larger than those in existing slicing benchmarks. Experimental results show that SliceMate greatly outperforms both traditional and learning-based slicing tools.
title SLICEMATE: Accurate and Scalable Static Program Slicing via LLM-Powered Agents
topic Software Engineering
url https://arxiv.org/abs/2507.18957