Much of software development revolves around understanding the relationship between software changes and their effects. If we could learn and predict those relationships, such predictions could benefit several areas of software engineering. While recent advances in artificial intelligence have shown great promise in software engineering tasks, predicting the semantics of code without executing it remains a big challenge. In this paper, we present Neural Change Prediction, a novel and fundamental technique to learn and predict associations between software changes and their dynamic effects on program behavior. Specifically, for a given program and test inputs, we automatically apply numerous mutations to the code and observe how these changes alter the program's output. From these (changes to software, changes in behavior)-pairs, we create models that: (1) for a desired change in behavior, predict where and how the code should be changed (feature localization, software evolution, and software repair); and (2) for a given code change, predict how this code change affects the output (effect prediction). We have conducted a detailed case study on CSS configuration files and an evaluation on Python programs to demonstrate the generality and wide applicability of Neural Change Prediction. While Neural Change Prediction requires numerous mutations (and thus numerous executions of the program under test), Neural Change Prediction is fully automatic and does not require any prior knowledge of the code or its semantics, making it applicable to any software artifact that can be executed and whose output can be observed.


翻译:软件开发工作的很大一部分围绕理解软件变更及其影响之间的关系展开。如果我们能够学习并预测这些关系,此类预测可惠及软件工程的多个领域。尽管近期人工智能的进展在软件工程任务中展现出巨大潜力,但在不执行代码的情况下预测其语义仍是一项重大挑战。本文提出神经变化预测(Neural Change Prediction),这是一种新颖的基础性技术,用于学习并预测软件变更与其对程序行为的动态影响之间的关联。具体而言,针对给定程序和测试输入,我们自动向代码施加大量突变,并观察这些变更如何改变程序的输出。通过这些(软件变更-行为变化)配对,我们构建了以下模型:(1)针对期望的行为变化,预测应在何处以及如何修改代码(特征定位、软件演化与软件修复);(2)针对给定的代码变更,预测该变更如何影响输出(影响预测)。我们通过对CSS配置文件进行详细案例研究,并在Python程序上开展评估,验证了神经变化预测的通用性与广泛适用性。尽管神经变化预测需要大量突变(进而需要大量执行被测程序),但该技术完全自动化,无需任何关于代码或其语义的先验知识,因而可适用于任何可执行且其输出可观测的软件制品。

0
下载
关闭预览

相关内容

软件(中国大陆及香港用语,台湾作软体,英文:Software)是一系列按照特定顺序组织的计算机数据和指令的集合。一般来讲软件被划分为编程语言、系统软件、应用软件和介于这两者之间的中间件。软件就是程序加文档的集合体。
《软件定义网络元素与机器代码的形式化验证》
专知会员服务
14+阅读 · 2025年11月18日
《人工智能在决策中角色的演变》最新278页
专知会员服务
59+阅读 · 2025年4月25日
可解释强化学习,Explainable Reinforcement Learning: A Survey
专知会员服务
133+阅读 · 2020年5月14日
【KDD2020】动态知识图谱的多事件预测
专知
88+阅读 · 2020年8月31日
绝对干货!NLP预训练模型:从transformer到albert
新智元
14+阅读 · 2019年11月10日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
硬件加速神经网络综述
计算机研究与发展
26+阅读 · 2019年2月1日
综述AI未来:神经科学启发的类脑计算
人工智能学家
11+阅读 · 2018年4月24日
15款免费预测分析软件!收藏好,别丢了!
七月在线实验室
11+阅读 · 2018年2月27日
回归预测&时间序列预测
GBASE数据工程部数据团队
44+阅读 · 2017年5月17日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Arxiv
0+阅读 · 6月5日
Arxiv
10+阅读 · 2024年3月11日
VIP会员
最新内容
边缘计算的军事应用
专知会员服务
7+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
9+阅读 · 8月8日
《多域冲突比较支持模型》60页
专知会员服务
14+阅读 · 8月7日
相关VIP内容
《软件定义网络元素与机器代码的形式化验证》
专知会员服务
14+阅读 · 2025年11月18日
《人工智能在决策中角色的演变》最新278页
专知会员服务
59+阅读 · 2025年4月25日
可解释强化学习,Explainable Reinforcement Learning: A Survey
专知会员服务
133+阅读 · 2020年5月14日
相关资讯
【KDD2020】动态知识图谱的多事件预测
专知
88+阅读 · 2020年8月31日
绝对干货!NLP预训练模型:从transformer到albert
新智元
14+阅读 · 2019年11月10日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
硬件加速神经网络综述
计算机研究与发展
26+阅读 · 2019年2月1日
综述AI未来:神经科学启发的类脑计算
人工智能学家
11+阅读 · 2018年4月24日
15款免费预测分析软件!收藏好,别丢了!
七月在线实验室
11+阅读 · 2018年2月27日
回归预测&时间序列预测
GBASE数据工程部数据团队
44+阅读 · 2017年5月17日
相关基金
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员