UML Convention checker inventory
This page summarises the list of automatic checkers that are implemented to validate the UML Model by running it against the XMI file encoding the model.
The checkers are organized in categories representing their scope, and sub-categories representing their purpose.
Separate tables are provided for each category of checkers.The columns in these tables have the following meaning:
-
Checker ID: of form
cat-subcat-idx
, represents a unique identifier for the checker, and is automatically generated by concatenating the checker category ID, the checker subcategory ID, and a unique index within the category, all separated by a dash (-
). -
Severity: represents how the problem should be reported if the checker fails.It can have one of three values (listed in decreasing order of severity): "error", "warning" or "info".
-
Checker name: a short text describing what the checker does.
-
Message: the message that should be presented if the checker fails. It should be formed as two clauses: 1. what the problem is, and in which identifiable element it occurred. 2. what the requirement is for how things should be. The message may contain variables of the form
$variable_name$
. -
Pseudo code: describes, in words, the logic a given checker should implement.
All checkers are defined based on the UML Conceptual Model Conventions that the model should adhere to.
General Checkers
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
warning |
connector type |
Only associations, dependecies, generalisations and realisation connectors are supported. |
check that the connector type is only associations, dependecies, generalisations and realisation |
|
warning |
element type |
Only Class, Package, Datatype, Enumeration, and Object elements are supported |
check that Class, Package, Datatype, Enumeration, and Object elements are used |
|
error |
namespace definitions |
The prefixes $[list of undefined prefixes] are not defined. All used namespaces shall be defined ("prefix" = "base URI"), including the default one (""="base URI"). |
check that all used prefixes are defined |
Common Checkers for all Elements
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
warning |
naming format |
The name $elementName$ does not match the pattern. The name should respect the syntax "prefix:localSegment" (similar to the XML QName). |
check if it is a valid Qname- XML |
|
error |
missing name |
The name of the element $IdRef$ is missing. Please provide one respecting the syntax "prefix:localSegment". |
name value is empty or missing |
|
warning |
missing name prefix |
The name $elementName$ is missing a prefix. The name should comprise a prefix respecting the syntax "prefix:localSegment". |
the prefix is missing |
|
error |
missing local segment name |
The name of $elementName$ is missing a local segment. The name should comprise a local segment respecting the syntax "prefix:localSegment". |
the local segment is missing |
|
error |
invalid name prefix |
The name prefix is invalid in $value$. Please provide a short prefix name containing only alphanumeric characters [a-zA-Z0-9]+ |
check regex for prefix |
|
warning |
undefined prefix |
The prefix $value$ is not defined. A prefix must be associated to a namespace URI. |
collect the names of classes, enumerations, datatypes, connectors, attributes, connector roles and check if the namespace is known. |
|
error |
invalid name local segment |
The local name segment is invalid in $value$. Please provide a concise label using alphanumeric characters [a-zA-Z0-9_\-\s]+, preferably in CamelCase, or possibly with tokens delimited by single spaces. |
check regex for local segment |
|
error |
invalid first character in the local segment |
The local name segment $value$ starts with an invalid character. The local segment must start with a letter or underscore. |
check if the first charater is not a letter or underscore |
|
error |
delimiters in the name local segment |
The local name segment $value$ contains token delimiters. It is best if the names are camel-cased and delimiters removed. |
check if local segment contains delimiters (spaces) regex [\s]+ |
|
warning |
missing description |
$elementName$ is missing a description. All concepts and properties should be defined and/or described. |
check if the $element$ has a description/documentation |
|
info |
stereotype provided |
The $stereotypeName$ stereotype is applied to $elementName$. Stereotypes are discouraged in the current practice. |
check if element has stereotype |
|
warning |
unknown stereotype provided |
The $stereotypeName$ stereotype applied to $elementName$ is not known and will be ignored. |
check if element has stereotype and if it is in the set of exceptions |
|
error |
invalid tag name |
The tag $tagName$ of element $elementName$ must be an URI. |
For all tags of an element (classes, enumerations, datatypes, connectors, attributes, connector roles) select the tag name and check that it is a short URI or short URI with a language tag (e.g. @en). |
|
error |
missing tag value |
The tag $tagName$ of element $elementName$ must have a value. |
For all tags of an element select the tag and check if it has value |
|
error |
missing tag name |
The tag $tagName$ of element $elementName$ must have a valid name. |
For all tags of an element check it has a name. |
|
warning |
plural name |
The name $value is possibly in plural grammatical number. Names shall be usually provided in singular number. |
check if the name ends in -s or-es |
|
warning |
undefined prefix |
The Tag name prefix $value$ is not defined. A prefix must be associated to a namespace URI. |
collect the names of the tags and check if the namespace is known. |
|
warning |
element non-public |
The element $name$ is non-public. All elements shall be public. |
Check if the element visibility is public |
|
error |
names must be unique |
The name $value$ is not unique. The Concept names should be unique within the model. The following list specifies the names of the which things are not to be reused as the names of which other things: (a) elements (Class, Datatype, Enumeration, Object) → elements, attributes, connector roles (dependency & association); and (b) attributes → elements, connector roles (dependency & association) |
Check that the names of the following things are not being reused as the names of something else: (a) elements (Class, Datatype, Enumeration, Object) → elements, attributes, connector roles (dependency & association); and (b) attributes → elements, connector roles (dependency & association) |
Checkers for Classes
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
inherits all from checkers in category |
|||
|
warning |
class is not PascalCased |
The class name $value$ is invalid. The class name must start with a capital case. |
check first letter of the local segment |
|
info |
underspecified class |
The class $className$ has no attributes provided. A class should define some attributes. |
check if class has at least one attribute |
|
warning |
disconnected class |
The class $className$ is disconnected. A class should be connected to other elements. |
check if there is at least one connector that has this class as the source |
Checkers for Class Attributes
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
inherits all from |
|||
|
warning |
invalid name case |
The attribute name $value$ is invalid. Class attribute names must start with a lower case. |
check first letter of the local segment |
|
error |
invalid multiplicity format |
The attribute $attributeName$ multiplicity is invalid. Multiplicity must be specified in the form ['min'..'max'] and the values should be defined with a digit or * |
check the multiplicity format |
|
error |
invalid datatype |
The attribute type $attributeType$ is invalid. Attributes must use datatypes that are either: (a) XSD or RDF datatypes or (b) belonging to a shortlist of custom URIs (datatypes or classes). |
check that datatype is legal, i.e. in the list of permitted standard or custom datatypes |
|
warning |
missing multiplicity |
The attribute $attributeName$ multiplicity is missing. Multiplicity must be specified in the form ['min'..'max'] and the values should be defined with a digit or * |
check the multiplicity is present |
|
warning |
attribute non-public |
The attribute type $attributeType$ is non-public. Attributes shall be public |
check if the attribute visibility is public |
Checkers for Reused Class Attributes
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
warning |
Definition of class attributes with same name |
The attribute $value$ is defined differently in reuse contexts. When a property is reused in multiple contexts, the meaning given by the definition is expected to be the same. In this case, multiple definitions are found: $Definitions |
compare definition values for a group of class attributes with the same name |
|
info |
Multiplicity of class attributes with same name |
The attribute $value$ is has different multiplicities in reuse contexts. When a property is reused in multiple contexts, the multiplicity is expected to be the same. Please check the nomenclature above for a summary. |
compare multiplicity values for a group of class attributes with the same name |
|
error |
Data-types of class attributes with same name |
The attribute $value$ has different datatypes in reuse contexts. When a property is reused in multiple contexts, the data-type is expected to be the same. In this case, multiple data-types are found: $Data-types |
compare data-types for a group of class attributes with the same name |
Checkers for Enumerations
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
inherits all from |
|||
|
warning |
enumeration values provided |
The enumeration $value$ shall have no values/attributes defined. An Enumeration stands for a controlled list and its management is out of model scope. |
check if the enumeration has any "attributes" and warn about that |
|
error |
enumeration connected to other elements |
The enumeration $value should not connect to other elements. An Enumeration stands for a controlled list and can only be referred to. |
check if there are outgoing connectors from an enumeration and error about that |
Checkers for Data Types
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
inherits all from |
|||
|
warning |
invalid datatype |
The datatype $value$ is not an XSD or RDF datatype. It is recommended to use XSD and RDF datatypes mainly. |
check if name is a valid xsd/rdf datatype |
|
warning |
non-atomic datatype |
The datatype $value$ is not atomic. Complex datatypes where attributes/components are specified shall be represented as classes. |
check if datatype has attributes and report that |
|
error |
datatype connected to other elements |
The datatype $value should not connect to other elements. A Datatype can only be referred to. |
check if there are outgoing connectors from an datatype and error about that |
Checkers for Packages
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
warning |
bad name |
The package name $packageName$ contains invalid characters. Package name shall be a short alphanumeric string representing an acronym or a short name. |
check if name matches regex [a-zA-Z0-9\s]+ |
|
error |
missing name |
The package name is missing. Packages must be named. |
check if name value is empty or missing |
|
warning |
empty package |
The package $packageName$ is empty. Packages must contain child classes and connectors (i.e. owned elements). |
check if there are any owned elments in the package |
Checkers for Objects
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
inherits all from |
|||
|
warning |
object attributes provided |
The object $name$ shall have no values/attributes defined. |
check if the object has any "attributes" and warn about that |
|
error |
object connected to other elements |
The object $value should not connect to other elements. An object stands for an controlled list and can only be referred to. |
Check if there are outgoing connectors from an object and error about that. Except realisation connectors |
|
warning |
object must instanciate a Class or Enumeration |
The object $name should instanciate a Class or Enumeration. There shall be at least one Realisation relationship between the Object and a Class or Enumeration. |
check if the object has at least one realisation relationship with a Class or Enumeration. |
Common Checkers for all Connectors
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
warning |
naming format |
The name $connector$ does not match the pattern. The name should respect the syntax "prefix:localSegment" (similar to the XML QName). |
check if it is a valid Qname- XML |
|
warning |
missing name prefix |
The name $connector$ is missing a prefix. The name should comprise a prefix respecting the syntax "prefix:localSegment". |
the prefix is missing |
|
error |
missing local segment name |
The name of $connector$ is missing a local segment. The name should comprise a local segment respecting the syntax "prefix:localSegment". |
the local segment is missing |
|
error |
invalid name prefix |
The name prefix is invalid in $value$. Please provide a short prefix name containing only alphanumeric characters [a-zA-Z0-9]+ |
check regex for prefix |
|
warning |
undefined prefix |
The prefix $value$ is not defined. A prefix must be associated to a namespace URI. |
check connector roles names and check if the namespace is known. |
|
error |
invalid name local segment |
The local name segment is invalid in $value$. Please provide a concise label using alphanumeric characters [a-zA-Z0-9_\-\s]+, preferably in CamelCase, or possibly with tokens delimited by single spaces. |
check regex for local segment |
|
error |
invalid first character in the local segment |
The local name segment $value$ starts with an invalid character. The local segment must start with a letter or underscore. |
check if the first charater is not a letter or underscore |
|
error |
delimiters in the name local segment |
The local name segment $value$ contains token delimiters. It is best if the names are camel-cased and delimiters removed. |
check if local segment contains delimiters (spaces) regex [\s]+ |
|
warning |
unknown stereotype provided |
The $stereotypeName$ stereotype applied to $connector$ is not known and will be ignored. |
check if element has stereotype and if it is in the set of exceptions |
|
info |
stereotype provided |
The $stereotypeName$ stereotype is applied to $connector$. Stereotypes are discouraged in the current practice. |
check if connector has stereotype |
|
warning |
missing description |
$connector$ is missing a description. All concepts and properties should be defined and/or described. |
check if the connector roles have a description/documentation |
|
error |
invalid tag name |
The tag $tagName$ of element $connector$ must be an URI. |
For all tags of an element (classes, enumerations, datatypes, connectors, attributes, connector roles) select the tag name and check that it is a short URI or short URI with a language tag (e.g. @en). |
|
warning |
undefined prefix |
The Tag name prefix $value$ is not defined. A prefix must be associated to a namespace URI. |
collect the names of the tags and check if the namespace is known. |
|
error |
missing tag value |
The tag $tagName$ of element $connector$ must have a value. |
For all tags of an element select the tag and check if it has value |
|
error |
missing tag name |
The tag $tagName$ of element $connector$ must have a valid name. |
For all tags of an element check it has a name. |
|
warning |
connector target role with tags but without a name |
The connector $connectorName$ target role has tag annotations but no name. The connector must have a target role to sustain annotations. |
check if target role has tags but no name, raise a warning |
|
warning |
connector source role with tags but without a name |
The connector $connectorName$ source role has tag annotations but no name. The connector must have a source role to sustain annotations. |
check if source role has tags but no name, raise a warning |
|
warning |
connector with tags |
The connector $connectorName$ has tag annotations. The connector is not transformed into a property and therefore any tag will be ignored. |
check if connector has tags, raise a warning |
|
error |
general name provided |
The connector $connectorName$ has a general name, and it should not. The names must be provided as connector source and target roles, not as connector name. |
check the connector name |
|
error |
missing target role |
The connector $connectorName$ has no target role. The connectors must have target roles. |
check the connector target role name |
|
error |
invalid relationship direction |
The connector $connectorName$ employs invalid direction $direction$. Connectors must employ "Source→Destination" or "Bidirectional" directions only. |
check the connector direction is in the list ["src→dest", "bidir"] |
|
warning |
missing target multiplicity |
The target role of $connectorName$ has no multiplicity. Cardinality must be provided for each role. |
check the connector has target role name and multiplicity is empty |
|
warning |
invalid target multiplicity format |
The connector $connectorName$ has target multiplicity invalidly stated. Multiplicity must be specified in the form ['min'..'max']. |
check the multiplicity format in target |
|
error |
direction and roles are out of sync |
The connector direction and roles are out of sync. When the connector direction is Source→Destination then only a target role is expected, while for Bi-Directional direction source and a target roles are expected. |
if the connector direction is S→D, then only target role must be provided; else if the direction is BiDir, then source and target roles msut be provided. |
|
error |
connector role names must be unique |
The name $value$ is not unique. The Connector role names can be reused within the model, but only as connector role names on the same type of connector. I.e. the name of (dependecy & association) connector roles should not be reused as the name of elements (Class, Datatype, Enumeration, Object) or attributes. |
Check that the names of (dependecy & association) connector roles are not being reused as names of elements (Class, Datatype, Enumeration, Object) or attributes. |
|
error |
connector role names reused only on same connector type |
The name $value$ is not unique. The Connector role names can be reused within the model, but only as connector role names on the same type of connector. I.e. the name of a dependecy role should not be reused as the name of association role, and the name of association role should not be reused as the name of a dependecy role. |
Check that the name of the dependecy role is not reused as the name of an association role, and the name of the association role is not reused as the name of a dependecy role. |
Checkers for Reused Connectors
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
info |
Multiplicity of connectors with same name |
When a property is reused in multiple contexts, the multiplicity is expected to be the same. Please check the nomenclature above for a summary. |
compare multiplicity values for a group of connectors with the same name |
|
warning |
Definition of connectors with same name |
When a property is reused in multiple contexts, the meaning given by the definition is expected to be the same. In this case, multiple definitions are found: $Definitions |
compare definition values for a group of connectors with the same name |
|
error |
a name is used in different conenctor types e.g. in dependecy and in association |
The name $Name appears on connectors of different types. A name shall be reused only on connectors of the same type. |
check if the the name appears only on conenctors of the same type. |
Checkers for Association Connectors
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
inherits all from checkers in category |
|||
|
warning |
missing source multiplicity |
The source role of $connectorName$ has no multiplicity. Cardinality must be provided for each role. |
check the connector has source role name and multiplicity is empty |
|
warning |
invalid source multiplicity format |
The connector $connectorName$ has source multiplicity invalidly stated. Multiplicity must be specified in the form ['min'..'max']. |
if source role si available check the multiplicity format in source |
|
error |
only associations of classes to classes and classes to objects are allowed |
Associations can be provided only between classes to classes and classes to objects. |
check that Associations are be provided only between classes to classes and classes to objects. ONLY: Class→Class or Class→Object |
Checkers for Dependency Connectors
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
inherits all from checkers in category |
|||
|
warning |
invalid direction |
The direction is not 'Source→Destination'. Dependency direction can be only 'Source→Destination'. |
check if the direction is 'S→D' |
|
error |
only dependecies of classes to enumerations or objects are allowed |
Dependecies can be provided only between classes and enumerations or objects. |
check that Dependecies are provided only between classes and enumerations or objects. ONLY: Class → Enumeration or Class → Object |
Checkers for Generalisation Connectors
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
info |
class with a single child |
The class $parent$ has only one sub-class $child$. Class inheritance should be built employing at least two subclasses for each class or not at all. |
This applies to class generalisation only, and not to connector generalisation. Select the target name of the generalisation connector; then count how many generalisations have the same target; they must be 2 or more. |
|
error |
inverse inheritance |
The classes $class1$ and $class2$ inherit one another. Sub-class relation must be established in one direction only, forming a hierarchy. |
select sourceName and targetName of a generalisation; check if there is another generalisation in the inverse order fom targetName to sourceName |
|
error |
generalisation with multiplicity |
The generalisation has multiplicity. No multiplicity can be provided to generalisations. |
check that no multiplicity is provided in the source or target roles |
|
error |
generalisation with a name |
The connector $connectorName$ has a name. No name can be provided for generalisation relation. |
check that no name is provided for the generalisation |
|
error |
generalisation has a role name |
The generalisation connector has a role name. No source or target roles can be provided to generalisations. |
check that no name is provided for the generalisation source and target roles |
|
error |
invalid relationship direction |
The $direction$ direction is invalid. Generalisations must employ "Source→Destination" direction only. |
check generalization direction to be only Source → Destination |
|
error |
only generalisations of classes and properties are allowed |
Generalisations can be provided only between classes or between connectors. |
check that generalisations are provided only between Classes or between connectors (ProxyConnector). ONLY: Class → Class or ProxyConnector → ProxyConnector |
Checkers for Realisation Connectors
Checker IDcat-subcat-idx |
Severity | Checker name | Message | Pseudo code |
---|---|---|---|---|
|
error |
realisation with multiplicity |
The realisation has multiplicity. No multiplicity can be provided to realisations. |
check that no multiplicity is provided in the source or target roles |
|
error |
realisation with a name |
The connector $connectorName$ has a name. No name can be provided for realisation relation. |
check that no name is provided for the realisation |
|
error |
realisation has a role name |
The realisation connector has a role name. No source or target roles can be provided to realisations. |
check that no name is provided for the realisation source and target roles |
|
error |
invalid relationship direction |
The $direction$ direction is invalid. realisations must employ "Source→Destination" direction only. |
check realisation direction to be only Source → Destination |
|
error |
only realisations of classes or enumerations as object are allowed |
The realisation can be provided only from an Object to a Class or Enumeration |
check that the realisations are between an Object and classes or enumerations. ONLY: Object→Class or Object→Enumeration |
Any comments on the documentation?