The
modeling language does not ???know??? when it would be better to reuse existing model
elements instead of creating new ones, where to search for reusable elements, or
whether reuse is based on a white-box approach showing internal details or a black
box showing just the public interface.
Amore sophisticated way is to share some of the same modeling elements between
the models and modeling languages. Reuse of model elements in different parts of the
same model is illustrated in the mobile phone case (Chapter 8). The return variables
that store the values entered by the user are also used as input for other modeling
concepts. For example, the SMS sending object has a variable message element that
refers to any speci?¬?ed return variable. This allows the de?¬?nition ofSMSsending to use
any variables entered earlier, and if the name of the return variable needs to be changed
later its users, like SMS sending, don??™t need to be updated manually. The metamodel
takes care of that refactoring. Reuse is not limited to single values but also can involve
whole models or their parts. For example, in CPL (Chapter 5) the subaction concept
refers to other diagrams. This allows reusing any call processing service already
de?¬?ned. The watch example (Chapter 9) illustrated reuse of selected model elements
256 DSM LANGUAGE DEFINITION
rather than whole diagrams.
Pages:
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468