Files
logseq/pages/hls__sle23-paper83_1692364380124_0.md
T
2025-06-02 17:15:13 +02:00

281 lines
11 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
file:: [sle23-paper83_1692364380124_0.pdf](../assets/sle23-paper83_1692364380124_0.pdf)
file-path:: ../assets/sle23-paper83_1692364380124_0.pdf
- optimizations
ls-type:: annotation
hl-page:: 1
hl-color:: green
id:: 64e0c6c5-19c7-4898-9605-049f7c31342e
- In this work, to significantly reduce the manual effort during meta-model and grammar co-evolution, we present an automated approach for extracting optimization rule configurations.
ls-type:: annotation
hl-page:: 1
hl-color:: green
id:: 64e0c6e0-efbf-478d-b647-2d0eac1f9751
- replay optimizations on later versions of the grammar, thus leading to a fully automated migration process for the supported types of changes.
ls-type:: annotation
hl-page:: 1
hl-color:: green
id:: 64e0c6f1-8136-4aee-bcb2-6d87fd24bab7
- We consider a scenario in which a meta-model is coevolved with an associated grammar.
ls-type:: annotation
hl-page:: 1
hl-color:: green
id:: 64e0c96e-a290-48f0-8aed-1d4633d1dc21
- First, the meta-model evolves over time, rendering previous versions of the grammar obsolete. Second, in a rapid prototyping context, the meta-model evolves quickly and then requires the grammar to be updated quickly as well.
ls-type:: annotation
hl-page:: 1
hl-color:: green
id:: 64e0c98c-59d3-4cca-8338-1e23ecd3b2bb
- The updated grammar should be consistent with the new version of the meta-model.
ls-type:: annotation
hl-page:: 1
hl-color:: purple
id:: 64e0cb41-ce79-4e10-a35a-4331ce1a2e05
- The updated grammar should incorporate any manual improvements that were made to previous versions of the grammar
ls-type:: annotation
hl-page:: 1
hl-color:: purple
id:: 64e0cb46-b5d9-4c20-a89e-4566425f0fce
- we present an approach for automating the configuration of grammar optimization rules.
ls-type:: annotation
hl-page:: 2
hl-color:: green
id:: 64e0cc4e-af1e-4765-9235-64074a2c764c
- Our approach can then automatically extract an optimization rule configuration that encodes the manual improvements.
ls-type:: annotation
hl-page:: 2
hl-color:: purple
id:: 64e0cc5c-ef11-4f62-bb02-53b59f03aa81
- mapping between the grammar rules from both grammars and then, per rule, performing a line-by-line comparison to extract invocations of relevant grammar optimization rules with their parametrizations.
ls-type:: annotation
hl-page:: 2
hl-color:: blue
id:: 64e0cc69-2df9-4751-85c8-9f41fdb7bdb0
- The meta-model represents the abstract syntax for language at hand (classes with their features, including names, attributes, and references), while the augmented EBNF expression describes the concrete syntax and its mapping to specific parts of the meta-model.
ls-type:: annotation
hl-page:: 2
hl-color:: green
id:: 64e0cd27-77f3-41d9-94ba-b66db2993508
- This AST can then be further processed or used for various purposes in language development
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e0cdd3-9ac3-4d9a-9acf-afae8a3fd58c
- Their approach includes 54 optimization rules extracted from seven sample languages, which are used to optimize the generated grammar (explained above).
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e0ce58-db86-488e-a4c5-a2086a27c854
- AddKeywordToAttr
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e1d8ab-6f9b-42ea-8dd4-6e5c616fde40
- ChangeBracesToSquare
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e1d8b1-836e-41f5-b936-316ffeed2bc7
- GrammarOptimizer
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e1d974-15dc-4bdd-a228-340430802c51
- the names of the grammar rule, of the attribute name, of the current type, and of the new type
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e1d9d1-52f8-44c7-8f8f-b91f1eceed26
- GrammarOptimizer
ls-type:: annotation
hl-page:: 3
hl-color:: blue
id:: 64e1d9d4-f8b3-4420-b23f-76b4a9a96290
- go.changeTypeOfAttr("SiteWithModal", "name","EString", "ID")
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e1d9de-a271-4fb0-b82a-f8f14e39ea60
- Recovery of grammars and meta-models
ls-type:: annotation
hl-page:: 3
hl-color:: blue
id:: 64e1da20-8965-4b39-8a79-7fca64d9cafe
- Co-evolution in MDE contexts
ls-type:: annotation
hl-page:: 3
hl-color:: blue
id:: 64e1da25-cc3d-4fbb-9e96-9dca9180c573
- Automated rule extraction
ls-type:: annotation
hl-page:: 4
hl-color:: blue
id:: 64e1da2b-319e-47a8-a020-e409e8b06e20
- From meta-models to graph grammars
ls-type:: annotation
hl-page:: 4
hl-color:: blue
id:: 64e1da2f-4252-419f-bc9a-95ba6f5cd81f
- Text-based merging
ls-type:: annotation
hl-page:: 4
hl-color:: blue
id:: 64e1da34-f23c-458a-a7eb-6f8b7532e031
- Grammar convergence
ls-type:: annotation
hl-page:: 4
hl-color:: blue
id:: 64e1da38-b71a-4cce-b90d-5624879bdb3a
- However, except for GrammarOptimizer [ 47] (described in Sect. 2), on which we build and improve with our contribution, we are not aware of previous work on meta-model/grammar co-evolution
ls-type:: annotation
hl-page:: 3
hl-color:: green
id:: 64e1dc50-d4e5-49cd-94e3-e51db48dbe01
- A line of work focuses on automating the extraction of transformation rules in specific contexts.
ls-type:: annotation
hl-page:: 4
hl-color:: green
id:: 64e1dc59-d63d-4f22-b499-b2762c903e0a
- we focus on the automated extraction of configurations of rules.
ls-type:: annotation
hl-page:: 4
hl-color:: green
id:: 64e1dc9b-d7ec-436a-ac0b-67090649cc46
hl-stamp:: 1692523677445
- double-pushout approach to graph rewriting, using advanced transformation features such as negative application conditions.
ls-type:: annotation
hl-page:: 4
hl-color:: green
id:: 64e1dcca-37ef-4455-808b-7696042f6495
- avoid the use of such advanced features that make analysis more complicated, while being sufficient for meta-models with arbitrary multiplicities and inheritance
ls-type:: annotation
hl-page:: 4
hl-color:: green
id:: 64e1dcd7-05aa-4f33-b90b-93ecab7ba145
- Grammar convergence aims to extract a series of transformations to make two considered grammars syntactically identical, which is similar to our goal.
ls-type:: annotation
hl-page:: 4
hl-color:: green
id:: 64e1dd53-aec6-4c28-bbb8-4b6b7576fe54
- We decided to directly work with a subset of six of their considered languagesBibtex, DOT, EAST-ADL (full version), SML, Xcore, and Xenia, which has the following benefits:
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1dddc-7e7e-4bc8-a57c-ddf2c0936178
- that four of their considered languages had complications that led to a lack of full support (e.g., using OCL as part of the grammar definition).
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1de5d-ab7d-4158-91b2-641011a88972
- enerated grammar (i.e., the grammar newly generated from the meta-model).
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1de84-44bb-49ca-88b6-8700e5e14a3c
- We observed that EAST-ADL and Bibtex did not have original grammars in Xtext, so we directly adopted the optimized grammars from [ 47 ]
ls-type:: annotation
hl-page:: 5
hl-color:: red
id:: 64e1de9a-17be-4d49-9469-77fbdb62cb0c
- We developed the initial version of ConfigGenerator based on EASTADL
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1df18-de10-46c9-88b1-1ff182010d26
- Each time we implemented a comparison method for a specific grammar element (e.g., comparing line orders), we applied it to compare two EAST-ADL grammars and check the selected optimization rules.
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1df28-d6d1-4b9c-81bd-8f3107355f7b
- in Xenias target grammar, some different attributes are placed on the same line
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1df86-b753-4ace-9356-2215f636a114
- ConfigGenerator
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1dfa3-526d-403d-b17b-0b94698219b2
- extracting the optimization rule configurations.
ls-type:: annotation
hl-page:: 5
hl-color:: yellow
id:: 64e1e050-7e5d-4ef9-ba77-12891b81ef0a
- optimized grammar and the target grammar of each language, based on a one-to-one comparison of corresponding grammar rules.
ls-type:: annotation
hl-page:: 5
hl-color:: green
id:: 64e1e0be-512a-4939-afe9-fbe3c1f052e7
- The 2nd column shows the number of lines of optimization rule configurations used by Zhang
ls-type:: annotation
hl-page:: 5
hl-color:: red
id:: 64e1e1e4-44c6-4114-87aa-c5fdf8dc0407
- “Diff” represents grammar rules that are not identical, and "Percent” indicates the percentage of grammar rules that are identical between the two grammars
ls-type:: annotation
hl-page:: 6
hl-color:: green
id:: 64e1e25b-ac30-4764-88f5-31b416bb09bf
- In this section we present the ConfigGenerator, which creates an optimization rule configuration based on a generated grammar and a target grammar, to enable a re-application of manually defined grammar changes after a meta-model changed and a new grammar was generated
ls-type:: annotation
hl-page:: 6
hl-color:: purple
id:: 64e1e285-1cd9-4296-8678-6f3f85d54229
- A grammar rule name is unique across the grammar.
ls-type:: annotation
hl-page:: 6
hl-color:: green
id:: 64e1e2ed-f523-4a16-8239-b399981966ee
- An attribute name is unique within a grammar rule
ls-type:: annotation
hl-page:: 6
hl-color:: green
id:: 64e1e486-fa7e-4a00-9470-ec45ccb78907
- Attribute names are not modified by users when they manually create a target grammar out of a generated grammar.
ls-type:: annotation
hl-page:: 6
hl-color:: green
id:: 64e1e498-ee8a-4869-a30c-5615935929c2
- Figure 3 illustrates the internal workflow of ConfigGenerator for selecting the required optimization rules by comparing two grammars.
ls-type:: annotation
hl-page:: 6
hl-color:: green
id:: 64e1e4dc-38e1-484c-af23-aa458f289928
- If no match is found, it indicates that the grammar rule has been deleted in the target grammar, thereby requiring the selection and parameterization of an optimization rule for deleting that grammar rule
ls-type:: annotation
hl-page:: 6
hl-color:: green
id:: 64e24686-5416-4ba2-95ff-112bcb7cb9a4
- After both traversals are completed, ConfigGenerator yields an optimization rule configuration with the selected and parameterized optimization rules and writes it into a text file.
ls-type:: annotation
hl-page:: 7
hl-color:: green
id:: 64e24776-03ab-4463-a85f-82b7eba05dd9
- n optimization rule for adding the grammar rule is selected and parameterize
ls-type:: annotation
hl-page:: 7
hl-color:: green
id:: 64e2477c-a245-4776-b190-58365103b087
- sing regular expressions, we separate different attributes into distinct lines, ensuring that each attribute has its own line.
ls-type:: annotation
hl-page:: 7
hl-color:: green
id:: 64e24814-5936-4f70-90e2-4a3b525ab94a
- [:span]
ls-type:: annotation
hl-page:: 4
hl-color:: green
id:: 64e3388f-348f-4c5c-a990-ac5056d94e21
hl-type:: area
hl-stamp:: 1692612748932
- Finally, the last columns in Table 2 summarize how the optimized grammar compares to the target grammar. The results confirm that the grammar rules in the generated grammars of EAST-ADL, Bibtex, and Xenia have been optimized to be identical to the target grammar using the extracted optimization rule configurations. I
ls-type:: annotation
hl-page:: 8
hl-color:: yellow
id:: 64e37cd9-fbab-48b1-8d2a-1ce73c5d521d
- Grammar Comparison
ls-type:: annotation
hl-page:: 9
hl-color:: yellow
id:: 64e37cfa-dc61-4bfc-a2a9-23332b9b5b63