The
memory management, optimization, programming model, and styles are applied
consistently. Ideally, the generated code should look like the code handwritten
by the experienced developer who de?¬?ned the generator. The generated code can
also follow other requirements, like corporate coding standards. These may feel
important in the beginning but become less relevant when the shift to usingDSMhas
happened. The format of the generated code then matters most for the generator
developers who need to debug and check the code generated during generator test
runs.
4.4.3 Different Usage of Generators
In this book we focus on producing production code, although generators can be used
for many other purposes too. If we can generate production code, then other kinds of
outputs can be produced as well. One obvious extension of this is automating the
generation process in which the code generator also creates build scripts, calls a
compiler, deploys the generated code, and executes it in a target environment. It is
even possible to generate traceable code that includes a link to the models: running the
application then allows to trace back to models to visualize the execution. Below we
consider other kinds of generators.
CODE GENERATOR 83
Model Checking In DSM, generators are also used for checking the consistency
and completeness of designs.
Pages:
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181