Chapter 55. Model-Aware Generation

Generate code with an explicit simulacrum of the semantic model of the DSL, so that the generated code has generic-specific separation.

image

When you generate code, you embed within that code the semantics of the DSL script. By using a Model-Aware Generation, you replicate some form of the Semantic Model in the generated code in order to preserve the separation of generic and specific code within the generated code.

55.1 How It Works

The most important aspect of Model-Aware Generation is that it preserves the principle of generic-specific separation. The actual form that the model takes in the generated code is ...

Get Domain Specific Languages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.