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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Weixing, Holtmann, Jörg, Strüber, Daniel, Hebig, Regina, Steghöfer, Jan-Philipp
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913216236355584
author Zhang, Weixing
Holtmann, Jörg
Strüber, Daniel
Hebig, Regina
Steghöfer, Jan-Philipp
author_facet Zhang, Weixing
Holtmann, Jörg
Strüber, Daniel
Hebig, Regina
Steghöfer, Jan-Philipp
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2401_17351
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Supporting Meta-model-based Language Evolution and Rapid Prototyping with Automated Grammar Optimization
Zhang, Weixing
Holtmann, Jörg
Strüber, Daniel
Hebig, Regina
Steghöfer, Jan-Philipp
Software Engineering
Programming Languages
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.
title Supporting Meta-model-based Language Evolution and Rapid Prototyping with Automated Grammar Optimization
topic Software Engineering
Programming Languages
url https://arxiv.org/abs/2401.17351