Before you embark on that route and rediscover the only workable
solution??”having some intermediate form from which you can generate both
languages??”stop for a second and remember that you already have precisely such an
intermediate form: the models.
Automatic Translation and Intermediate Formats There have been
attempts in some DSM tools to force the use of such an intermediate form between
the models and the code. The background to such attempts is however not from the
world of DSM, but rather from UML. In UML, the domain is object-oriented
languages, and there is no expectation that working applications will be generated
from models. Instead, it is suf?¬?cient for the UML tool to generate the class and
function headers. As there is no problem domain semantics in the models, and hence
no knowledge of what the code should actually do, the generation simply maps a
graphical description of object-oriented classes into a textual format. At that level,
object-oriented languages are similar enough that simple mappings can be made, and
where the mapping is less than ideal, it does not matter anyway, since nobody is going
to execute the code.
Coming from such a background, where all modeling languages are UML and
all programming languages are object-oriented, it is tempting to envisage DSM
GENERATOR STRUCTURE 303
code generation as being ?¬?rst a transformation into UML, then a transformation per
language from UML into code.
Pages:
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568