arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2601.13894cs.SE
收藏

多位置软件模型补全

Multi-Location Software Model Completion

Saarland University(萨尔兰大学)

Alisa Welter, Christof Tinnes, Sven Apel

AI总结:

本文提出NextFocus,一种基于全局嵌入的神经网络,首次实现多位置软件模型补全,通过预测多个位置的变化提升补全效果。

摘要:

在模型驱动工程及其领域之外,软件模型是关键的开发制品。在实践中,它们常常增长到相当大的规模和复杂性,并由于演变、重构和维护而经历数千次修改。人工智能的兴起激发了对如何自动化软件建模活动的兴趣。最近,基于大语言模型(LLM)的软件模型补全方法已被提出,然而,当前最先进的方法仅支持单位置模型补全,即预测特定位置的变化。在此基础上,我们旨在填补空白,以处理跨越多个位置的协调变化,这些变化存在于大型、复杂的模型中。具体而言,我们提出了一种新颖的全局嵌入基于的下一个关注预测器,称为NextFocus,这是首次实现多位置模型补全。该预测器由一个带有注意力机制的神经网络组成,该网络在历史软件模型演变数据上进行训练。从现有修改开始,它预测进一步的模型元素进行修改,可能跨越模型的多个部分。我们评估了我们的方法在实际项目中开发者实际执行的多位置模型修改上。NextFocus在多位置模型补全中取得了有希望的结果,即使修改在模型中分布广泛。它在k≤10时的平均Precision@k得分为0.98,显著优于三个基线方法。

英文摘要:

In model-driven engineering and beyond, software models are key development artifacts. In practice, they often grow to substantial size and complexity, undergoing thousands of modifications over time due to evolution, refactoring, and maintenance. The rise of AI has sparked interest in how software modeling activities can be automated. Recently, LLM-based approaches for software model completion have been proposed, however, the state of the art supports only single-location model completion by predicting changes at a specific location. Going beyond, we aim to bridge the gap toward handling coordinated changes that span multiple locations across large, complex models. Specifically, we propose a novel global embedding-based next focus predictor, NextFocus, which is capable of multi-location model completion for the first time. The predictor consists of a neural network with an attention mechanism that is trained on historical software model evolution data. Starting from an existing change, it predicts further model elements to change, potentially spanning multiple parts of the model. We evaluate our approach on multi-location model changes that have actually been performed by developers in real-world projects. NextFocus achieves promising results for multi-location model completion, even when changes are heavily spread across the model. It achieves an average Precision@k score of 0.98 for $k \leq 10$, significantly outperforming the three baseline approaches.

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

↑