计算机应用与软件2026,Vol.43Issue(9):31-38,67,9.DOI:10.3969/j.issn.1000-386x.2026.09.005
基于提示工程的静态调用图剪枝方法
PCGPRUNER:PROMPTING-BASED STATIC CALL GRAPH PRUNING
罗蓉 1王翀 1娄一翎 1赵文耘1
作者信息
- 1. 复旦大学计算机科学技术学院 上海 200438||复旦大学上海市数据科学重点实验室 上海 200438
- 折叠
摘要
Abstract
Existing pruning methods face challenges such as low quality of model datasets,high training costs,insufficient understanding of code semantics,and difficulty in handling tasks with long chains of reasoning.To address these issues,we propose a static call graph pruning method called PCGPruner based on prompt engineering.PCGPruner utilized prompts to guide large language models in conjunction with code structure information and semantic details to perform call relationship inference tasks.Experimental results demonstrate that PCGPruner performs exceptionally well in static call graph pruning tasks,with an F1-score of 0.87,which is 30.0%higher than the baseline,and PCGPruner can effectively improve the quality of call graphs.关键词
提示工程/调用图/大语言模型/思维链/上下文学习Key words
Prompting/Call graph/Large language model/Chain of thought/In-context learning分类
信息技术与安全科学引用本文复制引用
罗蓉,王翀,娄一翎,赵文耘..基于提示工程的静态调用图剪枝方法[J].计算机应用与软件,2026,43(9):31-38,67,9.