Supporting Meta-model-based Language Evolution and Rapid Prototyping
with Automated Grammar Optimization
- URL: http://arxiv.org/abs/2401.17351v1
- Date: Tue, 30 Jan 2024 18:03:45 GMT
- Title: Supporting Meta-model-based Language Evolution and Rapid Prototyping
with Automated Grammar Optimization
- Authors: Weixing Zhang, J\"org Holtmann, Daniel Str\"uber, Regina Hebig,
Jan-Philipp Stegh\"ofer
- Abstract summary: We present Grammarr, an approach for optimizing generated grammars in the context of meta-model-based language evolution.
G grammar optimization rules were extracted from a comparison of generated and existing, expert-created grammars.
- Score: 0.7812210699650152
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: 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.
Related papers
- Using Grammar Masking to Ensure Syntactic Validity in LLM-based Modeling Tasks [0.996023506058745]
Grammar masking is used to guide large language models toward producing syntactically correct models for a given context-free grammar.
We show that grammar masking can dramatically improve the modeling capabilities of several language models.
arXiv Detail & Related papers (2024-07-08T17:19:59Z) - Towards Automated Support for the Co-Evolution of Meta-Models and
Grammars [0.0]
We focus on a model-driven engineering (MDE) approach based on meta-models to develop textual languages.
In this thesis, we propose an approach that can support the co-evolution of meta-models and grammars.
arXiv Detail & Related papers (2023-12-10T23:34:07Z) - A Rapid Prototyping Language Workbench for Textual DSLs based on Xtext:
Vision and Progress [0.8534278963977691]
We present our vision for a language workbench that integrates Grammarr's grammar optimization rules to support rapid prototyping and evolution of languages.
It provides a visual configuration of optimization rules and a real-time preview of the effects of grammar optimization.
Our paper discusses the potential and applications of this language workbench, as well as how it fills the gaps in existing language workbenches.
arXiv Detail & Related papers (2023-09-08T14:17:00Z) - Soft Language Clustering for Multilingual Model Pre-training [57.18058739931463]
We propose XLM-P, which contextually retrieves prompts as flexible guidance for encoding instances conditionally.
Our XLM-P enables (1) lightweight modeling of language-invariant and language-specific knowledge across languages, and (2) easy integration with other multilingual pre-training methods.
arXiv Detail & Related papers (2023-06-13T08:08:08Z) - nl2spec: Interactively Translating Unstructured Natural Language to
Temporal Logics with Large Language Models [3.1143846686797314]
We present nl2spec, a framework for applying Large Language Models (LLMs) derive formal specifications from unstructured natural language.
We introduce a new methodology to detect and resolve the inherent ambiguity of system requirements in natural language.
Users iteratively add, delete, and edit these sub-translations to amend erroneous formalizations, which is easier than manually redrafting the entire formalization.
arXiv Detail & Related papers (2023-03-08T20:08:53Z) - Benchmarking Language Models for Code Syntax Understanding [79.11525961219591]
Pre-trained language models have demonstrated impressive performance in both natural language processing and program understanding.
In this work, we perform the first thorough benchmarking of the state-of-the-art pre-trained models for identifying the syntactic structures of programs.
Our findings point out key limitations of existing pre-training methods for programming languages, and suggest the importance of modeling code syntactic structures.
arXiv Detail & Related papers (2022-10-26T04:47:18Z) - Improving Text Auto-Completion with Next Phrase Prediction [9.385387026783103]
Our strategy includes a novel self-supervised training objective called Next Phrase Prediction (NPP)
Preliminary experiments have shown that our approach is able to outperform the baselines in auto-completion for email and academic writing domains.
arXiv Detail & Related papers (2021-09-15T04:26:15Z) - Constrained Language Models Yield Few-Shot Semantic Parsers [73.50960967598654]
We explore the use of large pretrained language models as few-shot semantics.
The goal in semantic parsing is to generate a structured meaning representation given a natural language input.
We use language models to paraphrase inputs into a controlled sublanguage resembling English that can be automatically mapped to a target meaning representation.
arXiv Detail & Related papers (2021-04-18T08:13:06Z) - Explicitly Modeling Syntax in Language Models with Incremental Parsing
and a Dynamic Oracle [88.65264818967489]
We propose a new syntax-aware language model: Syntactic Ordered Memory (SOM)
The model explicitly models the structure with an incremental and maintains the conditional probability setting of a standard language model.
Experiments show that SOM can achieve strong results in language modeling, incremental parsing and syntactic generalization tests.
arXiv Detail & Related papers (2020-10-21T17:39:15Z) - Automatic Extraction of Rules Governing Morphological Agreement [103.78033184221373]
We develop an automated framework for extracting a first-pass grammatical specification from raw text.
We focus on extracting rules describing agreement, a morphosyntactic phenomenon at the core of the grammars of many of the world's languages.
We apply our framework to all languages included in the Universal Dependencies project, with promising results.
arXiv Detail & Related papers (2020-10-02T18:31:45Z) - Grounded Compositional Outputs for Adaptive Language Modeling [59.02706635250856]
A language model's vocabulary$-$typically selected before training and permanently fixed later$-$affects its size.
We propose a fully compositional output embedding layer for language models.
To our knowledge, the result is the first word-level language model with a size that does not depend on the training vocabulary.
arXiv Detail & Related papers (2020-09-24T07:21:14Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.