Skip to main content

programslicer

Stars13
Forks0
UpdatedApril 28, 2026 at 10:17

基于切片准则(目标语句关键词 + 关注变量),对方法的源码做后向静态切片, 提取所有可能影响该变量在目标语句处取值的相关语句。 算法:文本近似 PDG 遍历,包含数据依赖(def-use 链)和控制依赖(if/while/for 分支)。 将 LLM 需要分析的上下文从数百行压缩到 5-15 条语句,大幅降低推理噪声, 精确回答"哪个变量构造了这条 SQL"或"这个阻塞调用是否总会被执行"等因果问题。 【前置依赖】必须在同一 Agent 会话中先调用 SootStaticAnalyzer,再调用 CallChainExpander 定位可疑方法后,才调用本工具。本工具依赖 SootStaticAnalyzer 写入内存的索引(get_index()), 若索引未初始化将直接返回错误。

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
4 files
SKILL.md
readonly