SDMetrics home page
The Software Design Metrics tool for the UML
Sitemap

SDMetrics checks adherence to the following UML design rules. You can modify these existing design rules, and add new rules of your own, tailored to your UML design practices and development standards.

The list shows the design rules for UML2. The rules for UML1.3/1.4 are largely the same, or have equivalent counterparts, where applicable. Click on the name of a rule for a more detailed description of the design rule.

Class rules
RuleCategoryDescription
AttrNameOvrNamingThe class defines a property of the same name as an inherited attribute.
ConcreteSuperStyleThe abstract class has a parent class that is not abstract.
CyclicInheritanceInheritanceClass inherits from itself directly or indirectly.
DepCycleStyleThe class has circular references.
DescendentRefStyleThe class references a descendent class via associations, UML dependencies, attribute or parameter types.
DupAttrNamesCorrectnessThe class has two or more properties with identical names.
DupOpsCorrectnessClass has duplicate operations.
GodClassStyleThe class has more than 60 attributes and operations.
KeywordNamingClass name is a Java or C++ keyword.
MultipleInheritanceStyleUse of multiple inheritance - class has more than one parent.
NoSpecCompletenessAbstract class has no child classes.
NotCapitalizedNamingClass names should start with a capital letter.
SpecLeafClassCorrectnessClass is marked as leaf, but it has child classes.
UnnamedCompletenessClass has no name.
UnusedCompletenessThe class is not used anywhere.
Interface rules
RuleCategoryDescription
AttrOnIFStyleThe interface has attributes or outgoing associations.
KeywordNamingInterface name is a Java or C++ keyword; find another name for it.
NotCapitalizedNamingInterface names should start with a capital letter.
PubAttrOnlyCorrectnessThe interface has attributes that are not public.
PubOpsOnlyCorrectnessThe interface has operations that are not public.
UnnamedCompletenessInterface has no name.
UnusedCompletenessThe interface is not used anywhere.
Datatype rules
RuleCategoryDescription
KeywordNamingData type name is a Java or C++ keyword; find another name for it.
NoQueryCorrectnessThe data type has an operation that is not marked as a query.
UnnamedCompletenessThe data type has no name.
Property rules
RuleCategoryDescription
CapitalizedNamingAttribute names should start with a lowercase letter.
KeywordNamingAttribute name is a Java or C++ keyword.
NoTypeCompletenessThe attribute has no specified type.
PublicAttrStyleNon-constant attribute is public.
UnnamedCompletenessThe attribute has no name.
Operation rules
RuleCategoryDescription
AbstractOpCorrectnessOperation is abstract, but its owner class is not abstract.
CapitalizedNamingOperation names should start with a lower case letter.
DupNameNamingThe operation has two or more parameters with identical names.
KeywordNamingOperation name is a Java or C++ keyword.
LongParListStyleThe operation has a long parameter list with five or more parameters.
MulReturnCorrectnessThe operation has more than one return parameter.
QueryStyleThe operation name indicates a query, but it is not marked as a query.
UnnamedCompletenessOperation has no name.
Parameter rules
RuleCategoryDescription
KeywordNamingParameter name is a Java or C++ keyword.
NoTypeCompletenessThe parameter has no specified type.
UnnamedCompletenessParameter has no name.
Package rules
RuleCategoryDescription
CapitalizationNamingPackage name has upper case letters.
DepCycleStyleThe package has circular dependencies to other packages.
DupClsNameNamingThe package has two or more classes or interfaces with identical names.
EmptyPackageCompletenessThe package has no contents.
KeywordNamingPackage name is a Java or C++ keyword.
SDP1StylePackage violates the Stable-Dependencies Principle (SDP).
SDP2StylePackage violates the Stable-Dependencies Principle (SDP).
UnnamedCompletenessPackage has no name.
Association rules
RuleCategoryDescription
AggEndsCorrectnessThe binary association has two composite or shared aggregation ends.
LooseEndCompletenessThe association has one or more ends not connected to a model element.
NaryAggStyleThe association has three or more association ends.
NaryAggEndsCorrectnessThe n-ary association has a composite or shared aggregation end.
NaryNavEndsCorrectnessThe n-ary association indicates a navigable association end.
SpecAggStyleThe association is a specialization of another association.
Associationclass rules
RuleCategoryDescription
AssocClassStyleAvoid association classes.
Generalization rules
RuleCategoryDescription
NoChildCompletenessThe child end of the generalization is not connected to a model element.
NoParentCompletenessThe parent end of the generalization is not connected to a model element.
TypeMismatchCorrectnessParent and child of the generalization are not of the same type.
Interfacerealization rules
RuleCategoryDescription
NoInterfaceCompletenessThe client end of the interface realization is not connected to a model element.
NoSupplierCompletenessThe supplier end of the interface realization is not connected to an interface.
Dependency rules
RuleCategoryDescription
NoClientCompletenessThe client end of the dependency link is not connected to any model element.
NoSupplierCompletenessThe supplier end of the dependency link is not connected to a model element.
Interaction rules
RuleCategoryDescription
AlternativesStyleThe interaction models alternative sequences.
Actor rules
RuleCategoryDescription
NaryAssocCorrectnessThe actor participates in an n-ary association.
NoAssocCompletenessThe actor is not associated with any use cases, classes, or subsystems.
UnnamedCorrectnessThe actor has no name.
Usecase rules
RuleCategoryDescription
CyclicIncludesCorrectnessUse case directly or indirectly includes itself.
DupExPointCorrectnessThe use case has two or more extension points of the same name.
ExtendsStyleThe use case is extending another use case.
FunctionalDecompStyleUse case both includes and is included in other use cases.
NaryAssocCorrectnessThe use case participates in an n-ary association.
NoNameCompletenessThe use case has an extension point without a name.
UnnamedCorrectnessThe use case has no name.
UnusedCompletenessThe use case is not used.
Statemachine rules
RuleCategoryDescription
HistoryStateCorrectnessThe protocol state machine contains a history state.
ProtocolTransitionCorrectnessThe state machine contains a protocol transition.
RegularTransitionCorrectnessThe protocol state machine contains a transition that is not a protocol transition.
StatesWithActivitiesCorrectnessThe protocol state machine contains states with entry/exit/doactivities.
TransWithEffectsCorrectnessThe protocol state machine contains transitions with effects.
Region rules
RuleCategoryDescription
DeepHistoryCorrectnessThe region has two or more deep history states.
DupNameCorrectnessThe region has two or more states of the same name.
EmptyRegionCompletenessThe region has no states.
InitialAndFinalStatesStyleThere is no initial or final state for the state machine.
ShallowHistoryCorrectnessThe region has two or more shallow history states.
TooManyInitialStatesCorrectnessThe region has two or more initial states.
State rules
RuleCategoryDescription
BadForkOutgoingCorrectnessTransitions from fork states must not have a guard or triggers.
BadForkTargetCorrectnessTransitions from fork states in a state machine must not target a pseudo state.
BadIncomingCorrectnessTransitions to join states must not have triggers or guards.
BadJoinSourceCorrectnessTransitions to join states in a state machine must not originate from a pseudo state.
BadOutgoingCorrectnessTransitions from pseudo states must not have any triggers.
ForkTargetStates1CorrectnessFork state has transitions to states in identical regions.
ForkTargetStates2CorrectnessFork state has transitions to states in different concurrent states.
IllegalChoiceCorrectnessA choice or junction state must have at least one incoming and one outgoing transition.
IllegalEntryExitCorrectnessEntry or exit point is not owned by a top-level region.
IllegalFinal1CorrectnessA final state cannot have any outgoing transitions.
IllegalFinal2CorrectnessA final state cannot have any regions or entry/exit/state behavior.
IllegalForkCorrectnessFork states must have exactly one incoming and two or more outgoing transitions.
IllegalHistoryCorrectnessThe history state has two or more outgoing transitions.
IllegalInitialCorrectnessAn initial state must have no incoming and exactly one outgoing transition.
IllegalJoinCorrectnessJoin states must have two or more incoming and exactly one outgoing transition.
JoinSourceStates1CorrectnessJoin state has transitions from states in identical regions.
JoinSourceStates2CorrectnessJoin state has transitions from states in different concurrent states.
MissingGuardCorrectnessIf there are two or more transitions from a choice state, they all must have guards.
MissingSourceCorrectnessState has an incoming transition not attached to a source state.
MissingTargetCorrectnessState has an outgoing transition not attached to a target state.
NoIncomingCompletenessState has no incoming transitions.
NoOutgoingCompletenessState has no outgoing transitions.
UnnamedCompletenessState has no name.
Activitygroup rules
RuleCategoryDescription
EmptyGroupCompletenessThe activity group does not contain any nodes or subgroups.
NoExpansionNodeCompletenessThe expansion region has no expansion node.
Action rules
RuleCategoryDescription
IsolatedActionCompletenessThe action has neither incoming nor outgoing edges.
UnnamedCompletenessAction has no name.
Controlnode rules
RuleCategoryDescription
DecisionOutCompletenessDecision nodes should have two or more outgoing edges, each with a guard.
ForkOutCompletenessFork nodes should have two or more outgoing edges.
IllegalDecisionCorrectnessDecision nodes must have exactly one incoming edge.
IllegalFinalCorrectnessFinal nodes must not have any outgoing edges.
IllegalFork1CorrectnessFork nodes must have exactly one incoming edge.
IllegalInitialCorrectnessThe initial node has incoming edges our outgoing object flows.
IllegalJoin1CorrectnessJoin nodes must have exactly one outgoing edge.
IllegalJoin2CorrectnessOutgoing edge of join is the wrong type.
IllegalMergeCorrectnessMerge nodes must have exactly one outgoing edge.
IsolatedNodeCompletenessThe control node has neither incoming nor outgoing edges.
MixedEdgeTypesCorrectnessEdges from or to decision, merge, or fork nodes must be of the same type.
NumIncomingCompletenessMerge and join nodes should have two or more incoming edges.
Objectnode rules
RuleCategoryDescription
InOrOutCorrectnessThe activity parameter node has both incoming and outgoing flows.
IsolatedNodeCompletenessThe object node has neither incoming nor outgoing edges.
UnnamedCompletenessThe object node has no name.
Pin rules
RuleCategoryDescription
IllegalInputPinCorrectnessThe input pin has outgoing edges.
IllegalOutputPinCorrectnessThe output pin has incoming edges.
IllegalValuePinCorrectnessThe value pin has an incoming edge.
NoIncomingCompletenessThe input pin has no incoming edges.
NoOutgoingCompletenessThe output pin has no outgoing edges.
Controlflow rules
RuleCategoryDescription
DanglingCtrlFlowCompletenessThe control flow has no source or target node, or both.
Objectflow rules
RuleCategoryDescription
DanglingObjectFlowCompletenessThe object flow has no source or target node, or both.