Execution path reasoning is a key step towards program semantics understanding. It is crucial for generating test cases that cover certain branches/paths, or detecting bugs that are triggered by some paths without actually executing the program. Traditionally, execution path reasoning can be achieved by symbolic execution techniques, but existing SMT-based symbolic execution approaches struggle with complex data structures and external API calls. This challenge is even more pronounced in languages with highly flexible syntax, such as Python, resulting in a lack of widely adopted tools for reasoning on execution paths. Therefore, reasoning execution paths with AI-based approaches become a promising direction. In this paper, we investigate the feasibility of adopting large language models (LLMs) for execution path reasoning on Python, where traditional path-based symbolic execution tools are unavailable. We conduct an empirical study on two types of path reasoning tasks: generation tasks for test case generation and classification tasks for bug detection. We build new evaluation pipelines and benchmarks from both competition-level programs and real-world repositories. Our results show that state-of-the-art LLMs can perform correct reasoning on execution paths and improve test coverage on real-world software, though models with stronger reasoning abilities do not always outperform weaker ones. These findings highlight the potential of utilizing LLMs as a complementary heuristic for path-aware code reasoning, especially in program languages lacking mature symbolic execution tools. We have released our benchmark and evaluation scripts at https://github.com/jacobwwh/llm-path-study.


翻译:暂无翻译

0
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
大语言模型在规划与调度问题上的应用
专知会员服务
53+阅读 · 2025年1月12日
简明扼要!Python教程手册,206页pdf
专知会员服务
48+阅读 · 2020年3月24日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Python机器学习课程(代码与教程)
专知
37+阅读 · 2019年5月13日
综述:Image Caption 任务之语句多样性
PaperWeekly
22+阅读 · 2018年11月30日
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
图论应用 | Python进行图计算和图论理论及其应用
沈浩老师
10+阅读 · 2018年10月5日
论文浅尝 | 用可微的逻辑规则学习完成知识库推理
开放知识图谱
14+阅读 · 2018年7月5日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月16日
Arxiv
34+阅读 · 2022年12月20日
VIP会员
最新内容
重新思考无人机时代的生存能力
专知会员服务
3+阅读 · 今天7:44
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
3+阅读 · 今天7:28
在人工智能加速决策环境中拓展OODA循环
专知会员服务
4+阅读 · 今天7:18
军事欺骗:供作战战术指挥官使用的工具
专知会员服务
4+阅读 · 今天7:03
综述 | 世界动作模型:少做梦,多行动
专知会员服务
5+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
10+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
5+阅读 · 6月23日
相关VIP内容
大语言模型在规划与调度问题上的应用
专知会员服务
53+阅读 · 2025年1月12日
简明扼要!Python教程手册,206页pdf
专知会员服务
48+阅读 · 2020年3月24日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员