Supporting Meta-Model-Based Language Evolution and Rapid Prototyping with Automated Grammar Optimization

32 Pages Posted: 6 Mar 2023

See all articles by Weixing Zhang

Weixing Zhang

University of Gothenburg

Jörg Holtmann

no affiliation

Regina Hebig

University of Rostock

Jan-Philipp Steghöfer

Xitaso GmbH


In model-driven engineering, textual domain-specific languages (DSLs) are constructed using a meta-model and a grammar and artifacts for parsing can be generated from this meta-model.When designing such a DSL, it is often necessary to manually optimize the generated grammar. When the meta-model changes during rapid prototyping or language evolution, the regenerated grammar needs to be optimized again, causing repeated effort and potential mistakes.We compared the generated grammars of seven DSLs to their original, hand-crafted grammars. We extracted a set of optimization rules that transform the generated grammars into ones that parse the same language as the original grammars and implemented them in GrammarOptimizer.To evaluate GrammarOptimizer, we applied the optimization rules to these seven languages. The tool can modify the generated grammars so that they parse the same languages as the original, hand-crafted ones.In addition, we optimized generated grammars for different versions of QVTo and EAST-ADL to validate the support for language evolution. The contribution of this paper is  GrammarOptimizer, a novel tool for optimizing generated grammars based on meta-models. It reduces the efforts of language engineers and simplifies rapid prototyping and evolution of meta-model-based DSLs.

Keywords: Domain-specific Languages, DSL, Grammar, Xtext, Language Evolution, Language Prototyping

Suggested Citation

Zhang, Weixing and Holtmann, Jörg and Hebig, Regina and Steghöfer, Jan-Philipp, Supporting Meta-Model-Based Language Evolution and Rapid Prototyping with Automated Grammar Optimization. Available at SSRN: or

Weixing Zhang

University of Gothenburg ( email )

Rännvägen 6B
Hörselgången 5
Gothenburg, Västergötland 41296
+46720226431 (Phone)
41296 (Fax)

Jörg Holtmann

no affiliation ( email )

Regina Hebig

University of Rostock ( email )

Jan-Philipp Steghöfer (Contact Author)

Xitaso GmbH ( email )


Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Abstract Views
PlumX Metrics