The information
in the model is distributed over objects, relationships, and properties. The output has
the same semantic content, plus some content that is related to the output language
syntax, and some ?¬?xed content that the generator will add. Clearly, the lion??™s share of
the variability in the output will come from the model: the generator will be the same
for all models, and its output for a given model will always be the same, so it cannot
add any variability to the output that is not found in the model.
You can thus look at the output and identify which parts of it are ?¬?xed text that will
always be present, and which parts are simply values from the model. Between these
two extremes lies the work for the meat of the generator: parts that are included or left
out depending on some information from the model, and parts that are repeated for
each of a given structure in the model. These four kinds of parts cover the entirety of
most generators, even for the most complex systems.
To cope with all possible generators, we need to add the possibility of massaging
the values from the models??”normally as a concession to the syntax of the output
language and the ease of use of the modeling language. For instance, most languages
require that names be composed only of alphanumeric and underscore characters, yet
we may want to allow the names in the model to contain spaces.
Pages:
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495