arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2401.17351cs.SEcs.PL
收藏

通过自动化语法优化支持基于元模型的语言演化与快速原型开发

Supporting Meta-model-based Language Evolution and Rapid Prototyping with Automated Grammar Optimization

Weixing Zhang, Jörg Holtmann, Daniel Strüber, Regina Hebig, Jan-Philipp Steghöfer

AI总结:

针对模型驱动工程中DSL演化时语法需反复手动优化的问题,提出GrammarOptimizer方法,通过可配置优化规则目录实现语法自动迭代优化,减少重复工作。

摘要:

在模型驱动工程中,开发文本式领域特定语言(DSL)需要构建定义底层抽象语法的元模型,以及定义该DSL具体语法的语法规则。Xtext等语言工作台可从元模型自动生成语法,但生成的语法通常需要手动优化以提升可用性。在快速原型开发或语言演化过程中,若元模型发生变更,就需要重新生成语法并再次优化,这会导致重复工作并可能引入错误。本文提出GrammarOptimizer,一种在基于元模型的语言演化场景下优化生成式语法的方法。为减轻语言工程师在快速原型开发与语言演化期间的工作量,该方法提供了一个可配置的语法优化规则目录。规则一旦配置完成,即可自动应用,并可在后续演化步骤后重新应用,大幅减少冗余的手动工作。此外,部分支持的优化可全局更改具体语法元素的风格,进一步显著降低手动优化的工作量。这些语法优化规则是基于7种现有DSL,通过对比生成语法与专家创建的现有语法提取而来的。

英文摘要:

In model-driven engineering, developing a textual domain-specific language (DSL) involves constructing a meta-model, which defines an underlying abstract syntax, and a grammar, which defines the concrete syntax for the DSL. Language workbenches such as Xtext allow the grammar to be automatically generated from the meta-model, yet the generated grammar usually needs to be manually optimized to improve its usability. When the meta-model changes during rapid prototyping or language evolution, it can become necessary to re-generate the grammar and optimize it again, causing repeated effort and potential for errors. In this paper, we present GrammarOptimizer, an approach for optimizing generated grammars in the context of meta-model-based language evolution. To reduce the effort for language engineers during rapid prototyping and language evolution, it offers a catalog of configurable grammar optimization rules. Once configured, these rules can be automatically applied and re-applied after future evolution steps, greatly reducing redundant manual effort. In addition, some of the supported optimizations can globally change the style of concrete syntax elements, further significantly reducing the effort for manual optimizations. The grammar optimization rules were extracted from a comparison of generated and existing, expert-created grammars, based on seven available DSLs.

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

↑