arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.03378cs.SE
收藏

神经变化预测:将软件变更与其效果关联及反之

Neural Change Prediction: Relating Software Changes to Their Effects and Vice Versa

CISPA Helmholtz Center for Information Security(CISPA亥姆霍兹信息安全中心);Saarland University(萨尔兰大学);University of Luxembourg(卢森堡大学)

Laura Plein, Souhila Zidane, Jordan Samhi, Andreas Zeller

AI总结:

提出神经变化预测技术,通过自动变异代码并观察行为变化,学习并预测软件变更与动态效果之间的关联,支持特征定位、软件演化和修复。

摘要:

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

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑