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

Table 1. Checkers for category: general
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

general-connector-type-1

warning

connector type

Only associations, dependecies, generalisations and realisation connectors are supported.

check that the connector type is only associations, dependecies, generalisations and realisation

general-element-type-2

warning

element type

Only Class, Package, Datatype, Enumeration, and Object elements are supported

check that Class, Package, Datatype, Enumeration, and Object elements are used

general-prefix-3

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

Table 2. Checkers for category: common
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

common-name-1

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

common-name-2

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

common-name-3

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

common-name-4

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

common-name-5

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

common-name-6

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.

common-name-7

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

common-name-8

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

common-name-9

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]+

common-description-10

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

common-stereotype-11

info

stereotype provided

The $stereotypeName$ stereotype is applied to $elementName$. Stereotypes are discouraged in the current practice.

check if element has stereotype

common-stereotype-12

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

common-tag-13

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).

common-tag-14

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

common-tag-15

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.

common-name-16

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

common-prefix-17

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.

common-visibility-18

warning

element non-public

The element $name$ is non-public. All elements shall be public.

Check if the element visibility is public

common-name-19

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

Table 3. Checkers for category: class
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

class→common—​0

inherits all from checkers in category common and subcategory name

class-name-2

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

class-attribute-3

info

underspecified class

The class $className$ has no attributes provided. A class should define some attributes.

check if class has at least one attribute

class-connector-4

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

Table 4. Checkers for category: class-attribute
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

class-attribute→common—​0

inherits all from common element checkers

class-attribute-name-1

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

class-attribute-multiplicity-2

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

class-attribute-type-3

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

class-attribute-multiplicity-4

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

class-attribute-visibility-5

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

Table 5. Checkers for category: class-attributes-reuse
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

class-attributes-reuse-definition-1

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

class-attributes-reuse-multiplicity-2

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

class-attributes-reuse-data-types-3

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

Table 6. Checkers for category: enumeration
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

enumeration→common—​0

inherits all from common element checkers

enumeration-attribute-2

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

enumeration-connector-3

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

Table 7. Checkers for category: datatype
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

datatype→common—​0

inherits all from common element checkers

datatype-name-2

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

datatype-attribute-3

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

datatype-datatype-4

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

Table 8. Checkers for category: package
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

package-name-1

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]+

package-name-2

error

missing name

The package name is missing. Packages must be named.

check if name value is empty or missing

package-owned-elements-3

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

Table 9. Checkers for category: object
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

object→common—​0

inherits all from common element checkers

object-attribute-2

warning

object attributes provided

The object $name$ shall have no values/attributes defined.

check if the object has any "attributes" and warn about that

object-connector-3

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

object-connector-4

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

Table 10. Checkers for category: connector
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

connector-name-1

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

connector-name-2

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

connector-name-3

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

connector-name-4

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

connector-name-5

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.

connector-name-6

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

connector-name-7

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

connector-name-8

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]+

connector-stereotype-9

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

connector-stereotype-10

info

stereotype provided

The $stereotypeName$ stereotype is applied to $connector$. Stereotypes are discouraged in the current practice.

check if connector has stereotype

connector-description-11

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

connector-tag-12

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).

connector-tag-prefix-13

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.

connector-tag-14

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

connector-tag-15

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.

connector-target-tag-16

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

connector-source-tag-17

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

connector-tag-18

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

connector-name-19

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

connector-target-20

error

missing target role

The connector $connectorName$ has no target role. The connectors must have target roles.

check the connector target role name

connector-direction-21

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"]

connector-multiplicity-22

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

connector-multiplicity-23

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

connector-direction-24

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.

connector-name-25

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.

connector-name-26

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

Table 11. Checkers for category: connectors-with-same-name
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

connectors-with-same-name-multiplicity-1

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

connectors-with-same-name-definition-2

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

connectors-with-same-name-name-3

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

Table 12. Checkers for category: association
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

association→connector—​0

inherits all from checkers in category connector

association-multiplicity-1

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

association-multiplicity-2

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

association-source-target-types-3

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

Table 13. Checkers for category: dependency
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

dependency→connector—​0

inherits all from checkers in category connector

dependency-direction-1

warning

invalid direction

The direction is not 'Source→Destination'. Dependency direction can be only 'Source→Destination'.

check if the direction is 'S→D'

dependency-source-target-types-2

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

Table 14. Checkers for category: generalisation
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

generalisation-hierarchy-1

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.

generalisation-hierarchy-2

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

generalisation-multiplicity-3

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

generalisation-name-4

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

generalisation-name-5

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

generalisation-direction-6

error

invalid relationship direction

The $direction$ direction is invalid. Generalisations must employ "Source→Destination" direction only.

check generalization direction to be only Source → Destination

generalisation-source-target-types-7

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

Table 15. Checkers for category: realisation
Checker ID
cat-subcat-idx
Severity Checker name Message Pseudo code

realisation-multiplicity-1

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

realisation-name-2

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

realisation-name-3

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

realisation-direction-4

error

invalid relationship direction

The $direction$ direction is invalid. realisations must employ "Source→Destination" direction only.

check realisation direction to be only Source → Destination

realisation-source-target-types-5

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?