arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.06836cs.SEcs.AIcs.PL
收藏

利用LLMs支持文本DSL定义与实例的共进化

Leveraging LLMs to support co-evolution between definitions and instances of textual DSLs

Chalmers University of Technology(查尔姆斯理工大学);University of Gothenburg(哥德堡大学);Radboud University(拉德博德大学)

Weixing Zhang, Regina Hebig, Daniel Strüber

AI总结:

本研究利用大型语言模型支持文本DSL定义与实例的共进化,通过实验验证了LLM在迁移文本实例方面的有效性及可扩展性挑战。

摘要:

软件语言随着时间推移会因各种原因演变,例如新增功能。当语言的语法定义演变时,原本符合该语法的文本实例会变得过时。在模型驱动工程背景下,存在大量技术用于与演化的元模型共进化。然而,这些技术并不适用于具有文本语法的DSLs——将它们应用于文本语言定义和实例时,可能导致原始实例中的信息丢失,如注释和布局信息,这些信息对软件理解与维护至关重要。本研究探讨了基于大型语言模型(LLM)的解决方案在实现语法与实例共进化中的潜力,特别关注其在直接处理文本实例时保留辅助信息的能力。通过应用两个先进的语言模型,Claude-3.5和GPT-4o,并在七个案例语言上进行实验,我们评估了该方法的可行性和局限性。我们的结果表明,所考虑的LLMs在小规模案例中迁移文本实例的能力良好,这些案例代表了实践中遇到的一小部分案例。此外,我们还观察到基于LLM的解决方案在处理较大实例时的可扩展性问题,这为未来研究提供了有价值的见解。

英文摘要:

Software languages evolve over time for various reasons, such as the addition of new features. When the language's grammar definition evolves, textual instances that originally conformed to the grammar become outdated. For DSLs in a model-driven engineering context, there exists a plethora of techniques to co-evolve models with the evolving metamodel. However, these techniques are not geared to support DSLs with a textual syntax -- applying them to textual language definitions and instances may lead to the loss of information from the original instances, such as comments and layout information, which are valuable for software comprehension and maintenance. This study explores the potential of Large Language Model (LLM)-based solutions in achieving grammar and instance co-evolution, with attention to their ability to preserve auxiliary information when directly processing textual instances. By applying two advanced language models, Claude-3.5 and GPT-4o, and conducting experiments across seven case languages, we evaluated the feasibility and limitations of this approach. Our results indicate a good ability of the considered LLMs for migrating textual instances in small-scale cases with limited instance size, which are representative of a subset of cases encountered in practice. In addition, we observe significant challenges with the scalability of LLM-based solutions to larger instances, leading to insights that are useful for informing future research.

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

↑