Metamodel-based DSL development in language workbenches like Xtext allows language engineers to focus more on metamodels and domain concepts rather than grammar details. However, the grammar generated from metamodels often requires manual modification, which can be tedious and time-consuming. Especially when it comes to rapid prototyping and language evolution, the grammar will be generated repeatedly, this means that language engineers need to repeat such manual modification back and forth. Previous work introduced GrammarOptimizer, which automatically improves the generated grammar using optimization rules. However, the optimization rules need to be configured manually, which lacks user-friendliness and convenience. In this paper, we present our vision for and current progress towards a language workbench that integrates GrammarOptimizer's grammar optimization rules to support rapid prototyping and evolution of metamodel-based languages. It provides a visual configuration of optimization rules and a real-time preview of the effects of grammar optimization to address the limitations of GrammarOptimizer. Furthermore, it supports the inference of a grammar based on examples from model instances and offers a selection of language styles. These features aim to enhance the automation level of metamodel-based DSL development with Xtext and assist language engineers in iterative development and rapid prototyping. Our paper discusses the potential and applications of this language workbench, as well as how it fills the gaps in existing language workbenches.
翻译:语言工作台(如Xtext)中基于元模型的DSL开发,使语言工程师能够更专注于元模型和领域概念而非语法细节。然而,由元模型生成的语法通常需要手动修改,这一过程既繁琐又耗时。尤其在快速原型化和语言演进场景下,语法需要反复生成,这意味着语言工程师必须反复执行此类手动修改。先前工作提出了GrammarOptimizer,通过优化规则自动改进生成的语法,但优化规则需要手动配置,缺乏用户友好性和便利性。本文阐述了我们在集成GrammarOptimizer语法优化规则以支持基于元模型语言的快速原型化与演进方面的工作愿景与当前进展。该工作台提供优化规则的可视化配置及语法优化效果的实时预览,以解决GrammarOptimizer的局限性。此外,它支持基于模型实例示例的语法推断,并提供多种语言风格选择。这些特性旨在提升基于Xtext的元模型DSL开发自动化程度,辅助语言工程师进行迭代开发与快速原型化。本文讨论了该语言工作台的潜力与应用,以及它如何弥补现有语言工作台的不足。