Automatic program repair seeks to generate correct code from buggy programs, with most approaches searching the correct program in a discrete, symbolic space of source code tokens. This symbolic search is fundamentally limited by its inability to directly reason about program behavior. We introduce Gradient-Based Program Repair (GBPR), a new approach that recasts program repair as continuous optimization in a differentiable numerical program space. Our core insight is to compile symbolic programs into differentiable numerical representations, enabling search in the numerical program space directly guided by program behavior. To evaluate GBPR, we present RaspBugs, a new benchmark of 1,466 buggy symbolic RASP programs and their respective numerical representations. Our experiments demonstrate that GBPR can effectively repair buggy symbolic programs by gradient-based optimization in the numerical program space, with convincing repair trajectories. To our knowledge, we are the first to state program repair as continuous optimization in a numerical program space. Our work demonstrates the feasibility of this direction for program repair research, bridging continuous optimization and program behavior.


翻译:自动程序修复旨在从有缺陷的程序中生成正确的代码,大多数方法在源代码标记的离散符号空间中搜索正确的程序。这种符号搜索因其无法直接推理程序行为而存在根本性限制。我们提出了基于梯度的程序修复(Gradient-Based Program Repair,GBPR),这是一种将程序修复重构为可微数值程序空间中的连续优化的新方法。我们的核心见解是将符号程序编译为可微数值表示,从而能够在由程序行为直接引导的数值程序空间中进行搜索。为评估GBPR,我们提出了RaspBugs,这是一个包含1,466个有缺陷的符号RASP程序及其对应数值表示的新基准。实验表明,GBPR能够通过在数值程序空间中进行基于梯度的优化有效修复有缺陷的符号程序,并展示出令人信服的修复轨迹。据我们所知,我们是首次将程序修复表述为数值程序空间中的连续优化。我们的工作证明了这一方向在程序修复研究中的可行性,架起了连续优化与程序行为之间的桥梁。

0
下载
关闭预览

相关内容

大型语言模型自动程序修复的系统文献综述
专知会员服务
43+阅读 · 2024年5月5日
基于深度神经网络的图像缺损修复方法综述
专知会员服务
26+阅读 · 2021年12月18日
专知会员服务
14+阅读 · 2021年9月21日
通过条件梯度进行结构化机器学习训练,50页ppt与视频
专知会员服务
13+阅读 · 2021年2月25日
图像修复研究进展综述
专知
20+阅读 · 2021年3月9日
Deep Image Prior——图像恢复入门
中国人工智能学会
15+阅读 · 2019年2月16日
自定义损失函数Gradient Boosting
AI研习社
14+阅读 · 2018年10月16日
干货|代码原理教你搞懂SGD随机梯度下降、BGD、MBGD
机器学习研究会
12+阅读 · 2017年11月25日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
绝对干货 | 随机梯度下降算法综述
菜鸟的机器学习
15+阅读 · 2017年10月30日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
0+阅读 · 13分钟前
21世纪的无人机战争
专知会员服务
1+阅读 · 今天14:05
《量子技术的军事任务技术适配与利用》
专知会员服务
1+阅读 · 今天13:51
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员