Leveraging LLMs to support co-evolution between definitions and instances of textual DSLs: a systematic evaluation
Journal article, 2026

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 grammar—applying them to textual language definitions and instances may lead to the loss of information from the original instances, such as layout information and comments, which are valuable for software comprehension and maintenance. This study systematically evaluates the potential of Large Language Model (LLM)-based solutions in achieving grammar and instance co-evolution for textual DSLs. By applying two advanced language models, Claude Sonnet 4.5 and GPT-5.2, and conducting ten experimental runs per case across ten case languages, we evaluate both the correctness of co-evolved instances and the preservation of human-oriented information such as comments and layout. Our results indicate high performance on small-scale cases (≥94% precision and recall for instances with fewer than 20 lines requiring modification), but performance degraded with scale: Claude Sonnet 4.5 maintained 85% recall at 40 lines while GPT-5.2 showed greater sensitivity, failing entirely on the two largest instances. Instance scale also substantially impacts processing efficiency, with Claude’s response time increasing nearly 18-fold for the largest case. In addition, we observe that grammar evolution complexity and deletion granularity impact performance more than change type alone, and prompt transferability across LLMs is limited. These findings identify the conditions under which LLM-based co-evolution succeeds and its scalability limitations, providing practitioners with insights into applicability and researchers with directions for addressing current limitations.

Language definition

Co-evolution

LLM

Textual DSLs

Instance

Author

Weixing Zhang

Karlsruhe Institute of Technology (KIT)

Bowen Jiang

Karlsruhe Institute of Technology (KIT)

Yuhong Fu

University of Adelaide

Anne Koziolek

Karlsruhe Institute of Technology (KIT)

R. Hebig

University of Rostock

Daniel Strüber

Radboud University

Chalmers, Computer Science and Engineering (Chalmers), Interaction Design and Software Engineering

Software and Systems Modeling

1619-1366 (ISSN) 1619-1374 (eISSN)

Vol. In Press

Subject Categories (SSIF 2025)

Software Engineering

Computer Sciences

Computer Systems

DOI

10.1007/s10270-026-01402-9

More information

Latest update

7/20/2026