MD5.5: rules for mapping stereotypes & tagged values -> symbol style presentation

Suggested improvements and new features.

Moderator: Moderators

MD5.5: rules for mapping stereotypes & tagged values -> symbol style presentation

Postby Nicolas F Rouquette » Wed Jun 05, 2002 11:56 am

Here is an example of three style presentation rules:

rule #1: <<entity>> ==> style1
rule #2: <<entity>> & <<implementationClass>> => style2
rule #3: <<entity>> & Kind=bank => style3
rule #4: <<entity>> & Kind=account => style4

Supposee I have an element that has stereotype <<entity>> and applied
"style1" to visually reflect the role of this element.
Later on, I may "refine" the model, adding/deleting stereotypes and/or
tagged value pairs,

e.g.: I may add a tagged value pair: Kind=account.
Now, the element has: <<entity>>, Kind=account

After this refinement, I still have to apply the corresponding style to
reflect my modeling conventions described above.

Instead, I'd like to specify rules, somewhat like those described above
to automatically apply the most specific style
to the updated element. By "most specific style", I mean that it is the
style from the rule that has the largest number
of matches between the steretypes & tagged value pairs in the element
vs. in the "left hand side" of the rule.

So in this example, the number of matches after the update would be:

rule #1 = 1
rule #2 = 0 (because the element does not have the
<<implementationClass>> stereotype
rule #3 = 0
rule #4 = 2

So, after this update, the element would have 'style4' applied to it.

If there would be multiple rules with the same number of matches (i.e
pareto-optimality)
then we could use the ordering of the rules to choose the first one that
has the largest number
of matches.

So, for example, if the same element that has: <<entity>> + Kind=account
were updated to have:
<<entity>>, <<implementationClass>>, Kind=account, then the rules would
match as follows:

rule #1 = 1
rule #2 = 2
rule #3 = 0
rule #4 = 2

In this case, we have two rules with the largest number of matches: rule
#2 and #4.
It is reasonable to use the order of the rule to decide which one
applies, e.g., the first one: #2
Thus, the element would have 'style2' applied to it.

-- Nicolas

Nicolas F Rouquette
 
Posts Rating:

Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest