| Prev - Next - Down | SDMetrics - the UML design measurement tool |
<rule name="MissingGuard" domain="state" category="Correctness"
severity="1-high">
<description>If there are two or more transitions from a choice
state, they all must have guards.</description>
<projection precondition="kind='choice' and Outgoing>1"
relation="transsource" target="transition" condition="Guards=0"
</rule>
Attributes relation, target, and
condition define the projection, and are processed
exactly the same way as we know them from set projections. In the
above example, the projection yields, for a state, the set of outgoing
transitions that have no guard.In the context of a rule, a projection can have three additional attributes:
<rule name="DupName" domain="state" category="Correctness" severity="1-high">
<description>The compound state has two or more states of
the same name.</description>
<projection relation="context" target="state" condition="name!=''"
valueset="name" mincnt="2" />
</rule>
For rule "DupName", the projection defines the value set of names of
the states of a compound state (omitting anonymous states). By setting
mincnt="2", only names that occur two times or more will be
reported.Note the following restrictions that apply in the context of a rule projection:
| Prev | Up | Next |
| Section 8.3.2 "Cycle" | Contents | Section 8.3.4 "Valueset for Rules" |