To increase
design abstraction and generate more complete code, you usually need to extend both
syntax and semantics.
Syntax Syntax speci?¬?es the conceptual structure of a language: the constructs of a
modeling language, their properties and connections to each other. In DSM, the
modeling constructs ideally come directly from the problem domain. The abstract
syntax of a modeling language is normally speci?¬?ed in a metamodel (see Section
4.122.4 for details).
The syntax of a modeling language means more than just reserved words. It is
commonly seen as also covering grammatical rules that need to be followed while
68 ARCHITECTURE OF DSM
specifying models. In DSM, these rules are from the domain and they are de?¬?ned in
the language in relation to the modeling concepts. Rules are needed to avoid
generating code from models that have errors. Having rules in place during modeling
also makes implementation of the generators easier as generators don??™t need to start
by ?¬?rst checking if models are correct. In DSM, the rules are checked, if possible, as
early as possible because this allows detecting and preventing errors when they are
cheapest to correct. Consider here the alternative: ?¬?nding the errors during code
generation or from the generated code. Placing rules in the language, rather than in the
generator, makes even more sense if there are several generators: it is always better to
check the model once than do it for each generator.
Pages:
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149