This
will greatly support language use later, in the introduction phase.
10.3.2 Sample Metamodeling Task
Let??™s next inspect the metamodeling process with an example. Consider the case
mentioned earlier of supporting different button pressing policies in a modeling
language specifying watch applications. The task of the language designer is to
choose the most suitable structure for the language and de?¬?ne it into a metamodel.
248 DSM LANGUAGE DEFINITION
The options presented in Section 10.2.4 were creating a newmodeling object (long
button press), adding a property to a current button to choose the policy (short or long
press), adding a newrole to the language (long press event), or adding a property to the
current Event role for different pressing policies. Since the ?¬?rst two options do not
support reuse, and the same button would be used in every case with the same policy, it
is best to modify the role. This allows us to use the same button in different ways:
sometimes the button is pressed brie?¬‚y, and sometimes for a longer period. Rather
than making the language larger with its own dedicated role type for long pressing, we
decided to add a property to the current Event role.
Figure 10.7 illustrates this change. This metamodel de?¬?nes that there can be a
transition from a state to another state or a stop state.
Pages:
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453