A Catalog of Design Patterns for Compositional Language Engineering

By: Florian Drux, Nico Jansen, Bernhard Rumpe

Abstract

When composing a domain-specific language from several language components, it is also necessary to compose analysis and synthesis techniques, which are individually defined on these components in an efficient, ideally black-box form. An effective way of allowing such compositions is to use specific design patterns, which are partly reflected in the tooling code, partly reflected in the language, but also partly reflected in the language workbench (one meta-level higher), and the generated/synthesized product code (one meta-level downward). Based on the experiences gained in compositional language development using the language workbench MontiCore, we in detail discuss several of those design patterns, namely the Mill, the RealThis object composition, the Template/Hook, and the TOP- Generator Patterns, and the hidden complexity of an extended visitor infrastructure coping with the above patterns. The patterns are recorded and described in a reusable way, as usual, allowing readers to participate from the gained insights and possible solutions.

Keywords

Software Language Engineering, Language Composition, Design Patterns.

Cite as:

Florian Drux, Nico Jansen, Bernhard Rumpe, “A Catalog of Design Patterns for Compositional Language Engineering”, Journal of Object Technology, Volume 21, no. 4 (October 2022), pp. 4:1-13, doi:10.5381/jot.2022.21.4.a4.

PDF | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn

The JOT Journal   |   ISSN 1660-1769   |   DOI 10.5381/jot   |   AITO   |   Open Access   |    Contact