Generators transform the models into code for interpretation or compilation into an
executable. A generator basically de?¬?nes how model concepts are mapped to code or
other output. In the simplest case, each modeling symbol produces certain ?¬?xed code
that includes the values entered into the symbol as arguments by the modeler.
Generally, generated code is linked to existing libraries and other code available in the
target environment, as often all such lower-level code for the application cannot and
does not need to be generated from the domain-speci?¬?c models.
A domain framework is often created to make code generation easier. The domain
framework provides a layer between the generated code and existing code in the target
environment. It provides code that helps avoid repetition in the generator (and models)
and minimizes the complexity of the generated code.
92 ARCHITECTURE OF DSM
PART III
DSM EXAMPLES
In this part of the book, we illustrate Domain-Speci?¬?c Modeling (DSM) examples
from practice. Following the DSM architecture, we describe for each case the
language de?¬?nitions, how the code generators work, and how the services of the
underlying platform and domain framework are used. Later, in Part IV, we refer to
these examples to demonstrate guidelines for DSM implementation.
Every domain is different, and so every DSM example is different.
Pages:
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199